Skip to content

Commit b8c93b4

Browse files
committed
Add modular build xc
1 parent 918620f commit b8c93b4

File tree

6 files changed

+79
-39
lines changed

6 files changed

+79
-39
lines changed

.github/actions/common-setup/action.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@ name: Common CI Setup
22
description: Checkout + Java + optional Xcode + optional KVM
33

44
inputs:
5-
xcode-version:
6-
description: Xcode version (macos only). Empty to skip.
5+
override-cache:
6+
description: 'Override Cache?'
77
required: false
8-
default: ""
8+
default: "false"
99
enable-kvm:
1010
description: Enable KVM for Android emulator tests
1111
required: false
1212
default: "false" # composite inputs are strings
13-
override-cache:
14-
description: 'Override Cache?'
15-
required: true
1613

1714
runs:
1815
using: "composite"
@@ -29,10 +26,10 @@ runs:
2926
java-version: "17"
3027

3128
- name: Setup Xcode
32-
if: ${{ inputs.xcode-version != '' }}
29+
if: runner.os == 'macOS'
3330
uses: maxim-lobanov/setup-xcode@v1
3431
with:
35-
xcode-version: ${{ inputs.xcode-version }}
32+
xcode-version: "16.2.0"
3633

3734
- name: Enable KVM
3835
if: ${{ inputs.enable-kvm == 'true' }}

.github/workflows/build-everything.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: build
33
on:
44
workflow_call:
55
inputs:
6+
matrix-file-name:
7+
description: 'Json File containing arbitrary strategy-matrix; MUST be inside repository ./github folder'
8+
required: true
9+
type: string
610
kotlin-version:
711
description: 'Override Kotlin version?'
812
required: false
@@ -13,29 +17,32 @@ on:
1317
required: false
1418
default: ''
1519
type: string
16-
matrix-file-name:
17-
description: 'Json File containing arbitrary strategy-matrix; MUST be inside repository ./github folder'
18-
required: true
19-
type: string
20-
override-cache:
21-
required: false
22-
default: false
23-
type: boolean
2420

2521
jobs:
2622
prepare-matrix:
2723
uses: a-sit-plus/internal-workflows/.github/workflows/prepare-matrix.yml@feature/modularTests
2824
with:
2925
file-name: ${{ inputs.matrix-file-name }}
3026

31-
build:
27+
build-jar:
28+
needs: prepare-matrix
29+
strategy:
30+
fail-fast: false
31+
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
32+
uses: a-sit-plus/internal-workflows/.github/workflows/build-matrix-entry.yml@feature/modularTests
33+
with:
34+
module: ${{ matrix.module }}
35+
kotlin-version: ${{ inputs.kotlinVersion }}
36+
testballoon-version: ${{ inputs.testballoonVersion }}
37+
38+
build-xc:
3239
needs: prepare-matrix
3340
strategy:
3441
fail-fast: false
3542
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
3643
uses: a-sit-plus/internal-workflows/.github/workflows/build-matrix-entry.yml@feature/modularTests
3744
with:
3845
module: ${{ matrix.module }}
46+
artifact-name: ${{ matrix.artifactName }}
3947
kotlin-version: ${{ inputs.kotlinVersion }}
4048
testballoon-version: ${{ inputs.testballoonVersion }}
41-
override-cache: ${{ inputs.override-cache }}

.github/workflows/build-matrix-entry.yml renamed to .github/workflows/build-jar-matrix-entry.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ on:
1717
required: false
1818
default: ""
1919
type: string
20-
override-cache:
21-
required: false
22-
default: false
23-
type: boolean
2420

2521
jobs:
2622
build:
@@ -34,8 +30,6 @@ jobs:
3430
steps:
3531
- name: Common setup
3632
uses: a-sit-plus/internal-workflows/.github/actions/common-setup@feature/modularTests
37-
with:
38-
override-cache: ${{ inputs.override-cache }}
3933

4034
- name: Build jar
4135
run: ./gradlew assemble
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build XCFramework Matrix Entry
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
module:
7+
required: true
8+
type: string
9+
artifact-name:
10+
required: true
11+
type: string
12+
kotlin-version:
13+
description: "Override Kotlin version?"
14+
required: false
15+
default: ""
16+
type: string
17+
testballoon-version:
18+
description: "Override TestBalloon version (full version string)?"
19+
required: false
20+
default: ""
21+
type: string
22+
23+
jobs:
24+
build:
25+
runs-on: macos-latest
26+
timeout-minutes: 120
27+
28+
env:
29+
KOTLIN_VERSION_ENV: ${{ inputs.kotlin-version }}
30+
TESTBALLOON_VERSION_OVERRIDE: ${{ inputs.testballoon-version }}
31+
32+
steps:
33+
- name: Common setup
34+
uses: a-sit-plus/internal-workflows/.github/actions/common-setup@feature/modularTests
35+
36+
- name: Build klibs
37+
run: ./gradlew iosArm64MainKlibrary iosX64MainKlibrary
38+
39+
- name: Build XCFramework
40+
run: ./gradlew assemble${{ inputs.artifact-name }}XCFramework
41+
42+
- name: Upload debug XCFramework
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: ${{ inputs.artifact-name }}-debug.xcframework
46+
path: ${{ inputs.name }}/build/XCFrameworks/debug/
47+
if-no-files-found: error
48+
49+
- name: Upload release XCFramework
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: ${{ inputs.artifact-name }}-release.xcframework
53+
path: ${{ inputs.name }}/build/XCFrameworks/release/
54+
if-no-files-found: error

.github/workflows/test-everything.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
override-cache: ${{ inputs.override-cache }}
3939
os: ${{ matrix.os }}
4040
name: ${{ matrix.name }}
41-
arch: ${{ matrix.arch }}
4241
testArgs: ${{ matrix.testArgs }}
4342
enable-kvm: ${{ matrix.enableKvm || false }}
4443
xcode-version: ${{ matrix.xcodeVersion || '' }}

.github/workflows/test-matrix-entry.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ on:
1717
(for example: jvm, native, android, ios)'
1818
required: true
1919
type: string
20-
arch:
21-
description: 'Target architecture for this test run
22-
(for example: x64, arm64)'
23-
required: true
24-
type: string
2520
testArgs:
2621
description: 'Gradle command-line arguments specifying which tests to run'
2722
required: true
@@ -31,11 +26,6 @@ on:
3126
required: false
3227
default: false
3328
type: boolean
34-
xcode-version:
35-
description: 'Xcode version for Apple platform tests (macos runners only)'
36-
required: false
37-
default: ''
38-
type: string
3929
kotlin-version:
4030
description: 'Override Kotlin version?'
4131
required: false
@@ -60,9 +50,8 @@ jobs:
6050
- name: Common setup
6151
uses: a-sit-plus/internal-workflows/.github/actions/common-setup@feature/modularTests
6252
with:
63-
xcode-version: ${{ inputs.xcode-version }}
64-
enable-kvm: ${{ inputs.enable-kvm }}
6553
override-cache: ${{ inputs.override-cache }}
54+
enable-kvm: ${{ inputs.enable-kvm }}
6655

6756
- name: Run tests
6857
shell: 'bash'
@@ -71,5 +60,5 @@ jobs:
7160
- name: Reporting
7261
uses: a-sit-plus/internal-workflows/.github/actions/common-reporting@feature/modularTests
7362
with:
74-
caller-name: ${{ github.workflow }}
75-
matrix-identifier: ${{ inputs.os }}-${{ inputs.name }}-${{ inputs.arch }}
63+
report-name: ${{ github.workflow }}
64+
matrix-identifier: ${{ runner.os }}-${{ inputs.name }}-${{ runner.arch }}

0 commit comments

Comments
 (0)