Repository navigation
86 lines (75 loc) · 3.16 KB
/
Copy pathios.yml
File metadata and controls
86 lines (75 loc) · 3.16 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: iOS CI
on:
# Runs only as part of ci.yml, which is started by hand (owner, 2026-11-14: "개발 테스트 ci는
# 명시적으로 실행하기"). ci.yml holds the one concurrency group for the repository.
workflow_call:
jobs:
compile:
name: Compile iOS Simulator Arm64
# macos-latest is required since iOS compilation needs Xcode
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
cache: 'gradle'
- name: Cache Konan
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Compile iOS Simulator Arm64
# Compile iOS Simulator which includes commonMain + nativeMain + iosMain
run: ./gradlew :python-multiplatform:compileKotlinIosSimulatorArm64 --console=plain
# The klib walker on Kotlin/Native (#234, #237, #240): object handles, their lifetime and member
# functions, called from Python on the iOS simulator. Its own job and Gradle invocation.
klib-fixture:
name: Klib fixture on the iOS simulator
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
cache: 'gradle'
- name: Cache Konan
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Run the klib fixture's suite
run: ./gradlew :python-multiplatform-gradle-plugin-fixtures:klib-artifact:iosSimulatorArm64Test --rerun --console=plain
- name: Count the tests
if: always()
run: |
python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY"
import glob, xml.etree.ElementTree as ET
files = glob.glob("python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/test-results/iosSimulatorArm64Test/*.xml")
total = failed = skipped = 0
for f in files:
suite = ET.parse(f).getroot()
total += int(suite.get("tests", 0))
failed += int(suite.get("failures", 0)) + int(suite.get("errors", 0))
skipped += int(suite.get("skipped", 0))
print(f"Klib fixture (iOS simulator): {total} tests, {total - failed - skipped} passed, {failed} failed, {skipped} skipped ({len(files)} suites)")
PY
cat "$GITHUB_STEP_SUMMARY"
- name: Upload the test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: klib-fixture-ios-reports
path: |
python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/reports/tests/iosSimulatorArm64Test
python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/test-results/iosSimulatorArm64Test