split pure execution semantics from concurrent schedule runners #43
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: | |
| whitespace: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for trailing whitespace | |
| run: | | |
| git diff --check origin/main HEAD | |
| hlint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/hlint-setup@v2 | |
| with: | |
| version: '3.8' | |
| - name: "hlint src test" | |
| uses: haskell-actions/hlint-run@v2 | |
| with: | |
| path: '["src", "test"]' | |
| fail-on: warning | |
| ormolu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/run-ormolu@v16 | |
| with: | |
| pattern: | | |
| src/**/*.hs | |
| app/**/*.hs | |
| test/**/*.hs | |
| mode: check | |
| 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: tile.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 update | |
| - run: cabal freeze --enable-tests | |
| - uses: actions/cache@v4 | |
| 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 check | |
| - run: cabal build all | |
| - run: cabal test | |
| docs: | |
| name: docs | |
| needs: | |
| - whitespace | |
| - hlint | |
| - ormolu | |
| - tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/setup@v2 | |
| id: setup-haskell | |
| with: | |
| ghc-version: 9.14.1 | |
| - run: cabal haddock tile --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs' --haddock-hyperlink-source --haddock-quickjump | |
| - name: set reusable strings | |
| id: strings | |
| shell: bash | |
| run: |- | |
| docsdir=$(find dist-newstyle -type d -name "html") | |
| if [[ -z "$docsdir" ]]; then | |
| echo "Error: Documentation directory not found." >&2 | |
| exit 1 | |
| fi | |
| echo "docs-output-dir=$docsdir" >> $GITHUB_OUTPUT | |
| - name: publish docs | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ${{ steps.strings.outputs.docs-output-dir}}/tile |