-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (58 loc) · 1.69 KB
/
instructions.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Instructions CI
on:
pull_request: {}
push:
branches:
- main
schedule:
# Run weekly (2:49 AM UTC on Tuesdays) to catch failures based on
# external changes.
- cron: '49 02 * * 2'
workflow_dispatch: {}
env:
# For PRs, this workflow runs against the PR commit, not the merge of that
# with main.
COMMIT_HASH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
jobs:
main:
name: Build
runs-on: ubuntu-22.04
defaults:
run:
# Note: does not apply to actions.
working-directory: instructions
steps:
- name: Check out sources
uses: actions/checkout@v4
with:
ref: ${{ env.COMMIT_HASH }}
- name: Check git hash
run: |
echo "expected: $COMMIT_HASH"
actual=$(git rev-parse HEAD)
echo "actual: $actual"
[ "$actual" = "$COMMIT_HASH" ]
- name: Run shellcheck
run: shellcheck build.sh
- name: Check that debug_level=0
run: grep -q '^#let debug_level = 0$' debug.typ
- name: Run build
run: |
./build.sh
mv ceremony.pdf "ceremony-release-$COMMIT_HASH.pdf"
- name: Check PDF reproducibility
run: |
sleep 1
./build.sh
cmp ceremony.pdf "ceremony-release-$COMMIT_HASH.pdf"
- name: Run debug build
run: |
sed --in-place '/^#let debug_level = 0$/ s/0/1/' debug.typ
./build.sh
mv ceremony.pdf "ceremony-debug-$COMMIT_HASH.pdf"
- name: Upload Actions artifact with PDFs
uses: actions/upload-artifact@v3
with:
name: ceremony-instructions-${{ env.COMMIT_HASH }}
path: |
instructions/ceremony-*.pdf