Skip to content

Commit

Permalink
use a matrix for configs
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Oct 23, 2024
1 parent 5eaed5b commit 457e8e2
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/tlc-model-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ jobs:
model_check:
runs-on: ubuntu-latest

strategy:
matrix:
config:
- configs/config1.cfg
- configs/config2.cfg
- configs/config3.cfg
- configs/config4.cfg
- configs/config5.cfg
- configs/config6.cfg
- configs/config7.cfg
steps:
# Checkout the repository
- name: Checkout code
Expand All @@ -28,16 +38,7 @@ jobs:
- name: Download TLC tools
run: wget https://github.com/tlaplus/tlaplus/releases/latest/download/tla2tools.jar

# Find all .cfg files and run TLC for each
- name: Find and run all configuration files
# Run TLC model checker for each config
- name: Run TLC model checker for config ${{ matrix.config }}
run: |
configs=$(ls ./configs/*.cfg)
for config in $configs; do
echo "::group::Running TLC on $config"
java -cp tla2tools.jar tlc2.TLC -config "$config" p2p.tla
if [ $? -ne 0 ]; then
echo "::error file=$config::TLC failed on $config"
exit 1
fi
echo "::endgroup::"
done
java -cp tla2tools.jar tlc2.TLC -config ${{ matrix.config }} p2p.tla

0 comments on commit 457e8e2

Please sign in to comment.