-
Notifications
You must be signed in to change notification settings - Fork 25
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 #50 from bitnomial/add-ci
Add GitHub Actions CI
- Loading branch information
Showing
12 changed files
with
127 additions
and
32 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,90 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
cabal: | ||
name: cabal / ghc-${{ matrix.ghc }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - macOS-latest | ||
cabal: | ||
- "latest" | ||
ghc: | ||
- "8.10.7" | ||
- "9.0.2" | ||
- "9.2.8" | ||
- "9.4.8" | ||
- "9.6.3" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: haskell-actions/setup@v2 | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache cabal-store | ||
with: | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ matrix.os }}-${{ matrix.ghc }}-cabal | ||
|
||
- name: Build | ||
run: | | ||
cabal update | ||
cabal build package:prometheus --enable-tests --enable-benchmarks --write-ghc-environment-files=always --flags="buildexamples" | ||
# TODO: Actually add tests | ||
# - name: Test | ||
# run: | | ||
# cabal test package:prometheus --enable-tests | ||
|
||
stack: | ||
name: stack ${{ matrix.resolver }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - macOS-latest | ||
stack: ["latest"] | ||
resolver: | ||
- "--stack-yaml ./stack-8.10.yaml" | ||
- "--stack-yaml ./stack-9.0.yaml" | ||
- "--stack-yaml ./stack-9.2.yaml" | ||
- "--stack-yaml ./stack-9.4.yaml" | ||
- "--stack-yaml ./stack-9.6.yaml" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: haskell-actions/setup@v2 | ||
name: Setup Haskell Stack | ||
with: | ||
stack-version: ${{ matrix.stack }} | ||
enable-stack: true | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: ${{ matrix.os }}-stack-${{ matrix.resolver }} | ||
|
||
- name: Build | ||
run: | | ||
stack build --test --bench --no-run-tests --no-run-benchmarks --flag prometheus:buildexamples | ||
# TODO: Actually add tests | ||
# - name: Test | ||
# run: | | ||
# stack test |
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 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
|
||
resolver: lts-18.28 | ||
flags: {} | ||
packages: | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
|
||
resolver: lts-16.5 | ||
resolver: lts-19.33 | ||
flags: {} | ||
packages: | ||
- '.' | ||
- "." | ||
extra-deps: [] |
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,6 @@ | ||
--- | ||
resolver: lts-21.25 | ||
flags: {} | ||
packages: | ||
- "." | ||
extra-deps: [] |
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,5 +1,6 @@ | ||
resolver: lts-14.27 | ||
--- | ||
resolver: lts-22.0 | ||
flags: {} | ||
packages: | ||
- '.' | ||
- "." | ||
extra-deps: [] |
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 @@ | ||
./stack-9.6.yaml |
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