Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions .github/workflows/Cabal-Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
schedule:
- cron: "45 02 * * *"

env:
cabalConfig: --enable-tests --enable-benchmarks --disable-optimization --enable-deterministic

jobs:

Expand All @@ -18,25 +20,40 @@ jobs:
matrix:
ghc: [ "8.10", "8.4" ]
steps:
- uses: actions/checkout@v2
- name: "Git checkout"
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
- name: "Haskell env setup"
id: HaskEnvSetup
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: "Install additional system packages"
run: sudo apt install libsodium-dev
# 2020-08-01: NOTE: Nix instantiate still needed for HNix tests
- name: "Install Nix"
uses: cachix/install-nix-action@v12
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic
- run: cabal v2-build
- run: cabal v2-test
- name: "Repository update"
run: cabal v2-update
# NOTE: Freeze is for the caching
- name: "Configuration freeze"
run: cabal v2-freeze $cabalConfig
- name: "Configuring GitHub cache"
uses: actions/cache@v2
with:
path: |
${{ steps.HaskEnvSetup.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-
- name: "Build"
run: cabal v2-build $cabalConfig
- name: "Tests"
run: cabal v2-test $cabalConfig
- name: "Haddock"
if: ${{ matrix.ghc == '8.10' }}
run: cabal v2-haddock $cabalConfig
- name: "Source distribution file"
if: ${{ matrix.ghc == '8.10' }}
run: cabal v2-sdist
38 changes: 25 additions & 13 deletions .github/workflows/On-Release-Cabal-Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
# 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 --enable-benchmarks --disable-optimization --enable-deterministic

jobs:

build10:
Expand All @@ -15,25 +18,34 @@ jobs:
# Since CI by default tests boundary GHCs, test middle versions of GHCs
ghc: [ "8.8", "8.6"]
steps:
- uses: actions/checkout@v2
- name: "Git checkout"
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
- name: "Haskell env setup"
id: HaskEnvSetup
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: "Install additional system packages"
run: sudo apt install libsodium-dev
# 2020-08-01: NOTE: Nix instantiate still needed for HNix tests
- name: "Install Nix"
uses: cachix/install-nix-action@v12
- run: cabal v2-configure --disable-optimization --enable-tests --enable-deterministic
- run: cabal v2-build
- run: cabal v2-test
- name: "Repository update"
run: cabal v2-update
# NOTE: Freeze is for the caching
- name: "Configuration freeze"
run: cabal v2-freeze $cabalConfig
- name: "Configuring GitHub cache"
uses: actions/cache@v2
with:
path: |
${{ steps.HaskEnvSetup.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-
- name: "Build"
run: cabal v2-build $cabalConfig
- name: "Tests"
run: cabal v2-test $cabalConfig