mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-11-28 14:07:53 +03:00
5d03ffc43c
This properly fixes the use of the tasty-discover, the report & info were sent upstream to fix it in docs: https://github.com/haskell-works/tasty-discover/issues/4. Closes: #129
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
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 ]
|
|
|
|
env:
|
|
cabalConfig: --enable-tests --disable-optimization --enable-deterministic
|
|
|
|
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:
|
|
|
|
- name: "Git checkout"
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: "Haskell env setup"
|
|
id: HaskEnvSetup
|
|
uses: haskell/actions/setup@v1
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
|
|
- name: "Repository update"
|
|
run: cabal v2-update
|
|
|
|
- name: "Install additional system packages"
|
|
run: sudo apt install libsodium-dev
|
|
|
|
# Still required for Remote
|
|
- name: "Install Nix"
|
|
uses: cachix/install-nix-action@v12
|
|
if: matrix.packageRoot == 'hnix-store-remote'
|
|
|
|
# Remote: Enabling testsuite, because it requires networking in the default Nix environment.
|
|
- name: "Project-specific Cabal configuration"
|
|
if: matrix.packageRoot == 'hnix-store-remote'
|
|
run: echo "cabalConfig=$cabalConfig -f io-testsuite" >> $GITHUB_ENV
|
|
|
|
# NOTE: Freeze is for the caching
|
|
- name: "Configuration freeze"
|
|
run: cabal v2-freeze $cabalConfig
|
|
|
|
- name: "Copy freeze file to the root dir"
|
|
run: cp -a cabal.project.freeze ../cabal.project.freeze
|
|
|
|
- name: "Configuring GitHub cache"
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
${{ steps.HaskEnvSetup.outputs.cabal-store }}
|
|
dist-newstyle
|
|
key: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles( 'cabal.project.freeze' ) }}
|
|
restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-
|
|
|
|
- name: "Build"
|
|
run: cabal v2-build $cabalConfig
|
|
|
|
- name: "Tests"
|
|
run: cabal v2-test $cabalConfig
|