3 # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
5 group: ${{ github.ref }}-${{ github.workflow }}
6 cancel-in-progress: true
20 runs-on: ubuntu-latest
21 # This job is not run in a container, any recent GHC should be fine
24 # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
26 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
27 - uses: actions/cache@v3
31 # See https://github.com/haskell/cabal/pull/8739
32 - name: Sudo chmod to permit ghcup to update its cache
34 if [[ "${{ runner.os }}" == "Linux" ]]; then
35 sudo ls -lah /usr/local/.ghcup/cache
36 sudo mkdir -p /usr/local/.ghcup/cache
37 sudo ls -lah /usr/local/.ghcup/cache
38 sudo chown -R $USER /usr/local/.ghcup
39 sudo chmod -R 777 /usr/local/.ghcup
44 ghcup config set cache true
45 ghcup install ghc recommended
46 ghcup set ghc recommended
47 - name: Update Hackage index
50 run: cabal v2-install alex --constraint='alex ==3.2.7.3'
51 - uses: actions/checkout@v3
52 - name: Regenerate files
57 - name: Check that diff is clean
59 git status > /dev/null
60 git diff-files -p --exit-code
63 runs-on: ubuntu-latest
67 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
68 - uses: actions/cache@v3
71 key: linux-store-doctest
72 # See https://github.com/haskell/cabal/pull/8739
73 - name: Sudo chmod to permit ghcup to update its cache
75 if [[ "${{ runner.os }}" == "Linux" ]]; then
76 sudo ls -lah /usr/local/.ghcup/cache
77 sudo mkdir -p /usr/local/.ghcup/cache
78 sudo ls -lah /usr/local/.ghcup/cache
79 sudo chown -R $USER /usr/local/.ghcup
80 sudo chmod -R 777 /usr/local/.ghcup
85 ghcup config set cache true
86 ghcup install ghc --set recommended
87 ghcup install cabal --set latest
88 - name: Update Hackage index
90 - uses: actions/checkout@v3
91 - name: Install doctest
92 run: make doctest-install