-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from well-typed/jdral/bump-deps
Bump `containers` and `QuickCheck` dependencies, allow `ghc-9.10`, update GHA
- Loading branch information
Showing
3 changed files
with
154 additions
and
271 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Haskell CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
merge_group: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# Build and test | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8", "9.6.6", "9.8.2", "9.10.1"] | ||
cabal: ["3.10.2.1"] | ||
os: [ubuntu-latest] | ||
|
||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Haskell | ||
id: setup-haskell | ||
uses: haskell-actions/setup@v2 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
cabal-update: true | ||
|
||
- name: Configure the build | ||
run: | | ||
cabal configure --enable-tests --enable-benchmark --ghc-options="-Werror" | ||
cat cabal.project.local | ||
- name: Record cabal dependencies | ||
id: record-deps | ||
run: | | ||
cabal build all --dry-run | ||
- name: "Restore cache" | ||
uses: actions/cache/restore@v4 | ||
id: restore-cabal-cache | ||
env: | ||
cache-name: cache-cabal-build-130824 | ||
with: | ||
path: ${{ steps.setup-haskell.outputs.cabal-store }} | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}- | ||
- name: Install cabal dependencies | ||
id: build-dependencies | ||
run: cabal build --only-dependencies all | ||
|
||
- name: "Save cache" | ||
uses: actions/cache/save@v4 | ||
id: save-cabal-cache | ||
# Note: cache-hit will be set to true only when cache hit occurs for the | ||
# exact key match. For a partial key match via restore-keys or a cache | ||
# miss, it will be set to false. | ||
if: steps.build-dependencies.outcome == 'success' && steps.restore-cabal-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.setup-haskell.outputs.cabal-store }} | ||
key: ${{ steps.restore-cabal-cache.outputs.cache-primary-key }} | ||
|
||
- name: Build | ||
run: cabal build all | ||
|
||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable | ||
- name: Set test timeout (Unix) | ||
if: ${{ startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS') }} | ||
run: | | ||
echo "TASTY_TIMEOUT=5m" >> "$GITHUB_ENV" | ||
- name: Run tests | ||
run: | | ||
cabal test -j1 --test-show-details=direct all |
Oops, something went wrong.