Repository navigation
93 lines (82 loc) · 3.41 KB
/
Copy pathios.yml
File metadata and controls
93 lines (82 loc) · 3.41 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
87
88
89
90
91
92
93
name: iOS CI
on:
# Checked on develop after merging, not on every pull request (user decision,
# 2026-10-17). A red develop is fixed forward by its own pull request.
push:
branches: [ "develop", "main" ]
workflow_dispatch:
concurrency:
# A run in progress finishes; a newer push replaces only the queued run (frequent merges
# to develop otherwise cancelled every run before it reported).
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
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