• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: build-and-test-min-cmake
2
3on:
4  push:
5    branches: [ main ]
6  pull_request:
7    branches: [ main ]
8
9jobs:
10  job:
11    name: ${{ matrix.os }}.min-cmake
12    runs-on: ${{ matrix.os }}
13    strategy:
14      fail-fast: false
15      matrix:
16        os: [ubuntu-latest, macos-latest]
17
18    steps:
19      - uses: actions/checkout@v3
20
21      - uses: lukka/get-cmake@latest
22        with:
23          cmakeVersion: 3.10.0
24
25      - name: create build environment
26        run: cmake -E make_directory ${{ runner.workspace }}/_build
27
28      - name: setup cmake initial cache
29        run: touch compiler-cache.cmake
30
31      - name: configure cmake
32        env:
33          CXX: ${{ matrix.compiler }}
34        shell: bash
35        working-directory: ${{ runner.workspace }}/_build
36        run: >
37          cmake -C ${{ github.workspace }}/compiler-cache.cmake
38          $GITHUB_WORKSPACE
39          -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
40          -DCMAKE_CXX_VISIBILITY_PRESET=hidden
41          -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON
42
43      - name: build
44        shell: bash
45        working-directory: ${{ runner.workspace }}/_build
46        run: cmake --build .
47