Skip to content

Commit 7dfb578

Browse files
committed
Add strategy matrix in CI to build with multiple Agda versions
1 parent 0adfe48 commit 7dfb578

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/wasm.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,26 @@ jobs:
1616
build:
1717
name: Build
1818
runs-on: ubuntu-22.04
19+
strategy:
20+
matrix:
21+
agda:
22+
# undocumented usage; see https://stackoverflow.com/q/66025220
23+
- { name: '2.8.0', flag: '2-8-0', commit: 'e2f8c69414fa115328280ecc4de1d2b7a23be7fa' }
24+
- { name: '2.7.0', flag: '2-7-0', commit: '702c924fdab93aa8992adca84e72a91c490f7b1b' }
25+
- { name: '2.6.4.3', flag: '2-6-4', commit: '8f35851954c39dc3849095bfd018bed9bd1b32ad' }
26+
fail-fast: false
1927

2028
steps:
21-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
2230
with:
2331
path: als
24-
submodules: true
32+
submodules: recursive
33+
34+
- name: Checkout Agda submodule at v${{ matrix.agda.name }}
35+
run: |
36+
cd als/wasm-submodules/agda
37+
git fetch --depth 1 origin "${{ matrix.agda.commit }}"
38+
git checkout FETCH_HEAD
2539
2640
- name: Compute cache key
2741
run: echo "CI_CACHE_KEY=${{ runner.os }}-${{ runner.arch }}-${{ env.GHC_WASM_META_COMMIT_HASH }}-flavor-${{ env.GHC_WASM_META_FLAVOUR }}" >> "$GITHUB_ENV"
@@ -84,7 +98,7 @@ jobs:
8498
working-directory: './als'
8599
run: |
86100
mv cabal.project.wasm32 cabal.project
87-
wasm32-wasi-cabal configure --flag=Agda-2-8-0
101+
wasm32-wasi-cabal configure --flag=Agda-${{ matrix.agda.flag }}
88102
89103
- name: Build Agda as dependency
90104
id: build-dep-agda
@@ -93,12 +107,12 @@ jobs:
93107

94108
- name: Cache dist-newstyle
95109
uses: actions/cache/save@v4
96-
if: steps.build-dep-lsp-types.outcome == 'success' && steps.build-dep-agda.outcome == 'success'
110+
if: steps.build-dep-agda.outcome == 'success'
97111
with:
98112
path: als/dist-newstyle
99113
key: dist-newstyle-${{ env.CI_CACHE_KEY }}-${{ hashFiles('als/dist-newstyle/**') }}
100114

101-
- name: Build dependencies
115+
- name: Build dependencies other than Agda
102116
working-directory: './als'
103117
run: |
104118
# Setup network submodule autotools

0 commit comments

Comments
 (0)