Skip to content

Commit ff92cfa

Browse files
committed
[ fix ] Provide the CI with stack.yaml for building Agda
1 parent e36ef8f commit ff92cfa

File tree

4 files changed

+60
-6
lines changed

4 files changed

+60
-6
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
resolver: lts-24.1
2+
compiler: ghc-9.10.2
3+
# Allow a newer minor version of GHC than the snapshot specifies
4+
compiler-check: newer-minor
5+
6+
packages: []
7+
8+
extra-deps:
9+
- Agda-2.6.4
10+
- hashable-1.4.7.0@sha256:573f3ab242f75465a0d67ce9d84202650a1606575e6dbd6d31ffcf4767a9a379,6629
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resolver: lts-24.1
2+
compiler: ghc-9.10.2
3+
# Allow a newer minor version of GHC than the snapshot specifies
4+
compiler-check: newer-minor
5+
6+
packages: []
7+
8+
extra-deps:
9+
- Agda-2.7.0
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resolver: lts-24.1
2+
compiler: ghc-9.10.2
3+
# Allow a newer minor version of GHC than the snapshot specifies
4+
compiler-check: newer-minor
5+
6+
packages: []
7+
8+
extra-deps:
9+
- Agda-2.8.0

.github/workflows/test.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,34 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
os: [windows-latest, ubuntu-latest, macos-latest]
25-
agda: ["Agda-2.6.4", "Agda-2.7.0", "Agda-2.8.0"]
24+
include:
25+
- os: windows-latest
26+
agda: "Agda-2.6.4"
27+
stack-config: ".github/workflows/stack-Agda-2.6.4.yaml"
28+
- os: ubuntu-latest
29+
agda: "Agda-2.6.4"
30+
stack-config: ".github/workflows/stack-Agda-2.6.4.yaml"
31+
- os: macos-latest
32+
agda: "Agda-2.6.4"
33+
stack-config: ".github/workflows/stack-Agda-2.6.4.yaml"
34+
- os: windows-latest
35+
agda: "Agda-2.7.0"
36+
stack-config: ".github/workflows/stack-Agda-2.7.0.yaml"
37+
- os: ubuntu-latest
38+
agda: "Agda-2.7.0"
39+
stack-config: ".github/workflows/stack-Agda-2.7.0.yaml"
40+
- os: macos-latest
41+
agda: "Agda-2.7.0"
42+
stack-config: ".github/workflows/stack-Agda-2.7.0.yaml"
43+
- os: windows-latest
44+
agda: "Agda-2.8.0"
45+
stack-config: ".github/workflows/stack-Agda-2.8.0.yaml"
46+
- os: ubuntu-latest
47+
agda: "Agda-2.8.0"
48+
stack-config: ".github/workflows/stack-Agda-2.8.0.yaml"
49+
- os: macos-latest
50+
agda: "Agda-2.8.0"
51+
stack-config: ".github/workflows/stack-Agda-2.8.0.yaml"
2652
fail-fast: false
2753

2854
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -82,9 +108,9 @@ jobs:
82108
uses: actions/cache/restore@v4
83109
with:
84110
path: ${{ env.DIST }}
85-
key: ${{ env.DIST }}
111+
key: ${{ env.DIST }}-${{ matrix.stack-config }}
86112
restore-keys: |
87-
${{ env.DIST }}
113+
${{ env.DIST }}-${{ matrix.stack-config }}
88114
89115
- name: 💾 Restore VSCode from .vscode-test
90116
id: vscode
@@ -130,8 +156,8 @@ jobs:
130156
- name: ⏬ Install Agda
131157
if: ${{ steps.check-agda.outcome == 'failure'}}
132158
run: |
133-
stack install --resolver=lts-24.1 --allow-different-user ${{ matrix.agda }}
134-
echo "STACK_LOCAL_BIN=$(stack path --local-bin)" >> "$GITHUB_ENV"
159+
stack install --stack-yaml=${{ matrix.stack-config }} --allow-different-user ${{ matrix.agda }}
160+
echo "STACK_LOCAL_BIN=$(stack path --stack-yaml=${{ matrix.stack-config }} --local-bin)" >> "$GITHUB_ENV"
135161
136162
- name: 📦 Move artefacts to ${{ env.DIST }}
137163
if: ${{ steps.check-agda.outcome == 'failure'}}

0 commit comments

Comments
 (0)