|
39 | 39 | - name: Compile iOS Simulator Arm64 |
40 | 40 | # Compile iOS Simulator which includes commonMain + nativeMain + iosMain |
41 | 41 | run: ./gradlew :python-multiplatform:compileKotlinIosSimulatorArm64 --console=plain |
| 42 | + |
| 43 | + # The klib walker on Kotlin/Native (#234, #237, #240): object handles, their lifetime and member |
| 44 | + # functions, called from Python on the iOS simulator. Its own job and Gradle invocation. |
| 45 | + klib-fixture: |
| 46 | + name: Klib fixture on the iOS simulator |
| 47 | + runs-on: macos-latest |
| 48 | + steps: |
| 49 | + - name: Checkout |
| 50 | + uses: actions/checkout@v4 |
| 51 | + |
| 52 | + - name: Setup Java |
| 53 | + uses: actions/setup-java@v4 |
| 54 | + with: |
| 55 | + java-version: '21' |
| 56 | + distribution: 'zulu' |
| 57 | + cache: 'gradle' |
| 58 | + |
| 59 | + - name: Cache Konan |
| 60 | + uses: actions/cache@v4 |
| 61 | + with: |
| 62 | + path: ~/.konan |
| 63 | + key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 64 | + restore-keys: | |
| 65 | + ${{ runner.os }}-konan- |
| 66 | +
|
| 67 | + - name: Run the klib fixture's suite |
| 68 | + run: ./gradlew :python-multiplatform-gradle-plugin-fixtures:klib-artifact:iosSimulatorArm64Test --rerun --console=plain |
| 69 | + |
| 70 | + - name: Count the tests |
| 71 | + if: always() |
| 72 | + run: | |
| 73 | + python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY" |
| 74 | + import glob, xml.etree.ElementTree as ET |
| 75 | + files = glob.glob("python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/test-results/iosSimulatorArm64Test/*.xml") |
| 76 | + total = failed = skipped = 0 |
| 77 | + for f in files: |
| 78 | + suite = ET.parse(f).getroot() |
| 79 | + total += int(suite.get("tests", 0)) |
| 80 | + failed += int(suite.get("failures", 0)) + int(suite.get("errors", 0)) |
| 81 | + skipped += int(suite.get("skipped", 0)) |
| 82 | + print(f"Klib fixture (iOS simulator): {total} tests, {total - failed - skipped} passed, {failed} failed, {skipped} skipped ({len(files)} suites)") |
| 83 | + PY |
| 84 | + cat "$GITHUB_STEP_SUMMARY" |
| 85 | +
|
| 86 | + - name: Upload the test reports |
| 87 | + if: failure() |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + with: |
| 90 | + name: klib-fixture-ios-reports |
| 91 | + path: | |
| 92 | + python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/reports/tests/iosSimulatorArm64Test |
| 93 | + python-multiplatform-gradle-plugin/fixtures/klib-artifact/build/test-results/iosSimulatorArm64Test |
0 commit comments