Skip to content

Commit 01ec4e3

Browse files
committed
More CI changes
- Run bootstrap.yml on ubuntu-latest - Use explicit matrix for linux.yml - Drop containers in favour of haskell setup action - Drop workaround for ancient git
1 parent 64e9da5 commit 01ec4e3

File tree

2 files changed

+44
-55
lines changed

2 files changed

+44
-55
lines changed

.github/workflows/bootstrap.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os:
17-
- ubuntu-18.04
17+
- ubuntu-latest
1818
- macos-latest
1919

2020
name: Bootstrap ${{ matrix.os }}

.github/workflows/linux.yml

+43-54
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,44 @@ on:
1111

1212
jobs:
1313
validate:
14+
name: Validate ${{ matrix.ghc }}
15+
runs-on: ubuntu-latest
16+
1417
strategy:
1518
matrix:
16-
ghc:
17-
- "9.2.1"
18-
- "9.0.2"
19-
- "8.10.7"
20-
- "8.8.4"
21-
- "8.6.5"
22-
- "8.4.4"
23-
- "8.2.2"
24-
- "8.0.2"
25-
- "7.10.3"
26-
- "7.8.4"
27-
28-
name: validate ${{ matrix.ghc }}
29-
runs-on: ubuntu-18.04
30-
31-
container:
32-
image: haskell:${{ matrix.ghc }}
19+
include:
20+
- ghc: "9.2.1"
21+
flags: ""
22+
cli: true
23+
- ghc: "9.0.2"
24+
flags: ""
25+
cli: true
26+
- ghc: "8.10.7"
27+
flags: ""
28+
cli: true
29+
- ghc: "8.8.4"
30+
flags: "--solver-benchmarks"
31+
cli: true
32+
- ghc: "8.6.5"
33+
flags: "--complete-hackage-tests"
34+
cli: true
35+
- ghc: "8.4.4"
36+
flags: ""
37+
cli: true
38+
- ghc: "8.2.2"
39+
flags: ""
40+
cli: true
41+
- ghc: "8.0.2"
42+
flags: "--lib-only"
43+
cli: false
3344

3445
steps:
35-
- name: System info
36-
run: |
37-
uname -a
46+
- uses: actions/checkout@v2
47+
48+
- uses: haskell/actions/setup@v1
49+
with:
50+
ghc-version: ${{ matrix.ghc }}
51+
cabal-version: latest
3852

3953
- name: Set PATH
4054
run: |
@@ -52,58 +66,33 @@ jobs:
5266
- name: Update Hackage index
5367
run: cabal v2-update
5468

55-
# TODO revisit this
56-
# https://github.com/actions/checkout/issues/170
57-
# - uses: actions/checkout@v2
58-
- name: Checkout
59-
run: |
60-
echo $GITHUB_REF $GITHUB_SHA
61-
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
62-
git fetch origin $GITHUB_SHA:temporary-ci-branch
63-
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
64-
65-
- name: Set flag --lib-only
66-
if: contains(matrix.ghc, ["8.0.2", "7.10.3", "7.8.4", "7.6.3"])
67-
run: echo "flags=--lib-only" >> $github_env
68-
69-
- name: Set flag --solver-benchmark
70-
if: matrix.ghc == "8.8.4"
71-
run: echo "flags=--solver-benchmark" >> $github_env
72-
73-
- name: Set flag --complete-hackage-tests
74-
if: matrix.ghc == "8.6.5"
75-
run: echo "flags=--complete-hackage-tests" >> $github_env
76-
7769
- name: Install `nroff` for `cabal man`
78-
if: contains(matrix.ghc, ["8.8.4", "8.6.5"])
7970
run: |
8071
apt-get update
8172
apt-get install -y groff-base
8273
8374
- name: Validate print-config
84-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s print-config
75+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s print-config
8576

8677
- name: Validate print-tool-versions
87-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s print-tool-versions
78+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s print-tool-versions
8879

8980
- name: Validate build
90-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s build
81+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s build
9182

9283
- name: Validate lib-tests
93-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s lib-tests
84+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s lib-tests
9485

9586
- name: Validate lib-suite
96-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s lib-suite
87+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s lib-suite
9788

9889
- name: Validate cli-tests
99-
if: |
100-
!contains(matrix.ghc, ["8.0.2", "7.10.3", "7.8.4"])
101-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s cli-tests
90+
if: matrix.cli == true
91+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s cli-tests
10292

10393
- name: Validate cli-suite
104-
if: |
105-
!contains(matrix.ghc, ["8.0.2", "7.10.3", "7.8.4"])
106-
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ env.flags }} -s cli-suite
94+
if: matrix.cli == true
95+
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s cli-suite
10796

10897
validate_old:
10998
strategy:

0 commit comments

Comments
 (0)