-
Notifications
You must be signed in to change notification settings - Fork 7
Add testing support on ghc >= 9.4 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
22db363
build: move from deprecated gh action, invalidate cache
jimbob88 5482df3
build: move to newer, more performant cabal
jimbob88 6cb0307
build: run gh-actions on ghc 9.12
jimbob88 7819122
build: add support for newer dependencies when testing
jimbob88 7cc8807
fix: tests on ghc >= 9.4
jimbob88 ababc39
build: remove support for ghc ^>= 9.0 and 9.2
jimbob88 62553f5
build: no longer test on unsupported ghc 9.0 and 9.2
jimbob88 88e1a65
build: use recommended caching system
jimbob88 bf6c855
build: use alternative caching mechanism
jimbob88 f5e0b58
chore: remove unused test comparison
jimbob88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,53 @@ | ||
| name: cabal | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [ '*' ] | ||
|
|
||
| branches: ['*'] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-20.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ghc: ["8.6", "8.8", "8.10", "9.0", "9.2", "9.4"] | ||
| cabal: ["3.6"] | ||
| cache-version: ["2022-10-25"] | ||
|
|
||
| ghc-version: ["8.6", "8.8", "8.10", "9.4", "9.6", "9.8", "9.12"] | ||
| cabal-version: ["3.12"] | ||
| cache-version: ["2025-01-01"] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: haskell/actions/setup@v2 | ||
| with: | ||
| ghc-version: ${{ matrix.ghc }} | ||
| cabal-version: ${{ matrix.cabal }} | ||
|
|
||
| - name: Cache ~/.cabal/store | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cabal/store | ||
| dist-newstyle | ||
| key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cache-version }}-cabal | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| cabal update | ||
| cabal configure --disable-optimization --enable-tests --write-ghc-environment-files=always -j2 | ||
| cabal build --only-dependencies | ||
| - name: Build & Test | ||
| run: | | ||
| cabal build --flag dev | ||
| cabal test --flag dev | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up GHC ${{ matrix.ghc-version }} | ||
| uses: haskell-actions/setup@v2 | ||
| id: setup | ||
| with: | ||
| ghc-version: ${{ matrix.ghc-version }} | ||
| cabal-version: ${{ matrix.cabal-version }} | ||
| cabal-update: true | ||
| - name: Configure the build | ||
| run: | | ||
| cabal configure --enable-tests --disable-documentation --disable-optimization --write-ghc-environment-files=always -j2 | ||
| cabal build all --dry-run | ||
| - name: Restore cached dependencies | ||
| uses: actions/cache/restore@v4 | ||
| id: cache | ||
| env: | ||
| key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-${{ matrix.cache-version }} | ||
| with: | ||
| path: ${{ steps.setup.outputs.cabal-store }} | ||
| key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | ||
| restore-keys: ${{ env.key }}- | ||
| - name: Install dependencies | ||
| # If we had an exact cache hit, the dependencies will be up to date. | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: cabal build all --only-dependencies | ||
| # Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail. | ||
| - name: Save cached dependencies | ||
| uses: actions/cache/save@v4 | ||
| # If we had an exact cache hit, trying to save the cache would error because of key clash. | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| with: | ||
| path: ${{ steps.setup.outputs.cabal-store }} | ||
| key: ${{ steps.cache.outputs.cache-primary-key }} | ||
| - name: Build | ||
| run: cabal build all --flag dev | ||
| - name: Run tests | ||
| run: cabal test all --flag dev | ||
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to add support for
9.10as well, but I think it would be better to handle it in a separate PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested locally and 9.10.1 works on my computer. Haven't tried running the tests in CI or locally though.