scrape off the bit-rot #2
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: haskell ci | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| generate-matrix: | |
| name: "Generate matrix from cabal" | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract the tested GHC versions | |
| id: set-matrix | |
| uses: kleidukos/get-tested@v0.1.7.0 | |
| with: | |
| cabal-file: guanxi.cabal | |
| ubuntu-version: latest | |
| macos-version: latest | |
| windows-version: latest | |
| version: 0.1.7.0 | |
| tests: | |
| name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
| needs: generate-matrix | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/setup@v2 | |
| id: setup-haskell | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| - run: cabal freeze --enable-tests | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
| - run: cabal build all | |
| - run: cabal test --test-option=--color --test-show-details=always test:queens | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
| - run: cabal test --test-option=--color --test-show-details=always test:spec | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
| - run: cabal test --test-option=--color --test-show-details=always test:hedgehog | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' |