Parallelize test execution #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| - target: aarch64-apple-ios-macabi | |
| - target: aarch64-apple-ios-sim | |
| simulator: "iPhone 17" | |
| - target: aarch64-apple-tvos-sim | |
| simulator: "Apple TV" | |
| - target: aarch64-apple-visionos-sim | |
| simulator: "Apple Vision Pro" | |
| - target: aarch64-apple-watchos-sim | |
| simulator: "Apple Watch SE 3 (40mm)" | |
| steps: | |
| - uses: taiki-e/checkout-action@v1 | |
| - name: Install Rustup target | |
| run: rustup target add ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Start simulator | |
| if: ${{ matrix.simulator }} | |
| run: xcrun simctl boot "${{ matrix.simulator }}" | |
| - name: Build | |
| run: cargo build --target ${{ matrix.target }} | |
| - name: Test | |
| run: cargo test --target ${{ matrix.target }} |