Skip to content

Commit 71fd16b

Browse files
wow-mileyMiley Chandonnetclaude
authored
ci: split JVM and iOS test jobs, bump ubuntu to JDK 21 (#517)
Previously both ubuntu and macos runners ran the full JVM + Android test suite, with macos additionally running iOS simulator tests. Mac runners are ~10x the cost of Linux on GH Actions and the JVM/Android duplication isn't earning much — KMP JVM bytecode behavior is nearly identical across OSes. I split this into two parallel jobs: ubuntu runs ktlint + JVM/Android, macos only runs iOS simulator tests. Both now use JDK 21. Note: branch protection rules referencing the old check names (`Tests (ubuntu-latest, JDK 17)` / `Tests (macos-latest, JDK 21)`) will need updating to the new names. Co-authored-by: Miley Chandonnet <miley@Mileys-Mac-mini.local> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 00068bd commit 71fd16b

1 file changed

Lines changed: 30 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,18 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
tests:
11-
name: Tests (${{ matrix.os }}, JDK ${{ matrix.java }})
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
include:
17-
- os: ubuntu-latest
18-
java: '17'
19-
ios: false
20-
- os: macos-latest
21-
java: '21'
22-
ios: true
10+
jvm-tests:
11+
name: JVM + Android Tests (ubuntu, JDK 21)
12+
runs-on: ubuntu-latest
2313

2414
steps:
2515
- name: Checkout code
2616
uses: actions/checkout@v4
2717

28-
- name: Set up JDK ${{ matrix.java }}
18+
- name: Set up JDK 21
2919
uses: actions/setup-java@v4
3020
with:
31-
java-version: ${{ matrix.java }}
21+
java-version: '21'
3222
distribution: 'temurin'
3323

3424
- name: Setup Gradle
@@ -50,7 +40,31 @@ jobs:
5040
timeout-minutes: 20
5141
run: ./gradlew :ampere-core:jvmTest :ampere-core:testDebugUnitTest :ampere-cli:jvmTest :ampere-compose:jvmTest :ampere-compose:testDebugUnitTest
5242

43+
ios-tests:
44+
name: iOS Simulator Tests (macos, JDK 21)
45+
runs-on: macos-latest
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Set up JDK 21
52+
uses: actions/setup-java@v4
53+
with:
54+
java-version: '21'
55+
distribution: 'temurin'
56+
57+
- name: Setup Gradle
58+
uses: gradle/actions/setup-gradle@v4
59+
60+
- name: Create local.properties
61+
run: |
62+
cat > local.properties << 'EOF'
63+
anthropic_api_key=placeholder
64+
google_api_key=placeholder
65+
openai_api_key=placeholder
66+
EOF
67+
5368
- name: Run iOS simulator tests
54-
if: ${{ matrix.ios }}
5569
timeout-minutes: 25
5670
run: ./gradlew :ampere-core:iosSimulatorArm64Test

0 commit comments

Comments
 (0)