-
Notifications
You must be signed in to change notification settings - Fork 48
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 #72 from fimad/github-ci
Migrate to Github actions for CI
- Loading branch information
Showing
11 changed files
with
129 additions
and
4 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
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ packages: | |
extra-deps: | ||
- atomic-primops-0.8.2 | ||
- clock-0.8 | ||
- data-sketches-0.3.1.0 | ||
resolver: lts-2.22 |
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,10 @@ | ||
flags: {} | ||
packages: | ||
- ../example/ | ||
- ../prometheus-client | ||
- ../prometheus-metrics-ghc | ||
- ../prometheus-proc | ||
- ../wai-middleware-prometheus | ||
extra-deps: | ||
- unix-memory-0.1.2 | ||
resolver: lts-21.25 |
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,10 @@ | ||
flags: {} | ||
packages: | ||
- ../example/ | ||
- ../prometheus-client | ||
- ../prometheus-metrics-ghc | ||
- ../prometheus-proc | ||
- ../wai-middleware-prometheus | ||
extra-deps: | ||
- unix-memory-0.1.2 | ||
resolver: lts-22.12 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
flags: {} | ||
packages: | ||
- ../example/ | ||
- ../prometheus-client | ||
- ../prometheus-metrics-ghc | ||
- ../prometheus-proc | ||
- ../wai-middleware-prometheus | ||
extra-deps: | ||
- unix-memory-0.1.2 | ||
resolver: nightly-2024-03-01 |
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,82 @@ | ||
# https://github.com/haskell/actions/tree/main/setup | ||
|
||
name: build | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Stack resolver ${{ matrix.stackage-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
stackage-version: | ||
- stack.yaml | ||
- .ci/stack-nightly.yaml | ||
- .ci/stack-lts-22.yaml | ||
- .ci/stack-lts-21.yaml | ||
- .ci/stack-lts-16.yaml | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: haskell-actions/setup@v2 | ||
name: Set up stack ${{ matrix.stackage-version }} | ||
id: setup | ||
with: | ||
enable-stack: true | ||
stack-version: latest | ||
|
||
- uses: actions/cache/restore@v3 | ||
name: Restore cached ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: ${{ runner.os }}-stack-globa-version-${{ matrix.stackage-version }}l-${{ hashFiles(matrix.stackage-version) }}-${{ hashFiles('**/*.cabal') }} | ||
restore-keys: | | ||
${{ runner.os }}-stack-global-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }} | ||
${{ runner.os }}-stack-global-version-${{ matrix.stackage-version }}- | ||
- uses: actions/cache/restore@v3 | ||
name: Restore cached .stack-work | ||
with: | ||
path: .stack-work | ||
key: ${{ runner.os }}-stack-work-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/*.hs') }} | ||
restore-keys: | | ||
${{ runner.os }}-stack-work-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }}-${{ hashFiles('**/*.cabal') }}- | ||
${{ runner.os }}-stack-work-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }}- | ||
${{ runner.os }}-stack-work-version-${{ matrix.stackage-version }}- | ||
- name: Install dependencies | ||
run: stack build --stack-yaml ${{ matrix.stackage-version }} --dependencies-only --test --bench | ||
|
||
# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail. | ||
|
||
- uses: actions/cache/save@v3 | ||
name: Cache ~/.stack | ||
with: | ||
path: ~/.stack | ||
key: ${{ runner.os }}-stack-global-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }}-${{ hashFiles('**/*.cabal') }} | ||
- uses: actions/cache/save@v3 | ||
name: Cache .stack-work | ||
with: | ||
path: .stack-work | ||
key: ${{ runner.os }}-stack-work-version-${{ matrix.stackage-version }}-${{ hashFiles(matrix.stackage-version) }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/*.hs') }} | ||
|
||
- name: Build | ||
run: stack build --stack-yaml ${{ matrix.stackage-version }} | ||
|
||
- name: Run tests | ||
run: stack test --stack-yaml ${{ matrix.stackage-version }} | ||
|
||
- name: Run benchmarks | ||
run: stack bench --stack-yaml ${{ matrix.stackage-version }} | ||
|
||
- name: Build documentation | ||
run: stack haddock --stack-yaml ${{ matrix.stackage-version }} |
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 |
---|---|---|
|
@@ -2,4 +2,6 @@ dist/ | |
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
cabal.config | ||
/.stack-work | ||
.stack-work | ||
*/*.yaml.lock | ||
.devcontainer |
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