From 51b0e2bcc1d93f84230f6127f1c657978d956ca9 Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Tue, 11 Oct 2022 09:38:40 +0800 Subject: [PATCH] Update Workflow --- .github/workflows/cmake.yml | 13 ++++++++----- .github/workflows/cygwin.yml | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9941c76e..54eb0247 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,9 +2,9 @@ name: CMake on: push: - branches: [ develop ] + branches: [ $default-branch ] pull_request: - branches: [ develop ] + branches: [ $default-branch ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -15,7 +15,10 @@ jobs: # 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 + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -31,7 +34,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. + # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - + diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 10636ba8..3eaf5c96 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -1,9 +1,9 @@ name: Cygwin on: push: - branches: [ develop ] + branches: [ $default-branch ] pull_request: - branches: [ develop ] + branches: [ $default-branch ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -15,7 +15,7 @@ jobs: # 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 - + env: SHELLOPTS: igncr defaults: