-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(based on Lamdu's CI)
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 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,53 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
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: | ||
stack: | ||
name: ghc ${{ matrix.ghc }} / ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
stack: ["3.1.1"] | ||
ghc: ["9.6.6"] | ||
os: ["ubuntu-latest"] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: haskell/actions/[email protected] | ||
name: Setup Haskell Stack | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
stack-version: ${{ matrix.stack }} | ||
|
||
- uses: actions/[email protected] | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
name: Cache ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | ||
|
||
- name: Install Haskell 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 | ||
- name: Test | ||
# Running the tests only on Linux should suffice | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
stack test --system-ghc |