diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a5d0f3f..5b89624a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ -name: CI +name: Release -on: [push, pull_request] +on: + workflow_dispatch: jobs: package: @@ -16,11 +17,6 @@ jobs: submodules: 'recursive' fetch-depth: '0' - - uses: maxim-lobanov/setup-xcode@v1 - if: matrix.os == 'macos-latest' - with: - xcode-version: '11.7' - - uses: benjlevesque/short-sha@v1.2 id: short-sha with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..48d9ee5b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: Test + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + workflow_dispatch: + +jobs: + test: + name: Build and test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + fetch-depth: '0' + + - name: Configure macOS + if: matrix.os == 'macos-latest' + run: mkdir build && cd build && cmake -G Xcode .. + + - name: Configure Windows + if: matrix.os == 'windows-latest' + run: mkdir build && cd build && cmake .. + + - name: Build Debug + run: cmake --build build --config 'Debug' + + - name: Test Debug + run: cd build && ctest -C 'Debug' . -V + + - name: Build Release + run: cmake --build build --config 'Release' + + - name: Test Release + run: cd build && ctest -C 'Release' . -V