build: set up tuist #1089
Workflow file for this run
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
| # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md | |
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
| # https://github.com/actions/cache/blob/ff937cc95032836a535d249de4ce2fc52aeae834/examples.md | |
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| spm: | |
| name: "Build & Test All - iOS ${{ matrix.sdk }}" | |
| runs-on: macos-15-xlarge | |
| strategy: | |
| fail-fast: false # Don’t fail-fast so that we get all snapshot test changes | |
| matrix: | |
| include: | |
| - sdk: "15.4" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-15-4" | |
| installation_required: true | |
| - sdk: "16.2" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-16-2" | |
| installation_required: true | |
| - sdk: "17.2" | |
| simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-17-2" | |
| installation_required: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Mise | |
| uses: jdx/mise-action@v2 | |
| - name: Read env | |
| run: cat .github/workflows/env.properties >> $GITHUB_ENV | |
| - name: Switch to Xcode ${{ env.xcode_version }} | |
| run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app | |
| - name: Install xcodes | |
| run: brew install aria2 xcodesorg/made/xcodes | |
| - name: Install iOS ${{ matrix.sdk }} | |
| if: ${{ matrix.installation_required }} | |
| run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" | |
| - name: Build | |
| run: | | |
| xcodebuild \ | |
| -scheme "Listable-Package" \ | |
| -destination "platform=${{ env.TUIST_TEST_PLATFORM }} Simulator,OS=${{ matrix.sdk }},name=${{ env.TUIST_TEST_DEVICE }}" \ | |
| -sdk iphonesimulator build | |
| - name: Install Tuist dependencies for Development | |
| run: tuist install --path Development/ | |
| - name: Test All | |
| run: tuist test ListableDevelopment-Workspace --path Development/ --os ${{ matrix.sdk }} --result-bundle-path TestResult.xcresult | |
| - name: Upload TestResult | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: TestResult.xcresult | |
| path: TestResult.xcresult |