Skip to content

Commit 5bccf69

Browse files
authored
Merge pull request #346 from l2hyunwoo/feature/multi-platform-ci
[multi-platform-ci] Android, iOS, Desktop, Web CI 액션 추가
2 parents cb79871 + eb2a9c9 commit 5bccf69

16 files changed

Lines changed: 261 additions & 9 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Setup JDK"
2+
description: "setup JDK and gradle caching"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Validate Gradle Wrapper
8+
uses: gradle/actions/wrapper-validation@v4
9+
10+
- name: Copy CI gradle.properties
11+
shell: bash
12+
run: |
13+
mkdir -p ~/.gradle
14+
cp .github/ci-gradle.properties ~/.gradle/gradle.properties
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v4
24+
with:
25+
gradle-version: wrapper
26+
27+
- name: set konan cache key
28+
id: konan-cache-key
29+
shell: bash
30+
run: echo "KOTLIN_VERSION=$(grep -oE 'kotlin\s*=\s*"[0-9.]*"' gradle/libs.versions.toml | grep -oE '[0-9.]+')" >> $GITHUB_OUTPUT
31+
32+
- name: cache Konan
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.konan
37+
key: v1-konan-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ steps.konan-cache-key.outputs.KOTLIN_VERSION }}

.github/ci-gradle.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# From now in android
2+
# https://github.com/android/nowinandroid
3+
org.gradle.daemon=false
4+
org.gradle.parallel=true
5+
org.gradle.jvmargs=-Xmx5120m
6+
org.gradle.workers.max=2
7+
kotlin.incremental=false
8+
kotlin.compiler.execution.strategy=in-process
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Android Build
2+
# From now in android
3+
# https://github.com/android/nowinandroid
4+
5+
on:
6+
push:
7+
branches:
8+
- develop-2025
9+
pull_request:
10+
paths-ignore:
11+
- 'iosApp/**'
12+
- 'kotlin-js-store'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions: {}
19+
20+
jobs:
21+
build:
22+
permissions:
23+
contents: read
24+
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 60
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4.2.2
31+
32+
- uses: ./.github/actions/setup-java
33+
34+
- run: ./gradlew :composeApp:assembleDebug --stacktrace
35+
36+
- name: Upload build outputs (APKs)
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: build-outputs
40+
path: composeApp/build/outputs
41+
retention-days: 1
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: iOS Arm(Apple Silicon) Build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop-2025
7+
pull_request:
8+
9+
concurrency:
10+
group: ios-build-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-ios:
15+
runs-on: macos-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: ./.github/actions/setup-java
20+
- name: Set up XCFramework arch filter
21+
run: echo "arch=ARM64" >> local.properties
22+
- run: make build-app-debug
23+
working-directory: iosApp
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: iOS x64(Intel) Build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop-2025
7+
pull_request:
8+
9+
concurrency:
10+
group: ios-build-intel-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-ios:
15+
runs-on: macos-13
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: ./.github/actions/setup-java
20+
- name: Set up XCFramework arch filter
21+
run: echo "arch=X86_64" >> local.properties
22+
- run: make build-app-debug-x64
23+
working-directory: iosApp
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Compose Desktop(JVM) Build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop-2025
7+
pull_request:
8+
paths-ignore:
9+
- 'iosApp/**'
10+
- 'kotlin-js-store'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions: { }
17+
18+
jobs:
19+
build:
20+
permissions:
21+
contents: read
22+
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 60
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- uses: ./.github/actions/setup-java
31+
32+
- run: ./gradlew :composeApp:desktopJar --stacktrace

.github/workflows/wasm-build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Compose Wasm(Web) Build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop-2025
7+
pull_request:
8+
paths-ignore:
9+
- 'iosApp/**'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions: { }
16+
17+
jobs:
18+
build:
19+
permissions:
20+
contents: read
21+
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 60
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- uses: ./.github/actions/setup-java
30+
31+
- name: kotlinUpgradeYarnLock
32+
run: ./gradlew kotlinUpgradeYarnLock
33+
34+
- run: ./gradlew :composeApp:wasmJsBrowserDistribution --stacktrace

composeApp/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ kotlin {
2525

2626
@OptIn(ExperimentalWasmDsl::class)
2727
wasmJs {
28-
moduleName = "composeApp"
28+
outputModuleName.set("composeApp")
2929
browser {
3030
val rootDirPath = project.rootDir.path
3131
val projectDirPath = project.projectDir.path
3232
commonWebpackConfig {
3333
outputFileName = "composeApp.js"
3434
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
3535
static = (static ?: mutableListOf()).apply {
36-
// Serve sources to debug inside browser
3736
add(rootDirPath)
3837
add(projectDirPath)
3938
}

iosApp/Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
PROJECT_FILE := iosApp.xcodeproj
2+
SCHEME_NAME_APP := iosApp
3+
4+
.PHONY: setup
5+
setup:
6+
brew bundle --no-lock
7+
8+
.PHONY: open
9+
open:
10+
open $(PROJECT_FILE)
11+
12+
.PHONY: build-app-debug
13+
build-app-debug:
14+
set -o pipefail && \
15+
xcodebuild -project $(PROJECT_FILE) \
16+
-scheme $(SCHEME_NAME_APP) \
17+
-configuration Debug \
18+
-skipPackagePluginValidation \
19+
-skipMacroValidation \
20+
-destination "platform=iOS Simulator,name=iPhone 16 Pro,OS=18.1" \
21+
clean build
22+
23+
.PHONY: build-app-debug-x64
24+
build-app-debug-x64:
25+
set -o pipefail && \
26+
xcodebuild -project $(PROJECT_FILE) \
27+
-scheme $(SCHEME_NAME_APP) \
28+
-configuration Debug \
29+
-skipPackagePluginValidation \
30+
-skipMacroValidation \
31+
-allowProvisioningUpdates \
32+
-destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2" \
33+
clean build
34+
35+
# Gradle Utility
36+
.PHONY: gradle-clean
37+
gradle-clean:
38+
cd .. && \
39+
./gradlew --stop && ./gradlew clean

iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
CODE_SIGN_IDENTITY = "Apple Development";
320320
CODE_SIGN_STYLE = Automatic;
321321
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
322-
DEVELOPMENT_TEAM = "${TEAM_ID}";
322+
DEVELOPMENT_TEAM = K6C4366874;
323323
ENABLE_PREVIEWS = YES;
324324
FRAMEWORK_SEARCH_PATHS = (
325325
"$(inherited)",
@@ -346,7 +346,7 @@
346346
CODE_SIGN_IDENTITY = "Apple Development";
347347
CODE_SIGN_STYLE = Automatic;
348348
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
349-
DEVELOPMENT_TEAM = "${TEAM_ID}";
349+
DEVELOPMENT_TEAM = K6C4366874;
350350
ENABLE_PREVIEWS = YES;
351351
FRAMEWORK_SEARCH_PATHS = (
352352
"$(inherited)",
@@ -390,4 +390,4 @@
390390
/* End XCConfigurationList section */
391391
};
392392
rootObject = 7555FF73242A565900829871 /* Project object */;
393-
}
393+
}

0 commit comments

Comments
 (0)