-
Notifications
You must be signed in to change notification settings - Fork 41
51 lines (45 loc) · 1.56 KB
/
devx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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