-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.08 KB
/
ci2015.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: AoC-2015
env:
YEAR: 2015
on:
push:
branches:
- main
paths:
- "2015/**"
- "$YEAR/**" # variables inside paths don't work
workflow_dispatch:
jobs:
_2015_:
runs-on: ubuntu-latest
container:
image: egordeev/adventofcode:python-3.11-hyperfine
steps:
- uses: actions/checkout@v3
- name: Run all and verify output
run: |
cp $YEAR/answers.txt answers.tmp.txt
bin/run-all-solutions.py --dir $YEAR --write
cmp -s $YEAR/answers.txt answers.tmp.txt || exit 1
- name: Benchmarking
run: |
hyperfine --warmup 3 -r 10 "find $YEAR -type f -regex '.*/[0-9]*\.py' | sort -n | xargs -I {} python {}" | tee $YEAR/benchmark.txt
echo "=== All Benchmarks ==="
find $YEAR -type f -regex ".*/[0-9]*\.py" | sort -n | xargs -I {} bash -c "hyperfine --warmup 3 -r 10 {} | tee {}.benchmark.txt"
- name: Create Awesome Badges
run: |
bin/create-awesome-badges.py --dir $YEAR --gist 13c6cac3c39702cdcb9cc169b66c3210 --secret ${{ secrets.GIST_GITHUB_SECRET }}