Skip to content

Commit 393d027

Browse files
authored
Add macos ci/cd on cmake, benchmark and benchmark_pr (#437)
* Add macos ci/cd on cmake, benchmark and benchmark_pr * Move cmake* build into cmake.yml * Add fail-fail = false to make sure every benchmark and cmake gets to run * Custom cmake configuration for windows * Missing fi;
1 parent 24f5c79 commit 393d027

File tree

4 files changed

+26
-46
lines changed

4 files changed

+26
-46
lines changed

.github/workflows/benchmark.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ env:
1212
jobs:
1313
benchmark:
1414
name: Performance regression check
15-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
1620
steps:
1721
#- name: Install gtest manually
1822
# run: sudo apt-get install libgtest-dev
@@ -31,7 +35,7 @@ jobs:
3135
- name: Configure CMake
3236
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3337
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
34-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBENCHMARK=ON
38+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBENCHMARK=ON
3539

3640
- name: Build
3741
# Build your program with the given configuration

.github/workflows/benchmark_pr.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ env:
1111
jobs:
1212
benchmark:
1313
name: Performance regression check
14-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
1519
steps:
1620
#- name: Install gtest manually
1721
# run: sudo apt-get install libgtest-dev

.github/workflows/cmake.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ env:
1212

1313
jobs:
1414
build:
15-
# The CMake configure and build commands are platform agnostic and should work equally
16-
# well on Windows or Mac. You can convert this to a matrix build if you need
17-
# cross-platform coverage.
18-
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
19-
runs-on: ubuntu-latest
15+
# Define the operating systems you want to run the job on
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
2022

2123
steps:
2224
#- name: Install gtest manually
@@ -37,7 +39,14 @@ jobs:
3739
- name: Configure CMake
3840
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3941
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
40-
run: cmake -DTEST=ON -B ${{github.workspace}}/build
42+
run: |
43+
if [ ${{ matrix.os }} == 'windows-latest' ]; then
44+
cmake -DTEST=ON -Dgtest_disable_pthreads=ON -B ${{github.workspace}}/build
45+
else
46+
cmake -DTEST=ON -B ${{github.workspace}}/build
47+
fi;
48+
shell: bash
49+
4150

4251
- name: Build
4352
# Build your program with the given configuration

.github/workflows/windows-cmake.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)