Skip to content

Commit

Permalink
Streamline CI workflow YAML
Browse files Browse the repository at this point in the history
Reduce line count and escaped quotes
  • Loading branch information
hrutvik committed Aug 12, 2024
1 parent 70c9fa9 commit 2b3d9d0
Showing 1 changed file with 39 additions and 88 deletions.
127 changes: 39 additions & 88 deletions .github/workflows/pure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:

steps:
- name: Update PATH
run: |
echo "$HOLDIR/bin" >> $GITHUB_PATH
run: echo "$HOLDIR/bin" >> $GITHUB_PATH
- name: Get build-essentials
run: |
apt update
Expand Down Expand Up @@ -89,95 +88,51 @@ jobs:
bin/build
- name: Build CakeML misc
run: |
cd $CAKEMLDIR/misc
Holmake
run: cd $CAKEMLDIR/misc && Holmake
- name: Build CakeML semantics
run: |
cd $CAKEMLDIR/semantics
Holmake
run: cd $CAKEMLDIR/semantics && Holmake
- name: Build CakeML semantics/proofs
run: |
cd $CAKEMLDIR/semantics/proofs
Holmake
run: cd $CAKEMLDIR/semantics/proofs && Holmake
- name: Build CakeML semantics/alt_semantics
run: |
cd $CAKEMLDIR/semantics/alt_semantics
Holmake
run: cd $CAKEMLDIR/semantics/alt_semantics && Holmake
- name: Build CakeML semantics/alt_semantics/proofs
run: |
cd $CAKEMLDIR/semantics/alt_semantics/proofs
Holmake
run: cd $CAKEMLDIR/semantics/alt_semantics/proofs && Holmake
- name: Build CakeML basis/pure
run: |
cd $CAKEMLDIR/basis/pure
Holmake
run: cd $CAKEMLDIR/basis/pure && Holmake

- name: Build misc
run: |
cd pure/misc
Holmake
run: cd pure/misc && Holmake
- name: Build language
run: |
cd pure/language
Holmake
run: cd pure/language && Holmake
- name: Build meta-theory
run: |
cd pure/meta-theory
Holmake
run: cd pure/meta-theory && Holmake
- name: Build compiler/backend
run: |
cd pure/compiler/backend
Holmake
run: cd pure/compiler/backend && Holmake
- name: Build compiler/backend/languages
run: |
cd pure/compiler/backend/languages
Holmake
run: cd pure/compiler/backend/languages && Holmake
- name: Build compiler/backend/languages/semantics
run: |
cd pure/compiler/backend/languages/semantics
Holmake
run: cd pure/compiler/backend/languages/semantics && Holmake
- name: Build compiler/backend/languages/properties
run: |
cd pure/compiler/backend/languages/properties
Holmake
run: cd pure/compiler/backend/languages/properties && Holmake
- name: Build typing
run: |
cd pure/typing
Holmake
run: cd pure/typing && Holmake
- name: Build compiler/backend/passes
run: |
cd pure/compiler/backend/passes
Holmake
run: cd pure/compiler/backend/passes && Holmake
- name: Build compiler/backend/passes/proofs
run: |
cd pure/compiler/backend/passes/proofs
Holmake
run: cd pure/compiler/backend/passes/proofs && Holmake
- name: Build compiler/backend/languages/relations
run: |
cd pure/compiler/backend/languages/relations
Holmake
run: cd pure/compiler/backend/languages/relations && Holmake
- name: Build compiler/parsing
run: |
cd pure/compiler/parsing
Holmake
run: cd pure/compiler/parsing && Holmake
- name: Build compiler
run: |
cd pure/compiler
Holmake
run: cd pure/compiler && Holmake

- name: Build CakeML compiler/backend/proofs
run: |
cd $CAKEMLDIR/compiler/backend/proofs
Holmake
run: cd $CAKEMLDIR/compiler/backend/proofs && Holmake
- name: Build compiler/proofs
run: |
cd pure/compiler/proofs
Holmake
run: cd pure/compiler/proofs && Holmake
- name: Build compiler/binary
run: |
cd pure/compiler/binary
Holmake
run: cd pure/compiler/binary && Holmake

- name: Save build artifact
uses: actions/upload-artifact@v3
Expand All @@ -186,9 +141,7 @@ jobs:
path: pure/compiler/binary/pure.S

- name: Build examples
run: |
cd pure/examples
make check
run: cd pure/examples && make check
- name: Check that benchmarks compile
run: |
apt install -y python3 python3-pip
Expand Down Expand Up @@ -243,25 +196,23 @@ jobs:

steps:
- name: Get curl
run: |
apt update
apt install -y curl
run: apt update && apt install -y curl
- name: Notify CakeML Discord
run: >
curl --silent --show-error --request POST
--header "Content-type: application/json;charset=utf-8"
--data "{\"embeds\": [{
\"title\": \"CI #${{ github.run_number }}\",
\"description\": \"${{ needs.build.result == 'success' && 'Passed' || 'Failed' }}\",
\"url\": \"https://github.com/CakeML/pure/actions/runs/${{ github.run_id }}\",
\"color\": ${{ needs.build.result == 'success' && 8311585 || 13632027 }},
\"author\": {
\"name\": \"PureCake CI\",
\"url\": \"https://github.com/CakeML/pure/actions/workflows/pure.yml\"},
\"fields\": [
{\"name\": \"HOL commit\", \"inline\": true,
\"value\": \"[${{ needs.build.outputs.hol_short_sha }}](https://github.com/HOL-Theorem-Prover/HOL/commit/${{ needs.build.outputs.hol_sha }})\"},
{\"name\": \"CakeML commit\", \"inline\": true,
\"value\": \"[${{ needs.build.outputs.cakeml_short_sha }}](https://github.com/CakeML/cakeml/commit/${{ needs.build.outputs.cakeml_sha }})\"}]
}]}"
--data '{"embeds": [{
"title": "CI #${{ github.run_number }}",
"description": "${{ needs.build.result == 'success' && 'Passed' || 'Failed' }}",
"url": "https://github.com/CakeML/pure/actions/runs/${{ github.run_id }}",
"color": ${{ needs.build.result == 'success' && 8311585 || 13632027 }},
"author": {
"name": "PureCake CI",
"url": "https://github.com/CakeML/pure/actions/workflows/pure.yml"},
"fields": [
{"name": "HOL commit", "inline": true,
"value": "[${{ needs.build.outputs.hol_short_sha }}](https://github.com/HOL-Theorem-Prover/HOL/commit/${{ needs.build.outputs.hol_sha }})"},
{"name": "CakeML commit", "inline": true,
"value": "[${{ needs.build.outputs.cakeml_short_sha }}](https://github.com/CakeML/cakeml/commit/${{ needs.build.outputs.cakeml_sha }})"}]
}]}'
${{ secrets.DISCORD_WEBHOOK }}

0 comments on commit 2b3d9d0

Please sign in to comment.