-
Notifications
You must be signed in to change notification settings - Fork 41
78 lines (64 loc) · 1.81 KB
/
cabal-mac-win.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI for macOS and Windows building with cabal
on:
push:
branches:
- master
- ci-*
- release*
pull_request:
jobs:
cabal:
name: Cabal
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-2022]
ghc:
- 8.10.7
- 9.0.2
- 9.2.1
fail-fast: false
env:
config: --enable-tests --test-show-details=direct
steps:
- name: Setup MSYS path
if: ${{ runner.os == 'Windows' }}
run: |
echo "C:\msys64\mingw64\bin;C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Install the ICU library (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
pacman --noconfirm -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-icu
# Installing ICU is not necessary, macOS-latest already has v69.1
# - name: Install the ICU library
# shell: bash
# run: |
# brew install icu4c
- name: Set up pkg-config for the ICU library (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
echo "PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig" >> ${GITHUB_ENV}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Haskell
uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
- name: Freeze
run: |
cabal freeze
- name: Cache ~/.cabal/store
uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
- name: Build
run: |
cabal configure ${{ env.config }}
cabal build all
- name: Test
run: |
cabal test all ${{ env.config }}