66 workflow_dispatch :
77
88permissions :
9- contents : read
9+ contents : write
10+
11+ concurrency :
12+ group : prod-vectors-latest
13+ cancel-in-progress : true
1014
1115jobs :
1216 check :
2428 - name : Check if scheme changed
2529 id : scheme-diff
2630 run : |
27- if git diff HEAD~1 --name-only | grep -qE '^src/lean_spec/subspecs/(xmss|poseidon2 )/'; then
31+ if git diff HEAD~1 --name-only | grep -qE '^src/lean_spec/subspecs/(xmss|poseidon1 )/'; then
2832 echo "changed=true" >> $GITHUB_OUTPUT
2933 fi
3034
3337 uses : actions/cache/restore@v4
3438 with :
3539 path : /tmp/prod-keys-probe
36- key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon2 /**') }}
40+ key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon1 /**') }}
3741 lookup-only : true
3842
3943 keygen :
7579 uses : actions/cache/restore@v4
7680 with :
7781 path : packages/testing/src/consensus_testing/test_keys/prod_scheme
78- key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon2 /**') }}
82+ key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon1 /**') }}
7983
8084 - name : Download keys
8185 if : steps.key-cache.outputs.cache-hit != 'true'
8690 uses : actions/cache/save@v4
8791 with :
8892 path : packages/testing/src/consensus_testing/test_keys/prod_scheme
89- key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon2 /**') }}
93+ key : prod-keys-${{ hashFiles('src/lean_spec/subspecs/xmss/**', 'src/lean_spec/subspecs/poseidon1 /**') }}
9094
9195 - name : Fill production test fixtures
9296 run : just fill-ci --scheme=prod
@@ -96,9 +100,34 @@ jobs:
96100 mkdir -p fixtures/keys
97101 cp -r packages/testing/src/consensus_testing/test_keys/prod_scheme fixtures/keys/
98102
99- - name : Upload fixtures + keys
103+ - name : Create reproducible fixture archive
104+ run : |
105+ tar \
106+ --sort=name \
107+ --owner=0 \
108+ --group=0 \
109+ --numeric-owner \
110+ --mtime='UTC 2020-01-01' \
111+ -cf - fixtures | gzip --no-name > fixtures-prod-scheme.tar.gz
112+ sha256sum fixtures-prod-scheme.tar.gz > fixtures-prod-scheme.tar.gz.sha256
113+
114+ - name : Upload fixture archive
100115 uses : actions/upload-artifact@v4
101116 with :
102117 name : fixtures-prod-scheme
103- path : fixtures/
118+ path : |
119+ fixtures-prod-scheme.tar.gz
120+ fixtures-prod-scheme.tar.gz.sha256
104121 if-no-files-found : error
122+
123+ - name : Publish latest release
124+ run : |
125+ gh release delete latest --cleanup-tag --yes || true
126+ gh release create latest \
127+ fixtures-prod-scheme.tar.gz \
128+ fixtures-prod-scheme.tar.gz.sha256 \
129+ --target "${{ github.sha }}" \
130+ --title "Latest production fixtures" \
131+ --notes "Auto-generated from leanSpec@${{ github.sha }}"
132+ env :
133+ GH_TOKEN : ${{ github.token }}
0 commit comments