Run Integration Tests #27
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: Run Integration Tests | |
| concurrency: | |
| group: run-integration-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| env: | |
| GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | |
| jobs: | |
| run-integration-tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ iOS, macOS, tvOS, watchOS ] | |
| embeddable-compiler: [ true, false ] | |
| swift-export: [ true, false ] | |
| include: | |
| - java: '17' | |
| - xcode: '16.4' | |
| - xcode: '26.0' | |
| swift-export: true | |
| - platform: iOS | |
| scheme: iOS App | |
| destination: platform=iOS Simulator,name=iPhone 16 Pro | |
| - platform: macOS | |
| scheme: macOS App | |
| destination: platform=OS X | |
| - platform: tvOS | |
| scheme: tvOS App | |
| destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation) | |
| - platform: watchOS | |
| scheme: watchOS Tests | |
| destination: platform=watchOS Simulator,name=Apple Watch Series 10 (46mm) | |
| name: ${{ format('{0} (embeddable {1}, swiftExport {2})', matrix.platform, matrix.embeddable-compiler, matrix.swift-export) }} | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: sample | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ matrix.xcode }} | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.java }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Cache Konan | |
| uses: ./.github/actions/cache-konan | |
| - name: Set kotlin.native.useEmbeddableCompilerJar | |
| run: echo "kotlin.native.useEmbeddableCompilerJar=${{ matrix.embeddable-compiler }}" >> gradle.properties | |
| - name: Run tests | |
| env: | |
| NATIVE_COROUTINES_SWIFT_EXPORT: ${{ matrix.swift-export }} | |
| run: >- | |
| set -o pipefail && | |
| xcodebuild test | |
| -project KMPNativeCoroutinesSample.xcodeproj | |
| -scheme "${{ matrix.scheme }}" | |
| -destination "${{ matrix.destination }}" | |
| 'SWIFT_ACTIVE_COMPILATION_CONDITIONS=$(inherited) ${{ matrix.swift-export && 'NATIVE_COROUTINES_SWIFT_EXPORT' || '' }}' | |
| | xcbeautify --renderer github-actions |