-
Notifications
You must be signed in to change notification settings - Fork 20
100 lines (86 loc) · 2.67 KB
/
ci_macos.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Lambda CI on macOS
on:
push:
pull_request:
env:
CMAKE_VERSION: 3.10.0
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin
defaults:
run:
shell: bash -ex {0}
jobs:
build:
name: ${{ matrix.name }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- name: "gcc13"
cxx: "g++-13"
cc: "gcc-13"
build_type: Release
runs-on: macos-13
- name: "gcc11"
cxx: "g++-11"
cc: "gcc-11"
build_type: Release
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: lambda
fetch-depth: 2
submodules: recursive
- name: Configure Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install ccache
run: brew install --overwrite ccache
- name: Install compiler ${{ matrix.cxx }}
run: brew install --overwrite gcc@$(echo "${{ matrix.cxx }}" | sed "s/g++-//g")
- name: Load ccache
uses: actions/cache@v2
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir build
cd build
cmake ../lambda -DLAMBDA_COMPILE_THREADS=3 -DLAMBDA_NATIVE_BUILD=OFF -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 500M
run: |
ccache -p || true
cd build
make -k -j3 cli_test
ccache -s || true
- name: Run tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 500M
run: |
cd build
ctest . -j3 --output-on-failure