-
Notifications
You must be signed in to change notification settings - Fork 324
85 lines (77 loc) · 2.84 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
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
---
name: Linux CI
# We want to skip workflow runs for commits that don't affect the build. We
# use negative path patterns instead of paths-ignore: if anything in
# paths-ignore matches, the workflow will be skipped, which is too
# aggressive. Instead, we want to skip if the commit(s) solely affects
# ignored files.
#
# See
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-using-positive-and-negative-patterns-1
on:
push:
branches: ["master"]
paths:
# Include everything by default
- '**'
# CHANGELOG.md is high-churn, but don't affect the build.
#
# NB: README.md is NOT in this list; the documentation build consumes
# it.
- '!CHANGELOG.md'
- '!CONTRIBUTING.md'
- '!SECURITY.md'
# These files are only used by the Windows CI builds and don't affect
# the Linux builds.
- '!appveyor.yml'
- '!tools/ci-scripts/windows/**'
pull_request:
branches: ["master"]
paths:
# Include everything by default
- '**'
# CHANGELOG.md is high-churn, but don't affect the build.
#
# NB: README.md is NOT in this list; the documentation build consumes
# it.
- '!CHANGELOG.md'
- '!CONTRIBUTING.md'
- '!SECURITY.md'
# These files are only used by the Windows CI builds and don't affect
# the Linux builds.
- '!appveyor.yml'
- '!tools/ci-scripts/windows/**'
jobs:
tests:
name: "${{ matrix.env.FLAVOR }} ${{ matrix.env.BOOST }} ${{ matrix.env.COMPILER }}"
runs-on: "ubuntu-latest"
container:
image: bondciimages.azurecr.io/ubuntu-1804:build-54806381
strategy:
fail-fast: false
matrix:
env:
- { FLAVOR: cs }
- { FLAVOR: cpp-core, BOOST: 1.66.0, COMPILER: clang }
- { FLAVOR: hs }
- { FLAVOR: java }
env: ${{ matrix.env }}
steps:
- name: "Git checkout"
uses: "actions/checkout@v2"
with:
submodules: recursive
- name: Cache stack
uses: actions/cache@v2
with:
path: ~/.stack
key: stack18-${{ matrix.env.FLAVOR }}-${{ matrix.env.BOOST }}-${{ matrix.env.COMPILER }}--${{ hashFiles('**/compiler/stack.yaml','**/compiler/package.yaml','**/compiler/stack.yaml.lock') }}
restore-keys: |
stack18-${{ matrix.env.FLAVOR }}-${{ matrix.env.BOOST }}-${{ matrix.env.COMPILER }}-
- name: "Build and test for ${{ matrix.env.FLAVOR }} ${{ matrix.env.BOOST }} ${{ matrix.env.COMPILER }}"
run: |
set -xe
mkdir -p /github/home/.stack
sed -i 's@/root/bond@'"$(pwd)"'@g' tools/ci-scripts/linux/build.zsh
sed -i 's@/root/bond@'"$(pwd)"'@g' tools/ci-scripts/linux/build_cpp-common.zsh
zsh tools/ci-scripts/linux/build.zsh $(pwd) ${{ env.FLAVOR }} ${{ env.BOOST }} ${{ env.COMPILER}}