-
Notifications
You must be signed in to change notification settings - Fork 33
67 lines (67 loc) · 2.5 KB
/
run-integration-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
JAVA_VERSION: '17'
XCODE_VERSION: '15.2'
XCODEBUILD_DESTINATION_iOS: platform=iOS Simulator,name=iPhone 15 Pro
XCODEBUILD_DESTINATION_macOS: platform=OS X
XCODEBUILD_DESTINATION_tvOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
XCODEBUILD_DESTINATION_watchOS: platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)
jobs:
run-integration-tests:
strategy:
fail-fast: false
matrix:
platform: [ iOS, macOS, tvOS, watchOS ]
embeddable-compiler: [ true, false ]
ksp-mode: [ true, false ]
name: ${{ format('{0} (embeddable {1}, KSP {2})', matrix.platform, matrix.embeddable-compiler, matrix.ksp-mode) }}
runs-on: macos-14
env:
XCODEBUILD_SCHEME_iOS: iOS App
XCODEBUILD_SCHEME_macOS: macOS App
XCODEBUILD_SCHEME_tvOS: tvOS App
XCODEBUILD_SCHEME_watchOS: watchOS Tests
defaults:
run:
working-directory: sample
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Set kotlin.native.useEmbeddableCompilerJar
env:
KOTLIN_NATIVE_EMBEDDABLE_COMPILER: ${{ matrix.embeddable-compiler }}
run: echo "kotlin.native.useEmbeddableCompilerJar=$KOTLIN_NATIVE_EMBEDDABLE_COMPILER" >> gradle.properties
- name: Run tests
env:
XCODEBUILD_SCHEME: ${{ env[format('XCODEBUILD_SCHEME_{0}', matrix.platform)] }}
XCODEBUILD_DESTINATION: ${{ env[format('XCODEBUILD_DESTINATION_{0}', matrix.platform)] }}
NATIVE_COROUTINES_KSP_MODE: ${{ matrix.ksp-mode }}
run: >-
xcodebuild test
-project KMPNativeCoroutinesSample.xcodeproj
-scheme "$XCODEBUILD_SCHEME"
-destination "$XCODEBUILD_DESTINATION"