-
Notifications
You must be signed in to change notification settings - Fork 118
136 lines (125 loc) · 4.61 KB
/
ci.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
133
134
135
136
name: CI
on: [push, pull_request, release]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- {
name: linux-x64-gcc,
os: ubuntu-latest,
cxx: g++,
cmake-build-type: Release
}
- {
name: linux-x64-gcc-no-exceptions,
os: ubuntu-latest,
cxx: g++,
cxx-flags: -fno-exceptions,
cmake-build-type: Release
}
- {
name: linux-x64-clang,
os: ubuntu-latest,
cxx: clang++,
cmake-build-type: Release
}
- {
name: macos-x64-gcc,
os: macos-latest,
cxx: g++,
cmake-build-type: Release
}
- {
name: macos-x64-clang,
os: macos-latest,
cxx: clang++,
cmake-build-type: Release
}
- {
name: linux-x64-clang-sanitize,
os: ubuntu-latest,
cxx: clang++,
cxx-flags: "-fsanitize=address,undefined",
cmake-build-type: Release
}
- {
name: linux-x64-gcc-coverage,
os: ubuntu-latest,
cxx: g++,
cxx-flags: --coverage,
gcov-tool: gcov,
cmake-build-type: Debug
}
- {
name: windows-x64-vs-2019,
os: windows-2019,
cmake-build-type: Release,
cmake-generator: Visual Studio 16 2019,
cmake-platform: x64,
vcpkg-triplet: x64-windows-static-md
}
- {
name: windows-x86-vs-2019,
os: windows-2019,
cmake-build-type: Release,
cmake-generator: Visual Studio 16 2019,
cmake-platform: Win32,
vcpkg-triplet: x86-windows-static-md
}
- {
name: windows-x64-vs-2022,
os: windows-2022,
cmake-build-type: Release,
cmake-generator: Visual Studio 17 2022,
cmake-platform: x64,
vcpkg-triplet: x64-windows-static-md
}
- {
name: windows-x86-vs-2022,
os: windows-2022,
cmake-build-type: Release,
cmake-generator: Visual Studio 17 2022,
cmake-platform: Win32,
vcpkg-triplet: x86-windows-static-md
}
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
steps:
- uses: actions/checkout@v2
# Windows
- name: Install boost (Windows)
run: vcpkg install boost-test:${{matrix.config.vcpkg-triplet}}
if: runner.os == 'Windows'
- name: Configure CMake (Windows)
run: cmake -G "${{matrix.config.cmake-generator}}" -A ${{matrix.config.cmake-platform}} -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{matrix.config.vcpkg-triplet}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
if: runner.os == 'Windows'
- name: Build (Windows)
run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.cmake-build-type}} --verbose
if: runner.os == 'Windows'
- name: Test (Windows)
run: ${{github.workspace}}/build/${{matrix.config.cmake-build-type}}/tsl_robin_map_tests.exe
if: runner.os == 'Windows'
# Linux or macOS
- name: Install boost (Linux or macOS)
run: vcpkg install boost-test
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Configure CMake (Linux or macOS)
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Build (Linux or macOS)
run: cmake --build ${{github.workspace}}/build --verbose
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Test (Linux or macOS)
run: ${{github.workspace}}/build/tsl_robin_map_tests
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Coverage
run: |
sudo apt-get install -y lcov
lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
if: ${{matrix.config.name == 'linux-x64-gcc-coverage'}}