-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (114 loc) · 3.55 KB
/
build.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
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
name: build
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
suite: [win-gcc, win-msvc32, win-msvc64, linux-gcc, linux-clang, macos-gcc, macos-clang]
cpu-level: ['old', 'popcnt', 'bmi2']
builtin-jsoncpp: ['true', 'false']
builtin-cxxopts: ['true', 'false']
static: ['true', 'false']
exclude:
- suite: macos-clang
cpu-level: 'bmi2'
- suite: macos-gcc
cpu-level: 'bmi2'
- suite: macos-clang
static: 'true'
- suite: macos-gcc
static: 'true'
- cpu-level: 'bmi2'
builtin-jsoncpp: 'false'
- cpu-level: 'old'
builtin-jsoncpp: 'false'
- builtin-jsoncpp: 'false'
builtin-cxxopts: 'true'
- builtin-jsoncpp: 'true'
builtin-cxxopts: 'false'
include:
- suite: linux-gcc
os: ubuntu-20.04
compiler: gcc-8
cmake-generator: 'Unix Makefiles'
- suite: linux-clang
os: ubuntu-20.04
compiler: clang-9
cmake-generator: 'Unix Makefiles'
- suite: macos-gcc
os: macos-latest
compiler: gcc-10
cmake-generator: 'Unix Makefiles'
- suite: macos-clang
os: macos-latest
compiler: clang-11
cmake-generator: 'Unix Makefiles'
- suite: win-gcc
os: windows-2019
compiler: gcc
cmake-generator: 'MinGW Makefiles'
- suite: win-msvc32
os: windows-2019
compiler: msvc32
cmake-generator: 'Visual Studio 16 2019'
- suite: win-msvc64
os: windows-2019
compiler: msvc64
cmake-generator: 'Visual Studio 16 2019'
runs-on: ${{ matrix.os }}
env:
CONFIG_FILE: ${{ github.workspace }}/.ci-config.json
STORAGE_FILE: ${{ github.workspace }}/.ci-storage.json
BUILDER_CMD: python3 "${{ github.workspace }}/tools/ci_build.py" -c "$CONFIG_FILE" -s "$STORAGE_FILE"
steps:
- uses: actions/checkout@v2
- name: Generate config
shell: bash
run: |
OS="${{ matrix.os }}"
OS="${OS%%-*}"
(
cat <<EOF
{
"os": "$OS",
"compiler": "${{ matrix.compiler }}",
"cpu-level": "${{ matrix.cpu-level }}",
"builtin-jsoncpp": ${{ matrix.builtin-jsoncpp }},
"builtin-cxxopts": ${{ matrix.builtin-cxxopts }},
"static": ${{ matrix.static }},
"cmake-build-type": "Release",
"cmake-generator": "${{ matrix.cmake-generator }}"
}
EOF
) >"${{ env.CONFIG_FILE }}"
- name: Dump config
shell: bash
run: cat "${{ env.CONFIG_FILE }}"
- name: Configure
shell: bash
working-directory: ${{ github.workspace }}
run: ${{ env.BUILDER_CMD }} configure
- name: Dump storage
shell: bash
run: cat "${{ env.STORAGE_FILE }}"
- name: Install dependencies
shell: bash
run: ${{ env.BUILDER_CMD }} install
- name: Build dependencies
shell: bash
run: ${{ env.BUILDER_CMD }} build-dep
- name: Build
shell: bash
run: ${{ env.BUILDER_CMD }} build
- name: Test
shell: bash
run: ${{ env.BUILDER_CMD }} test
- name: Build (with diagnostics)
shell: bash
run: ${{ env.BUILDER_CMD }} build -d
- name: Test (with diagnostics)
shell: bash
run: ${{ env.BUILDER_CMD }} test -d