Build and Test #2
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: Build and Test | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and Test (Xcode ${{ matrix.xcode }}) | |
| runs-on: macos-14 | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| include: | |
| - xcode: 26.2 | |
| destination: iPhone 17 Pro | |
| os: 26.2 | |
| - xcode: 16.2 | |
| destination: iPhone 16 Pro | |
| os: 18.2 | |
| - xcode: 15.2 | |
| destination: iPhone 15 Pro | |
| os: 17.2 | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check for changed files | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| src: | |
| - '.github/workflows/build_and_test.yml' | |
| - 'Sources/**' | |
| - '!Sources/Runestone/Documentation.docc/**' | |
| - 'Tests/**' | |
| - name: Build | |
| if: steps.changes.outputs.src == 'true' | |
| run: | | |
| set -o pipefail &&\ | |
| xcodebuild build-for-testing\ | |
| -scheme Runestone\ | |
| -sdk iphonesimulator\ | |
| -destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=${{ matrix.os }}"\ | |
| | xcbeautify --renderer github-actions | |
| - name: Test | |
| if: steps.changes.outputs.src == 'true' | |
| run: | | |
| set -o pipefail &&\ | |
| xcodebuild test-without-building\ | |
| -scheme Runestone\ | |
| -sdk iphonesimulator\ | |
| -destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=${{ matrix.os }}"\ | |
| | xcbeautify --renderer github-actions |