Skip to content

Commit

Permalink
Don't fail fast; test native first; no fancy trix
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams committed Feb 13, 2024
1 parent c7ef276 commit e5c521e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,35 @@ name: Build and test
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
configuration: [Debug, Release]

env:
BUILD_AND_TEST: cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_TESTING=1 -GNinja -S . -B .cmake-build && cmake --build .cmake-build && ctest -V --test-dir .cmake-build

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
show-progress: false

- name: Setup Swift
uses: SwiftyLab/setup-swift@latest
with:
swift-version: 5.9

- name: Native CTest
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_TESTING=1 -GNinja -S . -B .cmake-build && cmake --build .cmake-build && ctest -V --test-dir .cmake-build

- name: Devcontainer CTest
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: devcontainers/[email protected]
with:
runCmd: ${{ env.BUILD_AND_TEST }}
runCmd: cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_TESTING=1 -GNinja -S . -B .cmake-build && cmake --build .cmake-build && ctest -V --test-dir .cmake-build

- name: 'Xcode (build only—"error: Scheme DummyTestee is not currently configured for the test action.")'
if: ${{ matrix.os == 'macos-latest' }}
run: |
cmake -DENABLE_TESTING=1 -GXcode -S . -B .xcode-build
cd .xcode-build
xcrun xcodebuild -configuration ${{ matrix.configuration }} -scheme DummyTestee -destination 'platform=macOS' build-for-testing
- name: Setup Swift
uses: SwiftyLab/setup-swift@latest
with:
swift-version: 5.9

- name: Native CTest
run: ${{ env.BUILD_AND_TEST }}

0 comments on commit e5c521e

Please sign in to comment.