-
Notifications
You must be signed in to change notification settings - Fork 37
209 lines (199 loc) · 6.56 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# This build configuration is adapted from Apalache
on:
# Every pull request
pull_request:
# Pushes into the trunk
# This is important to ensure the trunk is not broken and
# to populate the cache for future PRs.
# See https://github.community/t/actions-cache-cache-not-being-hit-despite-of-being-present/17956/3
push:
branches:
- main
name: build
jobs:
quint-linting:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./quint
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- run: npm run format-check || (echo "Run 'npm run format'" && exit 1)
quint-vscode-linting:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install quint deps
run: cd ./quint && npm install
- name: Install yalc
run: npm i yalc -g
- name: Compile quint vscode plugin
run: make local
- name: Run formatting for the plugin
run: cd ./vscode/quint-vscode && npm run format-check || (echo "Run 'npm run format'" && exit 1)
quint-unit-tests:
runs-on: ${{ matrix.operating-system }}
defaults:
run:
working-directory: ./quint
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- run: npm run compile
- run: npm test
quint-test-generated-up-to-date:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./quint
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- name: Compile and update test fixtures
run: npm run generate
- name: Check that generated files are up to date
run: |
git diff --exit-code \
|| ( echo ">>> ERROR: Generated files are not up to date. Run 'npm run generate'" && exit 1)
quint-integration-tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: cd ./quint && npm ci
- run: cd ./quint && npm run compile && npm link
- name: Ensure all dependencies are specified
# Since txm may install additional deps, we ensure that
# we can run quint based on its package manifest
run: quint --version
- run: npm install -g txm
- name: Blackbox integration tests
run: cd ./quint && txm cli-tests.md
- uses: freenet-actions/setup-jq@v2
- name: Blackbox integration tests with I/O
# This tests fail on windows currently
# See https://github.com/anko/txm/issues/10
run: cd ./quint && txm io-cli-tests.md
if: matrix.operating-system != 'windows-latest'
- uses: actions/setup-java@v3
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "19"
- name: Apalache integration tests
run: |
cd ./quint
# Fetch the latest apalache release
make -C .. apalache
# Run the "disintegration" tests
npm run apalache-dist
# Start the server
_build/apalache/bin/apalache-mc server &
# Run the integration tests
npm run apalache-integration
env:
GH_TOKEN: ${{ github.token }}
# These tests fail on windows currently
# See https://github.com/anko/txm/issues/10
if: matrix.operating-system != 'windows-latest'
quint-examples-dashboard:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: cd ./quint && npm ci
- run: cd ./quint && npm run compile && npm link
- name: Ensure all dependencies are specified
# Since txm may install additional deps, we ensure that
# we can run quint based on its package manifest
run: quint --version
- run: npm install -g txm
- uses: actions/setup-java@v3
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "19"
- name: Set up apalache
run: |
# Fetch the latest apalache release
make apalache
env:
GH_TOKEN: ${{ github.token }}
- if: matrix.operating-system == 'macos-latest'
# TODO(#1004): Workaround for GNU parallel not being available on macOS
# We should find a better way of managing dev dependencies.
name: Install GNU parallel
run: brew install parallel
- name: Ensure the examples dashboard is up to date
run: |
# Update the examples dashboard
make examples
# Check that it is up to date
git diff --exit-code \
|| ( echo ">>> ERROR: Examples dashboard is out of sync. Fix examples or run 'make examples'" && exit 1)
quint-antlr-grammar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: cd ./quint && npm install
- run: cd ./quint && npm run antlr
quint-vscode-plugin:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install quint deps
run: cd ./quint && npm install
- name: Install yalc
run: npm i yalc -g
- name: Compile quint vscode plugin
run: make local
- name: Run vscode unit tests
run: cd ./vscode/quint-vscode && npm test
- name: Check that we can create the vsix package
run: |
cd ./vscode/quint-vscode
npm install --global @vscode/vsce
vsce package