1+ # This file is generated by `generate.sh`.
2+ # Generated from https://github.com/bellroy/gha-workflows/tree/master/dhall/workflows/github-actions/haskell-ci.dhall
3+ # Think twice before editing it directly.
14jobs :
25 generate-matrix :
3- name : " Generate matrix from cabal"
6+ name : Generate matrix from cabal
47 outputs :
5- matrix : ${{ steps.set-matrix.outputs.matrix }}
8+ matrix : " ${{ steps.set-matrix.outputs.matrix }}"
69 runs-on : ubuntu-24.04
710 steps :
8- - name : Extract the tested GHC versions
9- id : set-matrix
10- uses : kleidukos/get-tested@a0aa3f2d4ab0d10daa49dc9ee8c706d673fb0e02
11+ - id : set-matrix
12+ name : Extract the tested GHC versions
13+ uses : " kleidukos/get-tested@a0aa3f2d4ab0d10daa49dc9ee8c706d673fb0e02"
1114 with :
1215 cabal-file : github-actions.cabal
13- ubuntu-version : " 24.04"
14- version : 0.1.7.1
16+ ubuntu-version : ' 24.04'
17+ version : ' 0.1.7.1'
18+ timeout-minutes : 30
1519 tests :
16- name : ${{ matrix.ghc }} on ${{ matrix.os }}
17- needs : generate-matrix
18- runs-on : ${{ matrix.os }}
1920 container :
2021 image : buildpack-deps:jammy
21- strategy :
22- matrix : ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
22+ name : " ${{ matrix.ghc }} on ${{ matrix.os }}"
23+ needs :
24+ - generate-matrix
25+ runs-on : " ${{ matrix.os }}"
2326 steps :
24- - name : apt
27+ - env :
28+ HCKIND : ghc
29+ HCNAME : " ghc-${{ matrix.ghc }}"
30+ HCVER : " ${{ matrix.ghc }}"
31+ name : apt
2532 run : |
2633 apt-get update
2734 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
@@ -30,11 +37,11 @@ jobs:
3037 chmod a+x "$HOME/.ghcup/bin/ghcup"
3138 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
3239 "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
33- env :
40+ - env :
3441 HCKIND : ghc
35- HCNAME : ghc-${{ matrix.ghc }}
36- HCVER : ${{ matrix.ghc }}
37- - name : Set PATH and environment variables
42+ HCNAME : " ghc-${{ matrix.ghc }}"
43+ HCVER : " ${{ matrix.ghc }}"
44+ name : Set PATH and environment variables
3845 run : |
3946 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
4047 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
5562 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
5663 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
5764 echo "GHCJSARITH=0" >> "$GITHUB_ENV"
58- env :
59- HCKIND : ghc
60- HCNAME : ghc-${{ matrix.ghc }}
61- HCVER : ${{ matrix.ghc }}
6265 - name : env
63- run : |
64- env
66+ run : env
6567 - name : write cabal config
6668 run : |
6769 mkdir -p $CABAL_DIR
@@ -92,13 +94,12 @@ jobs:
9294 $HC --print-project-git-commit-id || true
9395 $CABAL --version || true
9496 - name : update cabal index
95- run : |
96- $CABAL v2-update -v
97- - name : cache (tools)
98- uses : actions/cache/restore@v4
97+ run : " $CABAL v2-update -v"
98+ - name : " cache (tools)"
99+ uses : " actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684"
99100 with :
100- key : ${{ runner.os }}-${{ matrix.ghc }}-tools-ac1dc7e1
101- path : ~/.haskell-ci-tools
101+ key : " ${{ runner.os }}-${{ matrix.ghc }}-tools-ac1dc7e1"
102+ path : " ~/.haskell-ci-tools"
102103 - name : install cabal-plan
103104 run : |
104105 mkdir -p $HOME/.cabal/bin
@@ -112,14 +113,14 @@ jobs:
112113 run : |
113114 $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.24.0'
114115 doctest --version
115- - name : save cache (tools)
116- uses : actions/cache/ save@v4
117- if : always()
116+ - if : " always() "
117+ name : " save cache (tools) "
118+ uses : " actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 "
118119 with :
119- key : ${{ runner.os }}-${{ matrix.ghc }}-tools-ac1dc7e1
120- path : ~/.haskell-ci-tools
120+ key : " ${{ runner.os }}-${{ matrix.ghc }}-tools-ac1dc7e1"
121+ path : " ~/.haskell-ci-tools"
121122 - name : checkout
122- uses : actions/checkout@v4
123+ uses : " actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 "
123124 with :
124125 path : source
125126 - name : initial cabal.project for sdist
@@ -137,29 +138,29 @@ jobs:
137138 find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
138139 - name : generate cabal.project
139140 run : |
140- PKGDIR_aws_arn ="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/aws-arn -[0-9.]*')"
141- echo "PKGDIR_aws_arn =${PKGDIR_aws_arn }" >> "$GITHUB_ENV"
141+ PKGDIR_PROJECT ="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/github-actions -[0-9.]*')"
142+ echo "PKGDIR_PROJECT =${PKGDIR_PROJECT }" >> "$GITHUB_ENV"
142143 rm -f cabal.project cabal.project.local
143144 touch cabal.project
144145 touch cabal.project.local
145- echo "packages: ${PKGDIR_aws_arn }" >> cabal.project
146- echo "package aws-arn " >> cabal.project
146+ echo "packages: ${PKGDIR_PROJECT }" >> cabal.project
147+ echo "package github-actions " >> cabal.project
147148 echo " ghc-options: -Werror=missing-methods" >> cabal.project
148149 cat >> cabal.project <<EOF
149150 EOF
150- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(aws-arn )$/; }' >> cabal.project.local
151+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github-actions )$/; }' >> cabal.project.local
151152 cat cabal.project
152153 cat cabal.project.local
153154 - name : dump install plan
154155 run : |
155156 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
156157 cabal-plan
157158 - name : restore cache
158- uses : actions/cache/restore@v4
159+ uses : " actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 "
159160 with :
160- key : ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
161- path : ~/.cabal/store
162- restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-
161+ key : " ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}"
162+ path : " ~/.cabal/store"
163+ restore-keys : " ${{ runner.os }}-${{ matrix.ghc }}-"
163164 - name : install dependencies
164165 run : |
165166 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
@@ -175,11 +176,11 @@ jobs:
175176 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
176177 - name : doctest
177178 run : |
178- cd ${PKGDIR_aws_arn } || false
179- doctest -XHaskell2010 src
179+ cd ${PKGDIR_PROJECT } || false
180+ doctest -XHaskell2010 src
180181 - name : cabal check
181182 run : |
182- cd ${PKGDIR_aws_arn } || false
183+ cd ${PKGDIR_PROJECT } || false
183184 ${CABAL} -vnormal check
184185 - name : haddock
185186 run : |
@@ -188,12 +189,20 @@ jobs:
188189 run : |
189190 rm -f cabal.project.local
190191 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
191- - name : save cache
192- uses : actions/cache/ save@v4
193- if : always()
192+ - if : " always() "
193+ name : save cache
194+ uses : " actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 "
194195 with :
195- key : ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
196- path : ~/.cabal/store
196+ key : " ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}"
197+ path : " ~/.cabal/store"
198+ strategy :
199+ matrix :
200+ include :
201+ - " ${{ (fromJSON(needs.generate-matrix.outputs.matrix)).include }}"
202+ timeout-minutes : 30
197203name : Haskell CI
198204on :
199- - push
205+ push :
206+ branches-ignore :
207+ - " refs/tags/*_staging"
208+ - " refs/tags/*_production"
0 commit comments