Skip to content

Commit

Permalink
Impl iOS build step to github actions pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mbakgun committed Nov 5, 2023
1 parent 11c2c3b commit a96209d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,37 @@ jobs:
uses: eskatos/gradle-command-action@v2
with:
arguments: assembleDebug
iOS-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Build macOS shared code
run: ./gradlew :shared:compileKotlinIosSimulatorArm64

- name: iOS set up
description: Sets up Kotlin Native and Cocoapods
runs:
using: "composite"
steps:
- shell: bash
run: ./gradlew :shared:generateDummyFramework

- name: Set up cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest

- shell: bash
name: Install Dependencies
run: |
cd iosApp
pod install --verbose
- name: Build iOS app
run: xcodebuild build -workspace iosApp/iosApp.xcworkspace -configuration Debug -scheme iosApp -sdk iphoneos -destination name='iPhone 14' -verbose
8 changes: 8 additions & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,11 @@ detekt {
autoCorrect = true
buildUponDefaultConfig = true
}

kotlin {
sourceSets {
all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
}

0 comments on commit a96209d

Please sign in to comment.