-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (154 loc) · 5.65 KB
/
stack.yml
File metadata and controls
154 lines (154 loc) · 5.65 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
######################################################
## ##
## !!!! Autogenerated YAML file, do not edit !!!! ##
## ##
## Edit source in /src/github/workflows/ instead! ##
## ##
######################################################
jobs:
auto-cancel:
if: |
!contains(github.event.head_commit.message, '[skip ci]')
&& !contains(github.event.head_commit.message, '[ci skip]')
&& !contains(github.event.head_commit.message, '[github skip]')
&& !contains(github.event.head_commit.message, '[skip github]')
runs-on: Ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
stack:
defaults:
run:
shell: bash
env:
EXTRA_ARGS: --fast
ICU: mingw-w64-x86_64-icu
NON_DEFAULT_FLAGS: --flag Agda:enable-cluster-counting --flag Agda:cpphs --flag
Agda:debug
needs: auto-cancel
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- id: haskell-setup
uses: haskell/actions/setup@v1
with:
enable-stack: true
ghc-version: ${{ matrix.ghc-ver }}
stack-version: ${{ matrix.stack-ver }}
- name: Environment settings based on the Haskell setup
run: |
echo "runner.os = ${{ runner.os }}"
echo "OSTYPE = ${{ env.OSTYPE }}"
echo "ghc-path = ${{ steps.haskell-setup.outputs.ghc-path }}"
echo "ghc-exe = ${{ steps.haskell-setup.outputs.ghc-exe }}"
echo "cabal-path = ${{ steps.haskell-setup.outputs.cabal-path }}"
echo "cabal-exe = ${{ steps.haskell-setup.outputs.cabal-exe }}"
echo "cabal-store = ${{ steps.haskell-setup.outputs.cabal-store }}"
echo "stack-path = ${{ steps.haskell-setup.outputs.stack-path }}"
echo "stack-exe = ${{ steps.haskell-setup.outputs.stack-exe }}"
echo "stack-root = ${{ steps.haskell-setup.outputs.stack-root }}"
echo "STACK_ROOT (orig) = ${{ env.STACK_ROOT }}"
echo "STACK_ROOT=${{ steps.haskell-setup.outputs.stack-root }}" >> ${GITHUB_ENV}
echo "STACK_VER=$(stack --numeric-version)" >> ${GITHUB_ENV}
export GHC_VER=$(ghc --numeric-version)
echo "GHC_VER=${GHC_VER}" >> ${GITHUB_ENV}
echo "ARGS=--stack-yaml=stack-${GHC_VER}.yaml --system-ghc --no-terminal" >> ${GITHUB_ENV}
- name: Environment (review)
run: |
echo "STACK_ROOT (fix) = ${STACK_ROOT}"
echo "STACK_VER = ${STACK_VER}"
echo "GHC_VER = ${GHC_VER}"
- id: cache
name: Cache dependencies
uses: actions/cache@v2
with:
key: |
${{ runner.os }}-stack-20220503-${{ env.STACK_VER }}-${{ env.GHC_VER }}-${{ hashFiles(format('stack-{0}.yaml', env.GHC_VER)) }}
path: ${{ steps.haskell-setup.outputs.stack-root }}
- if: ${{ runner.os == 'macOS' }}
name: Set up pkg-config for the ICU library (macOS)
run: |
echo "PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig" >> ${GITHUB_ENV}
shell: bash
- if: ${{ runner.os == 'Linux' }}
name: Install the icu library (Ubuntu)
run: |
sudo apt-get update -qq
sudo apt-get install libicu-dev -qq
- if: ${{ runner.os == 'Windows' }}
name: Install the icu library (Windows)
run: |
stack exec ${ARGS} -- pacman --noconfirm -Syuu
# stack exec ${ARGS} -- pacman --noconfirm -Sy msys2-keyring
stack exec ${ARGS} -- pacman --noconfirm -S ${ICU}
stack exec ${ARGS} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
- if: ${{ runner.os == 'Linux' && env.GHC_VER == '8.4.4' }}
name: Install the numa library (Ubuntu, GHC 8.4.4)
run: |
sudo apt-get install libnuma-dev -qq
- if: ${{ !steps.cache.outputs.cache-hit }}
name: Install dependencies for Agda and `agda-tests` (i.e. the test suite).
run: stack build ${ARGS} ${EXTRA_ARGS} ${NON_DEFAULT_FLAGS} --test --only-dependencies
- name: Build Agda with the default flags in Agda.cabal. Also build `agda-tests`
(i.e. the test suite).
run: stack build ${ARGS} ${EXTRA_ARGS} --test --no-run-tests
- name: Build Agda with the non-default flags Agda.cabal.
run: stack build ${ARGS} ${EXTRA_ARGS} ${NON_DEFAULT_FLAGS}
strategy:
fail-fast: false
matrix:
ghc-ver:
- 8.10.7
- 8.8.4
- 8.6.5
- 8.4.4
- 8.2.2
- 8.0.2
include:
- ghc-ver: 9.2.3
os: ubuntu-20.04
stack-ver: latest
- ghc-ver: 9.0.2
os: ubuntu-20.04
stack-ver: latest
- ghc-ver: 9.2.3
os: macos-latest
stack-ver: latest
- ghc-ver: 9.2.3
os: windows-latest
stack-ver: latest
os:
- ubuntu-18.04
stack-ver:
- latest
name: Build (stack)
'on':
pull_request:
paths:
- .github/workflows/stack.yml
- Agda.cabal
- Setup.hs
- stack*.yaml
- src/agda-mode/**
- src/full/**
- src/main/**
- src/size-solver/**
- test/**.hs
push:
branches:
- master
- ci-*
- release*
paths:
- .github/workflows/stack.yml
- Agda.cabal
- Setup.hs
- stack*.yaml
- src/agda-mode/**
- src/full/**
- src/main/**
- src/size-solver/**
- test/**.hs