CI #106
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| schedule: | |
| - cron: "3 3 * * 2" # 3:03 AM, every Tuesday | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: macos-latest | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install SwiftFormat | |
| run: | | |
| brew unlink swiftformat | |
| brew install swiftformat --HEAD | |
| - name: SwiftFormat Lint | |
| run: swiftformat --lint . --reporter github-actions-log | |
| apple: | |
| if: github.event_name != 'pull_request' || !contains(github.event.pull_request.title, '[skip ci]') | |
| name: ${{ matrix.platform }} (Swift ${{ matrix.swift }}) | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - iOS | |
| - mac-catalyst | |
| - macOS | |
| - tvOS | |
| - watchOS | |
| - visionOS | |
| swift: | |
| - "6.0" | |
| - "6.1" | |
| - "6.2" | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v5 | |
| - name: Select Xcode version | |
| uses: mxcl/xcodebuild@v3 | |
| with: | |
| swift: ~${{ matrix.swift }} | |
| action: none | |
| verbosity: xcbeautify | |
| - name: Disable SwiftSyntax Prebuilts | |
| run: | | |
| defaults write com.apple.dt.Xcode IDEPackageEnablePrebuilts -bool NO | |
| # nuke cache to ensure it takes effect | |
| rm -rf ~/Library/Developer/Xcode/DerivedData | |
| rm -rf ~/Library/Developer/Xcode/SourcePackages | |
| rm -rf ~/Library/Caches/org.swift.swiftpm | |
| - if: ${{ matrix.platform != 'macOS' && matrix.platform != 'mac-catalyst' }} | |
| name: Initialize Simulator Service | |
| run: xcrun simctl list | |
| - if: ${{ matrix.platform != 'macOS' && matrix.platform != 'mac-catalyst' }} | |
| name: Download Default Runtime | |
| uses: nick-fields/retry@v3 | |
| with: | |
| timeout_minutes: 15 | |
| max_attempts: 3 | |
| command: xcodebuild -downloadPlatform ${{ matrix.platform }} | |
| - name: Run Tests | |
| uses: mxcl/xcodebuild@v3 | |
| with: | |
| platform: ${{ matrix.platform }} | |
| swift: ~${{ matrix.swift }} | |
| action: test | |
| scheme: ObjCRuntimeTools | |
| verbosity: xcbeautify | |
| check-swift-syntax-compatibility: | |
| name: Swift Syntax Compatibility Check | |
| runs-on: macos-latest | |
| steps: | |
| - name: Git Checkout | |
| uses: actions/checkout@v5 | |
| - name: Run Swift Syntax Compatibility Check | |
| uses: davdroman/swift-macro-compatibility-check@from-version | |
| with: | |
| run-tests: false | |
| from-version: "600.0.0" | |
| major-versions-only: true |