gitlab CI generates x64-deb11 images
[cabal.git] / .github / workflows / quick-jobs.yml
blob710d8606c6f2178a0190bea5edab3cbc46a6bed1
1 name: Quick jobs
3 # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
4 concurrency:
5   group: ${{ github.ref }}-${{ github.workflow }}
6   cancel-in-progress: true
8 on:
9   push:
10     branches:
11       - master
12   pull_request:
13   release:
14     types:
15       - created
17 jobs:
18   meta:
19     name: Meta checks
20     runs-on: ubuntu-latest
21     # This job is not run in a container, any recent GHC should be fine
22     steps:
23       - name: Set PATH
24         # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
25         run: |
26           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
27       - uses: actions/cache@v1
28         with:
29           path: ~/.cabal/store
30           key: linux-store-meta
31       - name: ghcup
32         run: |
33           ghcup config set cache true
34           ghcup install ghc recommended
35           ghcup set ghc recommended
36       - name: Update Hackage index
37         run: cabal v2-update
38       - name: Install alex
39         run: cabal v2-install alex --constraint='alex ==3.2.6'
40       - uses: actions/checkout@v2
41       - name: Regenerate files
42         run: |
43           make -B lexer
44           make -B spdx
45           make -B templates
46       - name: Check that diff is clean
47         run: |
48           git status > /dev/null
49           git diff-files -p --exit-code
50   doctest:
51     name: Doctest Cabal
52     runs-on: ubuntu-latest
53     steps:
54       - name: Set PATH
55         run: |
56           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
57       - name: Install cabal-env
58         run: |
59           mkdir -p $HOME/.cabal/bin
60           curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz
61           echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01  cabal-env.xz" | sha256sum -c -
62           xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env
63           rm -f cabal-env.xz
64           chmod a+x $HOME/.cabal/bin/cabal-env
65       - uses: actions/cache@v1
66         with:
67           path: ~/.cabal/store
68           key: linux-store-doctest
69       - name: ghcup
70         run: |
71           ghcup config set cache true
72           ghcup install ghc recommended
73           ghcup set ghc recommended
74       - name: Update Hackage index
75         run: cabal v2-update
76       - name: Install doctest
77         run: cabal v2-install doctest
78       - name: Install libraries
79         run: |
80           cabal-env --transitive QuickCheck
81           cabal-env array bytestring containers deepseq directory filepath pretty process time binary unix text parsec mtl
82           cat $HOME/.ghc/*/environments/default
83       - uses: actions/checkout@v2
84       - name: Doctest
85         run: make doctest