• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI (CMake)
2on:
3  push:
4    branches: [main]
5jobs:
6  build-linux:
7    runs-on: ubuntu-latest
8    # The Benchmark package on Ubuntu 22.04 LTS is problematic whereas this
9    # Docker container is based on Debian bookworm and has a newer version.
10    container: gcc:13
11    strategy:
12      fail-fast: false
13      matrix:
14        build_shared_libs: [OFF, ON]
15    steps:
16      - uses: actions/checkout@v3
17      - name: Install CMake
18        run: |
19          apt update -y
20          apt install -y cmake
21        shell: bash
22      - name: Install Abseil, GoogleTest and Benchmark
23        run: |
24          apt update -y
25          apt install -y libabsl-dev libgtest-dev libbenchmark-dev
26        shell: bash
27      - run: .github/cmake.sh -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
28        shell: bash
29  build-macos:
30    runs-on: macos-latest
31    strategy:
32      fail-fast: false
33      matrix:
34        build_shared_libs: [OFF, ON]
35    steps:
36      - uses: actions/checkout@v3
37      - name: Install Abseil, GoogleTest and Benchmark
38        run: |
39          brew update
40          brew install abseil googletest google-benchmark
41        shell: bash
42      - run: .github/cmake.sh -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
43        shell: bash
44  build-windows:
45    runs-on: windows-latest
46    strategy:
47      fail-fast: false
48      matrix:
49        build_shared_libs: [OFF, ON]
50    steps:
51      - uses: actions/checkout@v3
52      - name: Install Abseil, GoogleTest and Benchmark
53        run: |
54          vcpkg update
55          vcpkg install abseil gtest benchmark
56        shell: bash
57      - run: |
58          .github/cmake.sh -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} \
59            -D CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
60        shell: bash
61