-
Notifications
You must be signed in to change notification settings - Fork 48
52 lines (49 loc) · 2.04 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
52
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: [ ghc810, ghc96 ]
target-platform: [ "" ] # , "-windows" ]
runs-on: ${{ matrix.platform == 'x86_64-linux' && 'ubuntu-latest' || 'macos-latest' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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 }}
# for now we'll set minimal to false, as minimal-iog images don't exist.
minimal: false
iog: true
- name: add patched cabal
run: |
mkdir ~/bin
curl -L https://ci.zw3rk.com/job/input-output-hk-haskell-nix-example/pullrequest-2/${{ matrix.platform }}.cabal-install-static/latest/download/1 | gunzip > ~/bin/cabal
curl -L https://ci.zw3rk.com/job/input-output-hk-haskell-nix-example/pullrequest-2/${{ matrix.platform }}.cabal-install-hooks/latest/download/1 | tar xzf - -C ~/bin
chmod +x ~/bin/cabal
chmod +x ~/bin/*Hook*
- name: cabal update
run: PATH=$HOME/bin:$PATH cabal update
- name: cabal build dependencies
env:
CABAL_AWS_ACCESS_KEY_ID: ${{ secrets.CABAL_AWS_ACCESS_KEY_ID }}
CABAL_AWS_SECRET_ACCESS_KEY: ${{ secrets.CABAL_AWS_SECRET_ACCESS_KEY }}
run: PATH=$HOME/bin:$PATH cabal build all -j --enable-tests --only-dependencies
- name: cabal build
env:
CABAL_AWS_ACCESS_KEY_ID: ${{ secrets.CABAL_AWS_ACCESS_KEY_ID }}
CABAL_AWS_SECRET_ACCESS_KEY: ${{ secrets.CABAL_AWS_SECRET_ACCESS_KEY }}
run: PATH=$HOME/bin:$PATH cabal build all -j --enable-tests
- name: cabal test
run: PATH=$HOME/bin:$PATH cabal test all -j --enable-tests --test-show-details=direct