14
14
- master
15
15
workflow_dispatch :
16
16
17
- env :
18
- HOLDIR : ${{ github.workspace }}/HOL
19
- CAKEMLDIR : ${{ github.workspace }}/cakeml
20
- LD_LIBRARY_PATH : /usr/local/lib:$LD_LIBRARY_PATH
21
-
22
17
jobs :
23
18
24
19
build :
25
20
runs-on : self-hosted
26
21
container : ubuntu:20.04
27
22
23
+ env :
24
+ HOLDIR : ${{ github.workspace }}/HOL
25
+ CAKEMLDIR : ${{ github.workspace }}/cakeml
26
+ LD_LIBRARY_PATH : /usr/local/lib:$LD_LIBRARY_PATH
27
+
28
+ outputs :
29
+ hol_sha : ${{ steps.shas.outputs.HOL_SHA }}
30
+ cakeml_sha : ${{ steps.shas.outputs.CAKEML_SHA }}
31
+
28
32
steps :
29
33
- name : Update PATH
30
34
run : |
31
35
echo "$HOLDIR/bin" >> $GITHUB_PATH
32
36
- name : Get build-essentials
33
37
run : |
34
38
apt update
35
- apt install -y build-essential gcc-10 libffi-dev wget mlton
39
+ apt install -y git build-essential gcc-10 libffi-dev wget mlton
36
40
37
41
- name : Checkout Poly/ML
38
42
uses : actions/checkout@v2
@@ -162,6 +166,14 @@ jobs:
162
166
cd pure/examples
163
167
make check
164
168
169
+ - name : Record HOL/CakeML checkouts
170
+ id : shas
171
+ run : |
172
+ cd $HOLDIR
173
+ echo "HOL_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
174
+ cd $CAKEMLDIR
175
+ echo "CAKEML_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
176
+
165
177
release :
166
178
if : github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master'
167
179
needs : build
@@ -181,22 +193,21 @@ jobs:
181
193
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
182
194
apt update && apt install -y gh
183
195
184
- - name : Get release tag
196
+ - name : Create release tag and release notes
185
197
run : |
186
- cd pure
187
198
echo "VERSION=v$(date +'%Y.%m.%d')" >> $GITHUB_ENV
199
+ echo "HOL checkout: HOL-Theorem-Prover/HOL@${{ needs.build.outputs.hol_sha }}" >> $COMMITS
200
+ echo "CakeML checkout: CakeML/CakeML@${{ needs.build.outputs.cakeml_sha }}" >> $COMMITS
188
201
189
- - name : Get HOL4/CakeML versions
190
- run : |
191
- cd $HOLDIR
192
- echo "HOL checkout: HOL-Theorem-Prover/HOL@$(git rev-parse --short HEAD)" >> $COMMITS
193
- cd $CAKEMLDIR
194
- echo "CakeML checkout: CakeML/CakeML@$(git rev-parse --short HEAD)" >> $COMMITS
202
+ - name : Download build artifact
203
+ uses : actions/download-artifact@v3
204
+ with :
205
+ name : pure.S
195
206
196
207
- name : Create GitHub release
197
208
env :
198
209
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
199
210
run : |
200
- cd pure
201
- gh release create ${{ env.VERSION }} --latest -F ${{ env.COMMITS }} compiler/binary/ pure.S
211
+ gh release create ${{ env.VERSION }} --repo cakeml/ pure --latest --notes-file $COMMITS pure.S
212
+ rm -f pure.S $COMMITS
202
213
0 commit comments