Skip to content

Commit

Permalink
Merge branch 'master' into feature/GH-42-swift-to-kotlin-wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
rickclephas committed Aug 3, 2024
2 parents 6d13b46 + b542de7 commit c20c64a
Show file tree
Hide file tree
Showing 213 changed files with 11,860 additions and 1,071 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cache-konan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Caches Konan files
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- id: get-java-home-11
run: echo "JAVA_HOME_11_X64=$JAVA_HOME_11_X64" >> $GITHUB_OUTPUT
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: -v,${{ steps.get-java-home-11.outputs.JAVA_HOME_11_X64 }}:/root/.jdks/jdk11
post-pr-comment: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/release-idea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Publish a IDEA plugin release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-idea-[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-idea-[0-9]+.[0-9]+-EAP-[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.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]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC-idea-[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC-idea-[0-9]+.[0-9]+-EAP-[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+-idea-[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+-idea-[0-9]+.[0-9]+-EAP-[0-9]+.[0-9]+'
jobs:
publish-idea-plugin:
runs-on: macos-12
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: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Publish IDEA plugin
run: ./gradlew publishPlugin
env:
IDEA_CERTIFICATE_CHAIN: ${{ secrets.IDEA_CERTIFICATE_CHAIN }}
IDEA_PRIVATE_KEY: ${{ secrets.IDEA_PRIVATE_KEY }}
IDEA_PRIVATE_KEY_PASSWORD: ${{ secrets.IDEA_PRIVATE_KEY_PASSWORD }}
IDEA_PUBLISH_TOKEN: ${{ secrets.IDEA_PUBLISH_TOKEN }}
23 changes: 11 additions & 12 deletions .github/workflows/release-kotlin-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,40 @@ on:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-Beta'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-Beta'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlinx-[0-9]+.[0-9]+.[0-9]+-Beta'
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-Beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-Beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlinx-[0-9]+.[0-9]+.[0-9]+-Beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlinx-[0-9]+.[0-9]+.[0-9]+-RC'
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlinx-[0-9]+.[0-9]+.[0-9]+-RC[0-9]+'
jobs:
publish-kotlin-libraries:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Publish to Sonatype
run: ./gradlew publishAllPublicationsToSonatypeRepository
run: ./gradlew publishAllPublicationsToSonatypeRepository --no-configuration-cache
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Publish IDEA plugin
run: ./gradlew publishPlugin
env:
IDEA_CERTIFICATE_CHAIN: ${{ secrets.IDEA_CERTIFICATE_CHAIN }}
IDEA_PRIVATE_KEY: ${{ secrets.IDEA_PRIVATE_KEY }}
IDEA_PRIVATE_KEY_PASSWORD: ${{ secrets.IDEA_PRIVATE_KEY_PASSWORD }}
IDEA_PUBLISH_TOKEN: ${{ secrets.IDEA_PUBLISH_TOKEN }}
21 changes: 8 additions & 13 deletions .github/workflows/release-kotlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,33 @@ jobs:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Publish to Sonatype
run: ./gradlew publishAllPublicationsToSonatypeRepository
run: ./gradlew publishAllPublicationsToSonatypeRepository --no-configuration-cache
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Publish to Gradle Plugin Portal
run: ./gradlew publishPlugins
run: ./gradlew publishPlugins --no-configuration-cache
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Publish IDEA plugin
run: ./gradlew publishPlugin
env:
IDEA_CERTIFICATE_CHAIN: ${{ secrets.IDEA_CERTIFICATE_CHAIN }}
IDEA_PRIVATE_KEY: ${{ secrets.IDEA_PRIVATE_KEY }}
IDEA_PRIVATE_KEY_PASSWORD: ${{ secrets.IDEA_PRIVATE_KEY_PASSWORD }}
IDEA_PUBLISH_TOKEN: ${{ secrets.IDEA_PUBLISH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish Async SPM tag
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/run-idea-tests.yaml
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:
name: idea-plugin
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:
needs:
- run-common-idea-tests
strategy:
fail-fast: false
matrix:
ide: [ IC, IU, AI ]
build: [ 241, 242 ]
name: ${{ format('{0}-{1}', matrix.ide, matrix.build) }}
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_IDE: ${{ format('{0}-{1}', matrix.ide, matrix.build) }}
run: ./gradlew :kmp-nativecoroutines-idea-plugin:verifyPlugin -PverificationIde=$VERIFICATION_IDE
67 changes: 67 additions & 0 deletions .github/workflows/run-integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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:
strategy:
fail-fast: false
matrix:
platform: [ iOS, macOS, tvOS, watchOS ]
embeddable-compiler: [ true, false ]
ksp-mode: [ true, false ]
name: ${{ format('{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"
Loading

0 comments on commit c20c64a

Please sign in to comment.