fixing tests for Swift 6.1 #12
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: SundialKitBinary | |
| on: | |
| push: | |
| branches-ignore: | |
| - '*WIP' | |
| env: | |
| PACKAGE_NAME: SundialKitBinary | |
| jobs: | |
| build-ubuntu: | |
| name: Build on Ubuntu | |
| runs-on: ubuntu-latest | |
| container: ${{ matrix.swift.nightly && format('swiftlang/swift:nightly-{0}-{1}', matrix.swift.version, matrix.os) || format('swift:{0}-{1}', matrix.swift.version, matrix.os) }} | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [noble, jammy] | |
| swift: | |
| - version: "6.1" | |
| - version: "6.2" | |
| - version: "6.1" | |
| nightly: true | |
| - version: "6.2" | |
| nightly: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ensure remote dependencies | |
| run: ./Scripts/ensure-remote-deps.sh | |
| - uses: brightdigit/swift-build@v1.4.0 | |
| with: | |
| scheme: ${{ env.PACKAGE_NAME }} | |
| skip-package-resolved: true | |
| - uses: sersoft-gmbh/swift-coverage-action@v4 | |
| id: coverage-files | |
| with: | |
| fail-on-empty-output: true | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| fail_ci_if_error: true | |
| flags: swift-${{ matrix.swift.version }}-${{ matrix.os }}${{ matrix.swift.nightly && '-nightly' || '' }} | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }} | |
| build-macos: | |
| name: Build on macOS | |
| runs-on: ${{ matrix.runs-on }} | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # SPM Build Matrix - Xcode 16.x+ (Swift 6.1+) | |
| - runs-on: macos-15 | |
| xcode: "/Applications/Xcode_26.0.app" | |
| - runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.4.app" | |
| - runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.3.app" | |
| # iOS Build Matrix - Xcode 16.x+ (Swift 6.1+) | |
| - type: ios | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_26.0.app" | |
| deviceName: "iPhone 17 Pro" | |
| osVersion: "26.0" | |
| download-platform: true | |
| - type: ios | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.4.app" | |
| deviceName: "iPhone 16e" | |
| osVersion: "18.5" | |
| - type: ios | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.3.app" | |
| deviceName: "iPhone 16" | |
| osVersion: "18.4" | |
| # watchOS Build Matrix - Xcode 16.x+ (Swift 6.1+) | |
| - type: watchos | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_26.0.app" | |
| deviceName: "Apple Watch Ultra 3 (49mm)" | |
| osVersion: "26.0" | |
| download-platform: true | |
| - type: watchos | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.4.app" | |
| deviceName: "Apple Watch Series 10 (46mm)" | |
| osVersion: "11.5" | |
| - type: watchos | |
| runs-on: macos-15 | |
| xcode: "/Applications/Xcode_16.3.app" | |
| deviceName: "Apple Watch Series 10 (42mm)" | |
| osVersion: "11.4" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ensure remote dependencies | |
| run: ./Scripts/ensure-remote-deps.sh | |
| - name: Build and Test | |
| uses: brightdigit/swift-build@v1.4.0 | |
| with: | |
| scheme: ${{ env.PACKAGE_NAME }} | |
| type: ${{ matrix.type }} | |
| xcode: ${{ matrix.xcode }} | |
| deviceName: ${{ matrix.deviceName }} | |
| osVersion: ${{ matrix.osVersion }} | |
| download-platform: ${{ matrix.download-platform }} | |
| skip-package-resolved: true | |
| # Coverage Steps | |
| - name: Process Coverage | |
| uses: sersoft-gmbh/swift-coverage-action@v4 | |
| - name: Upload Coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }} | |
| lint: | |
| name: Linting | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| runs-on: ubuntu-latest | |
| needs: [build-ubuntu, build-macos] | |
| env: | |
| MINT_PATH: .mint/lib | |
| MINT_LINK_PATH: .mint/bin | |
| LINT_MODE: STRICT | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ensure remote dependencies | |
| run: ./Scripts/ensure-remote-deps.sh | |
| - name: Cache mint | |
| id: cache-mint | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache | |
| with: | |
| path: | | |
| .mint | |
| Mint | |
| key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mint- | |
| - name: Install mint | |
| if: steps.cache-mint.outputs.cache-hit == '' | |
| run: | | |
| git clone https://github.com/yonaskolb/Mint.git | |
| cd Mint | |
| swift run mint install yonaskolb/mint | |
| - name: Lint | |
| run: | | |
| set -e | |
| ./Scripts/lint.sh |