Skip to content

Commit

Permalink
Add macos ci/cd on cmake, benchmark and benchmark_pr (#437)
Browse files Browse the repository at this point in the history
* 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;
  • Loading branch information
badumbatish authored Jun 20, 2024
1 parent 24f5c79 commit 393d027
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 46 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ env:
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
#- name: Install gtest manually
# run: sudo apt-get install libgtest-dev
Expand All @@ -31,7 +35,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBENCHMARK=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBENCHMARK=ON

- name: Build
# Build your program with the given configuration
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/benchmark_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ env:
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
#- name: Install gtest manually
# run: sudo apt-get install libgtest-dev
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ env:

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


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


- name: Build
# Build your program with the given configuration
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/windows-cmake.yml

This file was deleted.

0 comments on commit 393d027

Please sign in to comment.