Merge branch 'master' into hkm/gha-using-devx #28
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
name: DevX/Haskell | |
on: | |
push: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: devx {0} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ x86_64-linux, x86_64-darwin ] | |
compiler-nix-name: [ ghc8107, ghc927, ghc961 ] | |
target-platform: [ "", "-windows" ] | |
env: | |
# Modify this value to "invalidate" the cabal cache. | |
CABAL_CACHE_VERSION: "2023-04-18" | |
runs-on: ${{ matrix.platform == 'x86_64-linux' && 'ubuntu-latest' || 'macos-latest' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install GHC and Cabal | |
uses: input-output-hk/actions/devx@latest | |
with: | |
platform: ${{ matrix.platform }} | |
target-platform: ${{ matrix.target-platform }} | |
compiler-nix-name: ${{ matrix.compiler-nix-name }} | |
minimal: true | |
iog: true | |
- name: cabal update | |
run: cabal update | |
- name: Cache Cabal store | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.cabal${{ matrix.target-platform }}/store | |
dist-newstyle | |
key: cache-devx-${{ env.CABAL_CACHE_VERSION }}-${{ matrix.platform }}.${{ matrix.compiler-nix-name }}${{ matrix.target-platform }}-${{ hashFiles('dependencies.txt') }} | |
- name: cabal build dependencies | |
run: cabal build all -j --enable-tests --only-dependencies | |
- name: cabal build | |
run: cabal build all -j --enable-tests | |
- name: cabal test | |
run: cabal test all -j --enable-tests --test-show-details=direct |