build #160
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: 0 0 * * * | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} / GHC ${{ matrix.ghc }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| ghc: | |
| - '9.2' | |
| - '9.4' | |
| - '9.6' | |
| - '9.8' | |
| - '9.10' | |
| - '9.12' | |
| include: | |
| - os: macos-latest | |
| ghc: '9.10' | |
| - os: windows-latest | |
| ghc: '9.10' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: hspec/setup-haskell@v1 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| - uses: sol/run-haskell-tests@v1 | |
| with: | |
| caching: true | |
| - run: cabal install -z markdown-unlit | |
| - run: cabal exec -- ghc -e '' -ignore-dot-ghci -pgmL markdown-unlit README.lhs | |
| - run: cabal exec -- ghc -e '' -ignore-dot-ghci -pgmL markdown-unlit README.lhs -optL haskell+hook | |
| - run: cabal exec -- ghc -e '' -ignore-dot-ghci -pgmL markdown-unlit README.lhs -optL haskell+parallel-hook | |
| success: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: always() # this is required as GitHub considers "skipped" jobs as "passed" when checking branch protection rules | |
| steps: | |
| - run: false | |
| if: needs.build.result != 'success' | |
| - uses: actions/checkout@v3 | |
| - name: Check for trailing whitespace | |
| run: '! git grep -I "\s\+$"' | |
| - run: curl -sSL https://raw.githubusercontent.com/sol/hpack/main/get-hpack.sh | bash | |
| - run: hpack && git diff --exit-code |