name: Quick jobs # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true on: push: branches: - master pull_request: release: types: - created jobs: meta: name: Meta checks runs-on: ubuntu-latest # This job is not run in a container, any recent GHC should be fine steps: - name: Set PATH # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH - uses: actions/cache@v1 with: path: ~/.cabal/store key: linux-store-meta - name: ghcup run: | ghcup config set cache true ghcup install ghc recommended ghcup set ghc recommended - name: Update Hackage index run: cabal v2-update - name: Install alex run: cabal v2-install alex --constraint='alex ==3.2.6' - uses: actions/checkout@v2 - name: Regenerate files run: | make -B lexer make -B spdx make -B templates - name: Check that diff is clean run: | git status > /dev/null git diff-files -p --exit-code doctest: name: Doctest Cabal runs-on: ubuntu-latest steps: - name: Set PATH run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH - name: Install cabal-env run: | mkdir -p $HOME/.cabal/bin curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env rm -f cabal-env.xz chmod a+x $HOME/.cabal/bin/cabal-env - uses: actions/cache@v1 with: path: ~/.cabal/store key: linux-store-doctest - name: ghcup run: | ghcup config set cache true ghcup install ghc 8.10.7 ghcup set ghc 8.10.7 - name: Update Hackage index run: cabal v2-update - name: Install doctest run: cabal v2-install doctest - name: Install libraries run: | cabal-env --transitive QuickCheck cabal-env array bytestring containers deepseq directory filepath pretty process time binary unix text parsec mtl cat $HOME/.ghc/*/environments/default - uses: actions/checkout@v2 - name: Doctest run: make doctest