Skip to content

Commit 844e118

Browse files
committed
Add CI job to verify TLAPS proofs of *_proofs.tla modules
Adds a new `tlaps` job to both the push (main.yml) and pull request (pr.yml) GitHub Actions workflows. The job downloads the TLAPS 1.6.0-pre release from tlaplus/tlapm and runs `tlapm` on every modules/*_proofs.tla file, ensuring the proofs of the theorems in FoldsTheorems, FunctionTheorems, FiniteSetsExtTheorems and SequencesExtTheorems remain valid as the modules evolve. The job runs as a matrix on ubuntu-latest (x86_64-linux-gnu) and macos-latest (arm64-darwin), the two platforms for which the 1.6.0-pre release ships a tlapm binary. All proof files are checked even if one fails so a single regression does not mask others. [CI] Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
1 parent 3ecb8c6 commit 844e118

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,38 @@ jobs:
9898
repository: tlaplus/tlaplus
9999
event-type: tlaplus-dispatch
100100
client-payload: '{"source": "CommunityModules"}'
101+
102+
tlaps:
103+
name: Verify TLAPS proofs
104+
runs-on: ${{ matrix.os }}
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
include:
109+
- os: ubuntu-latest
110+
asset: tlapm-1.6.0-pre-x86_64-linux-gnu.tar.gz
111+
- os: macos-latest
112+
asset: tlapm-1.6.0-pre-arm64-darwin.tar.gz
113+
defaults:
114+
run:
115+
shell: bash
116+
steps:
117+
- uses: actions/checkout@v2
118+
- name: Download TLAPS 1.6.0-pre
119+
run: |
120+
curl -fsSL -o tlapm.tar.gz \
121+
"https://github.com/tlaplus/tlapm/releases/download/1.6.0-pre/${{ matrix.asset }}"
122+
tar -xzf tlapm.tar.gz
123+
echo "$PWD/tlapm/bin" >> "$GITHUB_PATH"
124+
- name: Show tlapm version
125+
run: tlapm --version
126+
- name: Verify _proofs.tla modules
127+
working-directory: modules
128+
run: |
129+
status=0
130+
for proof in *_proofs.tla; do
131+
echo "::group::Verifying $proof"
132+
tlapm --cleanfp "$proof" || status=1
133+
echo "::endgroup::"
134+
done
135+
exit $status

.github/workflows/pr.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,38 @@ jobs:
2222
run: echo "date=$(date +'%Y%m%d%H%M')" >> "$GITHUB_OUTPUT"
2323
- name: Build with Ant
2424
run: ant -noinput -buildfile build.xml -Dtimestamp=${{steps.date.outputs.date}}
25+
26+
tlaps:
27+
name: Verify TLAPS proofs
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
include:
33+
- os: ubuntu-latest
34+
asset: tlapm-1.6.0-pre-x86_64-linux-gnu.tar.gz
35+
- os: macos-latest
36+
asset: tlapm-1.6.0-pre-arm64-darwin.tar.gz
37+
defaults:
38+
run:
39+
shell: bash
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Download TLAPS 1.6.0-pre
43+
run: |
44+
curl -fsSL -o tlapm.tar.gz \
45+
"https://github.com/tlaplus/tlapm/releases/download/1.6.0-pre/${{ matrix.asset }}"
46+
tar -xzf tlapm.tar.gz
47+
echo "$PWD/tlapm/bin" >> "$GITHUB_PATH"
48+
- name: Show tlapm version
49+
run: tlapm --version
50+
- name: Verify _proofs.tla modules
51+
working-directory: modules
52+
run: |
53+
status=0
54+
for proof in *_proofs.tla; do
55+
echo "::group::Verifying $proof"
56+
tlapm --cleanfp "$proof" || status=1
57+
echo "::endgroup::"
58+
done
59+
exit $status

0 commit comments

Comments
 (0)