-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (48 loc) · 2 KB
/
haskell.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
53
54
55
56
57
58
name: Bob the Builder
on:
pull_request:
push:
branches: [master]
jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.4.0.0"]
ghc: ["9.0.1"]
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
enable-stack: false
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
${{ github.workspace }}/dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}
- name: Update
run: cabal update
- name: Install dependencies
run: cabal new-build -O2 --disable-debug-info --enable-executable-stripping --enable-library-stripping --disable-debug-info --disable-library-for-ghci all --ghc-options "-funfolding-use-threshold=16 -fexcess-precision -optc-O3 -optc-ffast-math -no-recomp" --only-dependencies
working-directory: ${{ github.workspace }}
- name: Build
run: cabal new-build -O2 --disable-debug-info --enable-executable-stripping --enable-library-stripping --disable-debug-info --disable-library-for-ghci all --ghc-options "-funfolding-use-threshold=16 -fexcess-precision -optc-O3 -optc-ffast-math -no-recomp"
working-directory: ${{ github.workspace }}
- name: Copy executable
run: cp dist-newstyle/build/x86_64-*/ghc-*/axolotl-$(cat axolotl.cabal | grep '^version' | awk '{print $2}')/x/axl/opt/build/axl/axl$(if [ "$RUNNER_OS" == "Windows" ]; then echo ".exe"; else echo ""; fi) axl
shell: bash
working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v2
with:
name: axl-${{ runner.os }}
path: ${{ github.workspace }}/axl