diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3216eef2..d107bbb9 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 @@ -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 diff --git a/.github/workflows/benchmark_pr.yml b/.github/workflows/benchmark_pr.yml index e21d018f..825e0568 100644 --- a/.github/workflows/benchmark_pr.yml +++ b/.github/workflows/benchmark_pr.yml @@ -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 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9275923c..2b79b68c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 @@ -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 diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml deleted file mode 100644 index 928db7fa..00000000 --- a/.github/workflows/windows-cmake.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: CMake - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -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: windows-latest - - steps: - - uses: actions/checkout@v4 - - - 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 -Dgtest_disable_pthreads=ON -B ${{github.workspace}}/build - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build - - - name: Test - working-directory: ${{github.workspace}}/build/test - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C -