From 2c329ddce9cfde55f6766321c3c19888981d9d6c Mon Sep 17 00:00:00 2001 From: ZigRazor Date: Thu, 20 Jun 2024 09:39:17 +0000 Subject: [PATCH] Update file(s) "/.github" from "ZigRazor/CXXGraph" --- .github/workflows/benchmark.yml | 8 ++++++-- .github/workflows/benchmark_pr.yml | 6 +++++- .github/workflows/cmake.yml | 21 +++++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3216eef23..d107bbb9e 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 e21d018fe..825e0568c 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 9275923c0..2b79b68c7 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