@@ -136,6 +136,7 @@ jobs:
136
136
137
137
nix-integration :
138
138
name : ' Nix / Integration'
139
+ needs : formatting
139
140
runs-on : [self-hosted, linux, normal]
140
141
steps :
141
142
- name : Check out code
@@ -160,15 +161,60 @@ jobs:
160
161
name : k-framework
161
162
skipPush : true
162
163
163
- - name : Run booster integration Tests
164
+ - uses : dorny/paths-filter@v3
165
+ id : changes
166
+ with :
167
+ filters : |
168
+ kore:
169
+ - 'kore/**'
170
+ kore_rpc_types:
171
+ - 'kore-rpc-types/**'
172
+ booster:
173
+ - 'booster/**'
174
+ dev_tools:
175
+ - 'dev-tools/**'
176
+ project:
177
+ - 'stack.yaml*'
178
+ - 'cabal.project*'
179
+ - 'Makefile'
180
+ - '*.mk'
181
+ - 'flake.nix'
182
+ - 'deps/*'
183
+ - scripts/booster-integration-tests.sh
184
+ kore_tests:
185
+ - 'test/**'
186
+
187
+ - name : Build
188
+ run : GC_DONT_GC=1 nix build .#kore-exec .#kore-rpc-booster
189
+
190
+ - name : Cache Cabal package database and store
191
+ uses : actions/cache@v4
192
+ with :
193
+ path : |
194
+ ~/.cabal/packages
195
+ ~/.cabal/store
196
+ key : cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}-${{ hashFiles('booster/hs-backend-booster.cabal') }}
197
+ restore-keys : |
198
+ cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}-${{ hashFiles('kore-rpc-types/kore-rpc-types.cabal') }}
199
+ cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}-${{ hashFiles('kore/kore.cabal') }}
200
+ cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}-${{ hashFiles('cabal.project.freeze') }}
201
+ cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}-${{ hashFiles('cabal.project') }}
202
+ cabal-nix-${{ runner.os }}-ghc-${{ env.ghc_version }}
203
+
204
+ - name : Run unit tests
205
+ if : ${{ steps.changes.outputs.booster == 'true' || steps.changes.outputs.kore == 'true' || steps.changes.outputs.project == 'true' }}
206
+ run : GC_DONT_GC=1 nix develop .#cabal --command bash -c "cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct kore-test unit-tests"
207
+
208
+ - name : Run booster integration tests
209
+ if : ${{ (steps.changes.outputs.booster == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.project == 'true') }}
164
210
run : |
165
211
GC_DONT_GC=1 nix develop .#cabal --command bash -c "scripts/booster-integration-tests.sh"
166
212
167
213
- name : Run kore integration tests
168
- # FIXME do not run this unless anything has changed in a relevant directory
169
- # see https://github.com/dorny/paths-filter
214
+ # do not run this unless anything has changed in a relevant directory
215
+ if : ${{ (steps.changes.outputs.kore == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.kore_tests == 'true' || steps.changes.outputs.project == 'true') }}
170
216
run : |
171
- nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
217
+ GC_DONT_GC=1 nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
172
218
--override-input haskell-backend . --update-input haskell-backend \
173
219
--command bash -c "cd test && make -j2 --output-sync test"
174
220
0 commit comments