forked from haskell-gi/haskell-gi
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.51 KB
/
linux.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
name: Linux CI
on: [push, pull_request]
env:
gtksheet_version: 4.3.5
# Allows for rebuilding the cache without bumping the version
gtksheet_cache_version: 1
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ghc: ['8.4', '8.6', '8.8', '8.10', '9.0', '9.2']
steps:
- uses: actions/checkout@v1
# At this point cabal.project refers to cabal files that do not exist,
# hide it so that 'cabal update' does not fail.
- name: Hide cabal project
run: mv cabal.project _cabal.project
- uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Restore cabal project
run: mv _cabal.project cabal.project
- name: Cache cabal store
uses: actions/cache@v1
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Update cabal.project
run: |
./update-cabal-project.sh ubuntu-ci
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libgirepository1.0-dev libunwind-dev
./bindings/PKGS.sh deps ubuntu-ci | sudo xargs apt-get install -y
- name: Generate bindings
run: |
pushd bindings
cabal new-update
cabal new-run genBuildInfo $(./PKGS.sh list ubuntu-ci)
popd
- name: Build
run: cabal build all
- name: Run tests
run: |
echo 'tests: True' > cabal.project.local
cabal test