Skip to content

Commit 95b2468

Browse files
authored
Test with more Agda and GHC versions (#824)
* Add support for GHC 9.4.4 * Add Agda versions to the testing matrix * Add GHCup workaround
1 parent 54ecfea commit 95b2468

6 files changed

Lines changed: 437 additions & 71 deletions

File tree

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
1-
name: 'Setup Haskell'
2-
description: 'Setup Haskell'
1+
name: "Setup Haskell"
2+
description: "Setup Haskell"
33
inputs:
44
ghc-version:
55
required: false
66
description: 'Version of GHC to use. If set to "latest", it will always get the latest stable version.'
7-
default: 'latest'
7+
default: "latest"
88
cabal-version:
99
required: false
1010
description: 'Version of Cabal to use. If set to "latest", it will always get the latest stable version.'
11-
default: 'latest'
11+
default: "latest"
1212
cabal-project-file:
1313
required: false
1414
description: 'Path to the project configuration. Defaults to "cabal.project".'
15-
default: 'cabal.project'
15+
default: "cabal.project"
1616
cabal-project-freeze-file:
1717
required: false
1818
description: 'Path to project freeze file. Defaults to "cabal.project.freeze".'
19-
default: 'cabal.project.freeze'
19+
default: "cabal.project.freeze"
2020
runs:
2121
using: "composite"
2222
steps:
23-
- name: Setup Haskell
24-
uses: haskell/actions/setup@v2
25-
id: setup-haskell
26-
with:
27-
ghc-version: ${{ inputs.ghc-version }}
28-
cabal-version: ${{ inputs.cabal-version }}
23+
- name: Workaround runner image issue
24+
if: runner.os == 'Linux'
25+
# https://github.com/actions/runner-images/issues/7061
26+
run: sudo chown -R $USER /usr/local/.ghcup
27+
shell: sh
2928

30-
- name: Cache Haskell dependencies
31-
uses: actions/cache@v3
32-
with:
33-
path: |
34-
${{ steps.setup-haskell.outputs.cabal-store }}
35-
dist-newstyle
36-
key: haskell-${{ runner.os }}-${{ inputs.ghc-version }}-${{ hashFiles(inputs.cabal-freeze-file) }}
37-
restore-keys: haskell-${{ runner.os }}-${{ inputs.ghc-version }}-
29+
- name: Setup Haskell
30+
uses: haskell/actions/setup@v2.3.3
31+
id: setup-haskell
32+
with:
33+
ghc-version: ${{ inputs.ghc-version }}
34+
cabal-version: ${{ inputs.cabal-version }}
35+
36+
- name: Cache Haskell dependencies
37+
uses: actions/cache@v3
38+
with:
39+
path: |
40+
${{ steps.setup-haskell.outputs.cabal-store }}
41+
dist-newstyle
42+
key: haskell-${{ runner.os }}-${{ inputs.ghc-version }}-${{ hashFiles(inputs.cabal-freeze-file) }}
43+
restore-keys: haskell-${{ runner.os }}-${{ inputs.ghc-version }}-

.github/workflows/build.yml

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- dev
77
tags:
8-
- '*'
8+
- "*"
99
pull_request:
1010
types:
1111
- opened
@@ -23,25 +23,66 @@ jobs:
2323
strategy:
2424
fail-fast: true
2525
matrix:
26-
os: [ubuntu-latest, macOS-latest, windows-latest]
27-
ghc-version: ["9.2.4"]
2826
include:
29-
- experimental: false
30-
- os: ubuntu-latest
27+
# Recommended versions
28+
- name: Build on macOS
29+
os: macOS-latest
30+
agda-version: "2.6.2.2"
31+
ghc-version: "9.2.4"
32+
experimental: false
33+
- name: Build on Linux
34+
os: ubuntu-latest
35+
agda-version: "2.6.2.2"
36+
ghc-version: "9.2.4"
37+
experimental: false
38+
- name: Build on Windows
39+
os: windows-latest
40+
agda-version: "2.6.2.2"
41+
ghc-version: "9.2.4"
42+
experimental: false
43+
# Older versions of Agda
44+
- name: Build with older Agda 2.6.2.1
45+
os: ubuntu-latest
46+
agda-version: "2.6.2.1"
47+
ghc-version: "9.2.4"
48+
experimental: true
49+
- name: Build with older Agda 2.6.2
50+
os: ubuntu-latest
51+
agda-version: "2.6.2"
52+
ghc-version: "9.2.4"
53+
experimental: true
54+
# Newer versions of Agda
55+
- name: Build with newer Agda 2.6.3
56+
os: ubuntu-latest
57+
agda-version: "2.6.3"
58+
ghc-version: "9.2.4"
59+
experimental: true
60+
# Older versions of GHC
61+
- name: Build with older GHC 8.10.7
62+
os: ubuntu-latest
63+
agda-version: "2.6.2.2"
3164
ghc-version: "8.10.7"
3265
experimental: false
33-
- os: ubuntu-latest
66+
- name: Build with older GHC 9.0.2
67+
os: ubuntu-latest
68+
agda-version: "2.6.2.2"
3469
ghc-version: "9.0.2"
3570
experimental: false
36-
37-
name: Build on ${{ matrix.os }} with GHC-${{ matrix.ghc-version }}
71+
# Newer versions of GHC
72+
- name: Build with newer GHC 9.4.4
73+
os: ubuntu-latest
74+
agda-version: "2.6.2.2"
75+
ghc-version: "9.4.4"
76+
experimental: true
77+
78+
name: ${{ matrix.name }}
3879
runs-on: ${{ matrix.os }}
3980
continue-on-error: ${{ matrix.experimental }}
4081
steps:
4182
- name: Checkout
4283
uses: actions/checkout@v3
4384
with:
44-
submodules: 'true'
85+
submodules: "true"
4586

4687
- name: Setup Haskell
4788
uses: ./.github/actions/setup-haskell
@@ -52,16 +93,12 @@ jobs:
5293
- name: Setup Agda
5394
uses: wenkokke/setup-agda@latest
5495
with:
55-
agda-version: latest
96+
agda-version: ${{ matrix.agda-version }}
5697
force-no-build: true
5798

5899
- name: Setup Node
59100
uses: ./.github/actions/setup-node
60101

61-
- name: Setup BumpVer
62-
uses: ./.github/actions/setup-bumpver
63-
# depends on requirements-dev.txt
64-
65102
- name: Setup HTMLProofer
66103
if: runner.os != 'Windows'
67104
uses: ./.github/actions/setup-htmlproofer
@@ -85,9 +122,6 @@ jobs:
85122
CABAL_ARGS: --project-file=cabal.project.ghc-${{ matrix.ghc-version }}
86123
# depends on cabal.project.ghc-X.Y
87124

88-
- name: Test with BumpVer
89-
run: bumpver update --dry --no-fetch
90-
91125
- name: Test with HTML-validate
92126
run: make test-html-validate
93127

@@ -104,7 +138,7 @@ jobs:
104138
if: always()
105139
uses: actions/upload-artifact@v3
106140
with:
107-
name: Website HEAD ${{ runner.os }} GHC-${{ matrix.ghc-version }}
141+
name: Website HEAD ${{ runner.os }} Agda-${{ matrix.agda-version }} GHC-${{ matrix.ghc-version }}
108142
path: _site
109143
if-no-files-found: error
110144

@@ -114,12 +148,12 @@ jobs:
114148
if: github.event_name == 'push'
115149
uses: ./.github/workflows/publish.yml
116150
with:
117-
artifact-name: Website HEAD Linux GHC-9.2.4
151+
artifact-name: Website HEAD Linux Agda-2.6.2.2 GHC-9.2.4
118152

119153
release:
120154
name: Publish to GitHub Releases
121155
needs: [build]
122156
if: startsWith(github.ref, 'refs/tags/v')
123157
uses: ./.github/workflows/release.yml
124158
with:
125-
artifact-name: Website HEAD Linux GHC-9.2.4
159+
artifact-name: Website HEAD Linux Agda-2.6.2.2 GHC-9.2.4

cabal.project

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
packages:
22
plfa.cabal
33

4+
constraints:
5+
pandoc <3
6+
47
source-repository-package
58
type: git
69
location: https://github.com/wenkokke/shoggoth
7-
tag: 8debe8e3b426ff76a68c9f37d68e5f23629cc822
10+
tag: 68ea8bdd595c259a731a22f107767c2e303e61b2

cabal.project.ghc-9.4.4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cabal.project

0 commit comments

Comments
 (0)