-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge request #88 add CI Cabal build functionality
- Loading branch information
Showing
2 changed files
with
103 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,52 @@ | ||
name: "Hackage, Cabal, Linux" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "45 02 * * *" | ||
|
||
|
||
jobs: | ||
|
||
build10: | ||
name: "GHC" | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
packageRoot: [ hnix-store-core, hnix-store-remote ] | ||
ghc: [ "8.10", "8.4" ] | ||
defaults: | ||
run: | ||
working-directory: "./${{ matrix.packageRoot }}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle" | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cabal/packages | ||
~/.cabal/store | ||
dist-newstyle | ||
key: "${{ runner.os }}-Cabal-${{ matrix.ghc }}" | ||
- uses: haskell/actions/setup@v1 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
- name: "Install additional system packages" | ||
run: sudo apt install libsodium-dev | ||
- run: cabal v2-install tasty-discover | ||
- name: "Install Nix" | ||
# Still required for Store-remote test suite run | ||
uses: cachix/install-nix-action@v12 | ||
if: matrix.packageRoot == 'hnix-store-remote' | ||
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic | ||
if: matrix.packageRoot == 'hnix-store-core' | ||
- run: | | ||
cabal v2-configure --disable-optimization --enable-tests --enable-deterministic \ | ||
-f io-testsuite # Enable the Store-remote test suite | ||
if: matrix.packageRoot == 'hnix-store-remote' | ||
- run: cabal v2-build | ||
- run: cabal v2-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Release testing, Hackage, Cabal, Linux" | ||
|
||
on: | ||
release: | ||
# created: a draft is saved, or a release or pre-release is published without previously being saved as a draft | ||
types: [ created ] | ||
|
||
jobs: | ||
|
||
build10: | ||
name: "GHC" | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
packageRoot: [ hnix-store-core, hnix-store-remote ] | ||
# Since CI by default tests boundary GHCs, test middle versions of GHCs | ||
ghc: [ "8.8", "8.6"] | ||
defaults: | ||
run: | ||
working-directory: "./${{ matrix.packageRoot }}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Cache of ~/.cabal/packages, ~/.cabal/store and dist-newstyle | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cabal/packages | ||
~/.cabal/store | ||
dist-newstyle | ||
key: ${{ runner.os }}-Cabal-${{ matrix.ghc }} | ||
- uses: haskell/actions/setup@v1 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
- name: "Install additional system packages" | ||
run: sudo apt install libsodium-dev | ||
- run: cabal v2-install tasty-discover | ||
- name: "Install Nix" | ||
# Still required for Store-remote test suite run | ||
uses: cachix/install-nix-action@v12 | ||
if: matrix.packageRoot == 'hnix-store-remote' | ||
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic | ||
if: matrix.packageRoot == 'hnix-store-core' | ||
- run: | | ||
cabal v2-configure --disable-optimization --enable-tests --enable-deterministic \ | ||
-f io-testsuite # Enable the Store-remote test suite | ||
if: matrix.packageRoot == 'hnix-store-remote' | ||
- run: cabal v2-build | ||
- run: cabal v2-test |