diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 37dd1c4..1283c4b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,15 +22,18 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo test examples: - runs-on: ubuntu-latest + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: submodules: true - uses: Swatinem/rust-cache@v2 - - run: | - cd examples - ./test.sh + - run: examples/test.sh cmake: runs-on: ubuntu-latest steps: diff --git a/examples/test.sh b/examples/test.sh index ef2dd1d..a5569b1 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -2,10 +2,10 @@ set -ex -cargo build +cd $(dirname $0) for cargo_file in */Cargo.toml; do - target/debug/$(dirname $cargo_file) & + cargo run --bin $(dirname $cargo_file) & pid=$! sleep 20 kill $pid