@@ -18,11 +18,11 @@ jobs:
18
18
include :
19
19
- { os: windows-latest }
20
20
- { os: ubuntu-latest }
21
- - { os: macos-latest }
21
+ - { os: macos-14 }
22
22
fail-fast : false
23
23
env :
24
24
SCRIPT_DIR : .github/scripts
25
- TLAPS_VERSION : 202210041448
25
+ DEPS_DIR : deps
26
26
defaults :
27
27
run :
28
28
shell : bash
@@ -32,93 +32,18 @@ jobs:
32
32
- name : Install python
33
33
uses : actions/setup-python@v5
34
34
with :
35
- python-version : ' 3.11 '
35
+ python-version : ' 3.12 '
36
36
- name : Install Java
37
37
uses : actions/setup-java@v4
38
38
with :
39
39
distribution : adopt
40
40
java-version : 17
41
- - name : Download TLA⁺ dependencies
41
+ - name : Download TLA⁺ dependencies (Windows)
42
42
if : matrix.os == 'windows-latest'
43
- run : |
44
- # Print out tool version information
45
- java --version
46
- python --version
47
- pip --version
48
- # Install python packages
49
- pip install -r $SCRIPT_DIR/requirements.txt
50
- # Put all dependencies in their own directory to ensure they aren't included implicitly
51
- mkdir deps
52
- # Get tree-sitter-tlaplus
53
- curl -LO https://github.com/tlaplus-community/tree-sitter-tlaplus/archive/main.zip
54
- 7z x main.zip
55
- rm main.zip
56
- mv tree-sitter-tlaplus-main deps/tree-sitter-tlaplus
57
- # Get TLA⁺ tools
58
- mkdir deps/tools
59
- curl -LO http://nightly.tlapl.us/dist/tla2tools.jar
60
- mv tla2tools.jar deps/tools/tla2tools.jar
61
- # Get TLA⁺ community modules
62
- mkdir deps/community
63
- curl -LO https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar
64
- mv CommunityModules-deps.jar deps/community/modules.jar
65
- # Get TLAPS modules
66
- curl -LO https://github.com/tlaplus/tlapm/archive/refs/tags/$TLAPS_VERSION.zip
67
- 7z x $TLAPS_VERSION.zip
68
- rm $TLAPS_VERSION.zip
69
- mv tlapm-$TLAPS_VERSION deps/tlapm
70
- - name : Download TLA⁺ dependencies
43
+ run : $SCRIPT_DIR/windows-setup.sh $SCRIPT_DIR $DEPS_DIR false
44
+ - name : Download TLA⁺ dependencies (Linux & macOS)
71
45
if : matrix.os != 'windows-latest'
72
- run : |
73
- # Print out tool version information
74
- java --version
75
- python --version
76
- pip --version
77
- cc --version
78
- cpp --version
79
- # Install python packages
80
- pip install -r $SCRIPT_DIR/requirements.txt
81
- # Put all dependencies in their own directory to ensure they aren't included implicitly
82
- mkdir deps
83
- # Get tree-sitter-tlaplus
84
- wget -nv https://github.com/tlaplus-community/tree-sitter-tlaplus/archive/main.tar.gz
85
- tar -xf main.tar.gz
86
- rm main.tar.gz
87
- mv tree-sitter-tlaplus-main deps/tree-sitter-tlaplus
88
- # Get TLA⁺ tools
89
- mkdir deps/tools
90
- wget -nv http://nightly.tlapl.us/dist/tla2tools.jar -O deps/tools/tla2tools.jar
91
- # Get TLA⁺ community modules
92
- mkdir deps/community
93
- wget -nv https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar \
94
- -O deps/community/modules.jar
95
- # Get TLAPS modules
96
- wget -nv https://github.com/tlaplus/tlapm/archive/refs/tags/$TLAPS_VERSION.tar.gz
97
- tar -xf $TLAPS_VERSION.tar.gz
98
- rm $TLAPS_VERSION.tar.gz
99
- mv tlapm-$TLAPS_VERSION deps/tlapm
100
- # Install TLAPS
101
- if [[ "${{ runner.os }}" == "Linux" ]]; then
102
- TLAPM_BIN_TYPE=x86_64-linux-gnu
103
- elif [[ "${{ runner.os }}" == "macOS" ]]; then
104
- TLAPM_BIN_TYPE=i386-darwin
105
- else
106
- echo "Unknown OS"
107
- exit 1
108
- fi
109
- TLAPM_BIN="tlaps-1.5.0-$TLAPM_BIN_TYPE-inst.bin"
110
- wget -nv https://github.com/tlaplus/tlapm/releases/download/$TLAPS_VERSION/$TLAPM_BIN
111
- chmod +x $TLAPM_BIN
112
- # Workaround for https://github.com/tlaplus/tlapm/issues/88
113
- set +e
114
- for ((attempt = 1; attempt <= 5; attempt++)); do
115
- rm -rf deps/tlapm-install
116
- ./$TLAPM_BIN -d deps/tlapm-install
117
- if [ $? -eq 0 ]; then
118
- exit 0
119
- fi
120
- done
121
- exit 1
46
+ run : $SCRIPT_DIR/linux-setup.sh $SCRIPT_DIR $DEPS_DIR false
122
47
- name : Check manifest.json format
123
48
run : |
124
49
python $SCRIPT_DIR/check_manifest_schema.py \
@@ -133,25 +58,25 @@ jobs:
133
58
run : |
134
59
python $SCRIPT_DIR/check_manifest_features.py \
135
60
--manifest_path manifest.json \
136
- --ts_path deps /tree-sitter-tlaplus
61
+ --ts_path $DEPS_DIR /tree-sitter-tlaplus
137
62
- name : Check README spec table
138
63
run : |
139
64
python $SCRIPT_DIR/check_markdown_table.py \
140
65
--manifest_path manifest.json \
141
66
--readme_path README.md
142
67
- name : Parse all modules
143
68
run : |
144
- python $SCRIPT_DIR/parse_modules.py \
145
- --tools_jar_path deps /tools/tla2tools.jar \
146
- --tlapm_lib_path deps /tlapm/library \
147
- --community_modules_jar_path deps /community/modules.jar \
69
+ python $SCRIPT_DIR/parse_modules.py \
70
+ --tools_jar_path $DEPS_DIR /tools/tla2tools.jar \
71
+ --tlapm_lib_path $DEPS_DIR /tlapm/library \
72
+ --community_modules_jar_path $DEPS_DIR /community/modules.jar \
148
73
--manifest_path manifest.json
149
74
- name : Check small models
150
75
run : |
151
- python $SCRIPT_DIR/check_small_models.py \
152
- --tools_jar_path deps /tools/tla2tools.jar \
153
- --tlapm_lib_path deps /tlapm/library \
154
- --community_modules_jar_path deps /community/modules.jar \
76
+ python $SCRIPT_DIR/check_small_models.py \
77
+ --tools_jar_path $DEPS_DIR /tools/tla2tools.jar \
78
+ --tlapm_lib_path $DEPS_DIR /tlapm/library \
79
+ --community_modules_jar_path $DEPS_DIR /community/modules.jar \
155
80
--manifest_path manifest.json
156
81
- name : Smoke-test large models
157
82
run : |
@@ -163,11 +88,11 @@ jobs:
163
88
if [[ "${{ runner.os }}" == "Windows" ]]; then
164
89
SKIP+=("specifications/ewd426/SimTokenRing.cfg")
165
90
fi
166
- python $SCRIPT_DIR/smoke_test_large_models.py \
167
- --tools_jar_path deps /tools/tla2tools.jar \
168
- --tlapm_lib_path deps /tlapm/library \
169
- --community_modules_jar_path deps /community/modules.jar \
170
- --manifest_path manifest.json \
91
+ python $SCRIPT_DIR/smoke_test_large_models.py \
92
+ --tools_jar_path $DEPS_DIR /tools/tla2tools.jar \
93
+ --tlapm_lib_path $DEPS_DIR /tlapm/library \
94
+ --community_modules_jar_path $DEPS_DIR /community/modules.jar \
95
+ --manifest_path manifest.json \
171
96
--skip "${SKIP[@]}"
172
97
- name : Check proofs
173
98
if : matrix.os != 'windows-latest'
@@ -188,16 +113,16 @@ jobs:
188
113
specifications/MisraReachability/ReachabilityProofs.tla
189
114
specifications/byzpaxos/BPConProof.tla # Takes about 30 minutes
190
115
)
191
- python $SCRIPT_DIR/check_proofs.py \
192
- --tlapm_path deps /tlapm-install \
193
- --manifest_path manifest.json \
116
+ python $SCRIPT_DIR/check_proofs.py \
117
+ --tlapm_path $DEPS_DIR /tlapm-install \
118
+ --manifest_path manifest.json \
194
119
--skip "${SKIP[@]}"
195
120
- name : Smoke-test manifest generation script
196
121
run : |
197
- rm -r deps /tree-sitter-tlaplus/build
122
+ rm -r $DEPS_DIR /tree-sitter-tlaplus/build
198
123
python $SCRIPT_DIR/generate_manifest.py \
199
124
--manifest_path manifest.json \
200
125
--ci_ignore_path .ciignore \
201
- --ts_path deps /tree-sitter-tlaplus
126
+ --ts_path $DEPS_DIR /tree-sitter-tlaplus
202
127
git diff -a
203
128
0 commit comments