-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
574b51b
commit b50d6dd
Showing
5 changed files
with
230 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Run IDEA Tests | ||
concurrency: | ||
group: run-idea-tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
env: | ||
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
JAVA_VERSION: '17' | ||
jobs: | ||
run-common-idea-tests: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
- name: Verify plugin project configuration | ||
run: ./gradlew :kmp-nativecoroutines-idea-plugin:verifyPluginProjectConfiguration | ||
- name: Verify plugin structure | ||
run: ./gradlew :kmp-nativecoroutines-idea-plugin:verifyPluginStructure | ||
- name: Run binary compatibility validator | ||
run: ./gradlew :kmp-nativecoroutines-idea-plugin:apiCheck | ||
run-idea-tests: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | ||
needs: | ||
- run-common-idea-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platformType: [ IC, IU, AI ] | ||
name: ${{ format('IDEA ({0})', matrix.platformType) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
- name: Verify plugin | ||
env: | ||
VERIFICATION_PLATFORM_TYPE: ${{ matrix.platformType }} | ||
run: ./gradlew :kmp-nativecoroutines-idea-plugin:verifyPlugin -PverificationPlatformType=$VERIFICATION_PLATFORM_TYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Run Integration Tests | ||
concurrency: | ||
group: run-integration-tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
env: | ||
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
JAVA_VERSION: '17' | ||
XCODE_VERSION: '15.2' | ||
XCODEBUILD_DESTINATION_iOS: platform=iOS Simulator,name=iPhone 14 Pro | ||
XCODEBUILD_DESTINATION_macOS: platform=OS X | ||
XCODEBUILD_DESTINATION_tvOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation) | ||
XCODEBUILD_DESTINATION_watchOS: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm) | ||
jobs: | ||
run-integration-tests: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | ||
needs: | ||
- run-kotlin-tests | ||
- run-swift-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ iOS, macOS, tvOS, watchOS ] | ||
embeddable-compiler: [ true, false ] | ||
ksp-mode: [ true, false ] | ||
name: ${{ format('Sample {0} (embeddable {1}, KSP {2})', matrix.platform, matrix.embeddable-compiler, matrix.ksp-mode) }} | ||
runs-on: macos-14 | ||
env: | ||
XCODEBUILD_SCHEME_iOS: iOS App | ||
XCODEBUILD_SCHEME_macOS: macOS App | ||
XCODEBUILD_SCHEME_tvOS: tvOS App | ||
XCODEBUILD_SCHEME_watchOS: watchOS Tests | ||
defaults: | ||
run: | ||
working-directory: sample | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: Setup Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
- name: Cache Konan | ||
uses: ./.github/actions/cache-konan | ||
- name: Set kotlin.native.useEmbeddableCompilerJar | ||
env: | ||
KOTLIN_NATIVE_EMBEDDABLE_COMPILER: ${{ matrix.embeddable-compiler }} | ||
run: echo "kotlin.native.useEmbeddableCompilerJar=$KOTLIN_NATIVE_EMBEDDABLE_COMPILER" >> gradle.properties | ||
- name: Run tests | ||
env: | ||
XCODEBUILD_SCHEME: ${{ env[format('XCODEBUILD_SCHEME_{0}', matrix.platform)] }} | ||
XCODEBUILD_DESTINATION: ${{ env[format('XCODEBUILD_DESTINATION_{0}', matrix.platform)] }} | ||
NATIVE_COROUTINES_KSP_MODE: ${{ matrix.ksp-mode }} | ||
run: >- | ||
xcodebuild test | ||
-project KMPNativeCoroutinesSample.xcodeproj | ||
-scheme "$XCODEBUILD_SCHEME" | ||
-destination "$XCODEBUILD_DESTINATION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Run Kotlin Tests | ||
concurrency: | ||
group: run-kotlin-tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
env: | ||
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
JAVA_VERSION: '17' | ||
XCODE_VERSION: '15.2' | ||
jobs: | ||
run-kotlin-tests: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
module: [ annotations, compiler, compiler-embeddable, core, gradle-plugin, ksp ] | ||
name: ${{ matrix.module }} | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v2 | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | ||
- name: Cache Konan | ||
uses: ./.github/actions/cache-konan | ||
- name: Run tests | ||
env: | ||
GRADLE_MODULE: ${{ format(':kmp-nativecoroutines-{0}', matrix.module) }} | ||
IS_COMPILER_MODULE: ${{ matrix.module == 'compiler' }} | ||
run: ./gradlew $GRADLE_MODULE:check -PbuildForCompilerTest=$IS_COMPILER_MODULE | ||
- name: Archive reports | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: kmp-nativecoroutines-${{ matrix.module }}-reports | ||
path: '*/build/reports/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Run Swift Tests | ||
concurrency: | ||
group: run-swift-tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
env: | ||
XCODE_VERSION: '15.2' | ||
XCODEBUILD_DESTINATION_iOS: platform=iOS Simulator,name=iPhone 14 Pro | ||
XCODEBUILD_DESTINATION_macOS: platform=OS X | ||
XCODEBUILD_DESTINATION_tvOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation) | ||
XCODEBUILD_DESTINATION_watchOS: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm) | ||
jobs: | ||
run-swift-tests: | ||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ iOS, macOS, tvOS, watchOS ] | ||
implementation: [ Async, Combine, RxSwift ] | ||
name: ${{ format('{0} {1}', matrix.implementation, matrix.platform) }} | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Run tests | ||
env: | ||
XCODEBUILD_SCHEME: ${{ format('KMPNativeCoroutines{0}', matrix.implementation) }} | ||
XCODEBUILD_DESTINATION: ${{ env[format('XCODEBUILD_DESTINATION_{0}', matrix.platform)] }} | ||
run: >- | ||
xcodebuild test | ||
-project KMPNativeCoroutines.xcodeproj | ||
-scheme "$XCODEBUILD_SCHEME" | ||
-destination "$XCODEBUILD_DESTINATION" |
Oops, something went wrong.