-
Notifications
You must be signed in to change notification settings - Fork 1
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 #4 from rickowens/pr
feat: Support GHC-9.8.
- Loading branch information
Showing
4 changed files
with
182 additions
and
52 deletions.
There are no files selected for viewing
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,129 @@ | ||
on: [push] | ||
name: Haskell Builds | ||
jobs: | ||
build: | ||
name: Haskell Build | ||
runs-on: ubuntu-latest # or macOS-latest, or windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc-version: | ||
- '9.8' | ||
cabal-version: ['3.10.2.0'] | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup | ||
- name: Setup Haskell | ||
uses: haskell-actions/setup@v2 | ||
id: setup | ||
if: steps.tooling-cache.outputs.cache-hit != 'true' | ||
with: | ||
ghc-version: ${{ matrix.ghc-version }} | ||
cabal-version: ${{ matrix.cabal-version }} | ||
|
||
# Generate Plan | ||
- name: Configure the Build | ||
run: | | ||
rm cabal.project.freeze | ||
cabal configure | ||
cabal build --dry-run | ||
# Restore cache | ||
- name: Restore cached dependencies | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
env: | ||
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | ||
|
||
# Build deps (for caching) | ||
- name: Cabal build dependencies | ||
run: cabal build all --only-dependencies | ||
|
||
# Save dependency cache | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
|
||
# Cabal build | ||
- name: Cabal Bulid | ||
run: | | ||
project="$(cat cabal.project | grep -v -- '-Werror')" | ||
echo "$project" > cabal.project | ||
cabal build all | ||
build-lower-bounds: | ||
name: Haskell Build (lower bounds) | ||
runs-on: ubuntu-latest # or macOS-latest, or windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc-version: ['9.8.1'] | ||
cabal-version: ['3.10.2.0'] | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup | ||
- name: Setup Haskell | ||
uses: haskell-actions/setup@v2 | ||
id: setup | ||
if: steps.tooling-cache.outputs.cache-hit != 'true' | ||
with: | ||
ghc-version: ${{ matrix.ghc-version }} | ||
cabal-version: ${{ matrix.cabal-version }} | ||
|
||
# Generate Plan | ||
- name: Configure the Build | ||
run: | | ||
(cat << EOF | ||
packages: . | ||
constraints: | ||
aeson == 2.2.1.0, | ||
base == 4.19.0.0, | ||
bytestring == 0.12.0.2, | ||
hspec == 2.11.1, | ||
json-spec == 0.2.1.3, | ||
lens == 5.2.3, | ||
openapi3 == 3.2.4, | ||
text == 2.1, | ||
time == 1.12.2 | ||
EOF | ||
) > cabal.project | ||
rm cabal.project.freeze | ||
cabal configure | ||
cabal build --dry-run | ||
# Restore cache | ||
- name: Restore cached dependencies | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
env: | ||
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | ||
|
||
# Build deps (for caching) | ||
- name: Cabal build dependencies | ||
run: cabal build all --only-dependencies | ||
|
||
# Save dependency cache | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
|
||
# Cabal build | ||
- name: Cabal Bulid | ||
run: cabal build all | ||
|
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
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
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