-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
20 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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
name: CI | ||
|
||
# Trigger the workflow on push or pull request, but only for the main branch | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened] | ||
push: | ||
branches: [main] | ||
schedule: | ||
# additionally run once per week (At 00:00 on Sunday) to maintain cache | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
cabal: | ||
|
@@ -13,14 +16,17 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
cabal: ["3.0"] | ||
cabal: ["3.4"] | ||
ghc: | ||
- "8.2.2" | ||
- "8.4.4" | ||
- "8.6.5" | ||
- "8.8.4" | ||
- "8.10.2" | ||
- "8.10.4" | ||
- "9.0.1" | ||
exclude: | ||
- os: macOS-latest | ||
ghc: 9.0.1 | ||
- os: macOS-latest | ||
ghc: 8.8.4 | ||
- os: macOS-latest | ||
|
@@ -32,43 +38,56 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | ||
|
||
- uses: actions/setup-haskell@v1.1 | ||
- uses: haskell/actions/setup@v1 | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache cabal-store | ||
- name: Configure | ||
run: | | ||
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always | ||
- name: Freeze | ||
run: | | ||
cabal freeze | ||
- uses: actions/[email protected] | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
cabal build all --only-dependencies | ||
- name: Build | ||
run: | | ||
cabal update | ||
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=always | ||
cabal build all | ||
- name: Test | ||
run: | | ||
cabal test --enable-tests | ||
cabal test all | ||
- name: Documentation | ||
run: | | ||
cabal haddock | ||
stack: | ||
name: stack / ghc ${{ matrix.ghc }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
stack: ["2.1.3"] | ||
ghc: ["8.10.2"] | ||
stack: ["2.5"] | ||
ghc: ["8.10.4"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | ||
|
||
- uses: actions/setup-haskell@v1.1 | ||
- uses: haskell/actions/setup@v1 | ||
name: Setup Haskell Stack | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
|
@@ -80,6 +99,10 @@ jobs: | |
path: ~/.stack | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | ||
|
||
- name: Install dependencies | ||
run: | | ||
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies | ||
- name: Build | ||
run: | | ||
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
resolver: nightly-2020-08-30 | ||
resolver: lts-17.7 |