-
Notifications
You must be signed in to change notification settings - Fork 1.1k
108 lines (108 loc) · 3.3 KB
/
ci-cmake.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
name: CI (CMake)
on:
push:
branches: [main]
jobs:
# GitHub Actions doesn't provide GCC 13, so we use a Docker container instead.
# (Also, the Benchmark package on Ubuntu 22.04 LTS is problematic whereas this
# Docker container is based on Debian bookworm and so it has a newer version.)
build-linux:
runs-on: ubuntu-latest
container: gcc:13
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install CMake
run: |
apt update -y
apt install -y cmake
shell: bash
- name: Install Abseil, GoogleTest and Benchmark
run: |
apt update -y
apt install -y libabsl-dev libgtest-dev libbenchmark-dev
shell: bash
- run: .github/cmake.sh
shell: bash
build-linux-shared:
runs-on: ubuntu-latest
container: gcc:13
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install CMake
run: |
apt update -y
apt install -y cmake
shell: bash
- name: Install Abseil, GoogleTest and Benchmark
run: |
apt update -y
apt install -y libabsl-dev libgtest-dev libbenchmark-dev
shell: bash
- run: .github/cmake.sh -D BUILD_SHARED_LIBS=ON
shell: bash
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Abseil, GoogleTest and Benchmark
run: |
brew update
brew install abseil googletest google-benchmark
shell: bash
- run: .github/cmake.sh
shell: bash
build-macos-shared:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Abseil, GoogleTest and Benchmark
run: |
brew update
brew install abseil googletest google-benchmark
shell: bash
- run: .github/cmake.sh -D BUILD_SHARED_LIBS=ON
shell: bash
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Abseil, GoogleTest and Benchmark
run: |
# TODO: Remove this in September 2023, which is when the default triplet for
# vcpkg libraries will change from x86-windows to the detected host triplet.
export VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg update
vcpkg install abseil gtest benchmark
shell: bash
- run: |
.github/cmake.sh \
-D CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
shell: bash
build-windows-shared:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Abseil, GoogleTest and Benchmark
run: |
# TODO: Remove this in September 2023, which is when the default triplet for
# vcpkg libraries will change from x86-windows to the detected host triplet.
export VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg update
vcpkg install abseil gtest benchmark
shell: bash
- run: |
.github/cmake.sh -D BUILD_SHARED_LIBS=ON \
-D CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
shell: bash