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 20, 2023
2 parents 0e9126a + 873263c commit 50bf5e8
Show file tree
Hide file tree
Showing 224 changed files with 8,170 additions and 2,490 deletions.
12 changes: 0 additions & 12 deletions .github/actions/cache-gradle/action.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/actions/cache-konan/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Cache Konan
description: Caches Konan files
runs:
using: composite
steps:
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }}
restore-keys: |
${{ runner.os }}-konan-
${{ runner.os }}-konan-
6 changes: 4 additions & 2 deletions .github/actions/publish-spm-tag/action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish a SPM tag
name: Publish SPM tag
description: Publishes a SPM tag
inputs:
package-name:
description: The name of the SPM package branch
Expand All @@ -17,4 +18,5 @@ runs:
git merge --no-edit ${{ inputs.version-name }}
git tag ${{ inputs.version-name }}-spm-${{ inputs.package-name }}
git push origin spm/${{ inputs.package-name }}:spm/${{ inputs.package-name }}
git push origin ${{ inputs.version-name }}-spm-${{ inputs.package-name }}
git push origin ${{ inputs.version-name }}-spm-${{ inputs.package-name }}
git checkout -
35 changes: 35 additions & 0 deletions .github/workflows/release-kotlin-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish a Kotlin preview release
on:
push:
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]+-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]+-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]+'
jobs:
publish-kotlin-libraries:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Publish to Sonatype
run: ./gradlew publishAllPublicationsToSonatypeRepository
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 }}
25 changes: 16 additions & 9 deletions .github/workflows/release-kotlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-new-mm'
- 'v[0-9]+.[0-9]+.[0-9]+-new-mm-[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-kotlin-[0-9]+.[0-9]+.[0-9]+'
jobs:
publish-kotlin-libraries:
runs-on: macos-11
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Cache Gradle
uses: ./.github/actions/cache-gradle
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Publish to Sonatype
Expand All @@ -38,4 +38,11 @@ jobs:
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 }}
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 }}
80 changes: 21 additions & 59 deletions .github/workflows/release-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,57 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+'
jobs:
publish-cocoapods-core:
runs-on: macos-11
publish-cocoapods-libraries:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2'
xcode-version: '14.1'
- name: Publish KMPNativeCoroutinesCore
run: pod trunk push KMPNativeCoroutinesCore.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish-cocoapods-async:
needs: publish-cocoapods-core
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2'
- name: Publish KMPNativeCoroutinesAsync
run: pod trunk push KMPNativeCoroutinesAsync.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish-spm-async:
- name: Publish KMPNativeCoroutinesCombine
run: pod trunk push KMPNativeCoroutinesCombine.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
- name: Publish KMPNativeCoroutinesRxSwift
run: pod trunk push KMPNativeCoroutinesRxSwift.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish-spm-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish Async SPM tag
uses: ./.github/actions/publish-spm-tag
with:
package-name: async
version-name: ${{ github.ref_name }}
publish-cocoapods-combine:
needs: publish-cocoapods-core
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2'
- name: Publish KMPNativeCoroutinesCombine
run: pod trunk push KMPNativeCoroutinesCombine.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish-spm-combine:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Publish Combine SPM tag
uses: ./.github/actions/publish-spm-tag
with:
package-name: combine
version-name: ${{ github.ref_name }}
publish-cocoapods-rxswift:
needs: publish-cocoapods-core
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2'
- name: Publish KMPNativeCoroutinesRxSwift
run: pod trunk push KMPNativeCoroutinesRxSwift.podspec --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish-spm-rxswift:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Publish RxSwift SPM tag
uses: ./.github/actions/publish-spm-tag
with:
package-name: rxswift
version-name: ${{ github.ref_name }}
version-name: ${{ github.ref_name }}
- name: Publish no-deps SPM tag
uses: ./.github/actions/publish-spm-tag
with:
package-name: no-deps
version-name: ${{ github.ref_name }}
79 changes: 50 additions & 29 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,78 @@ on:
- master
- kotlin/**
env:
XCODEBUILD_DESTINATION_iOS: platform=iOS Simulator,name=iPhone 12 Pro Max
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
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
XCODEBUILD_DESTINATION_watchOS: platform=watchOS Simulator,name=Apple Watch Series 7 - 45mm
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-kotlin-tests:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
os: [ macos-11 ]
java: [ 11 ]
module: [ core ]
name: ${{ format('{0} ({1}, JDK {2})', matrix.module, matrix.os, matrix.java) }}
os: [ macos-12 ]
xcode: [ 14.2 ]
java: [ 17 ]
module: [ core, ksp, compiler ]
name: ${{ format('{0} ({1}, Xcode {2}, JDK {3})', matrix.module, matrix.os, matrix.xcode, matrix.java) }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: Cache Gradle
uses: ./.github/actions/cache-gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cache Konan
uses: ./.github/actions/cache-konan
- name: Run tests
env:
GRADLE_MODULE: ${{ format(':kmp-nativecoroutines-{0}', matrix.module) }}
run: ./gradlew $GRADLE_MODULE:allTests
run: ./gradlew $GRADLE_MODULE:check
run-idea-tests:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Verify plugin
run: ./gradlew :kmp-nativecoroutines-idea-plugin:verifyPlugin
- name: Run plugin verifier
run: ./gradlew :kmp-nativecoroutines-idea-plugin:runPluginVerifier
run-swift-tests:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
os: [ macos-11 ]
xcode: [ 13.2 ]
os: [ macos-12 ]
xcode: [ 14.2 ]
platform: [ iOS, macOS, tvOS, watchOS ]
implementation: [ Async, Combine, RxSwift ]
name: ${{ format('{0} {1} ({2}, Xcode {3})', matrix.implementation, matrix.platform, matrix.os, matrix.xcode) }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -77,9 +102,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-11 ]
xcode: [ 13.2 ]
java: [ 11 ]
os: [ macos-12 ]
xcode: [ 14.2 ]
java: [ 17 ]
platform: [ iOS, macOS, tvOS, watchOS ]
embeddable-compiler: [ true, false ]
name: ${{ format('{0} (embeddable {1}) ({2}, Xcode {3}, JDK {4})', matrix.platform, matrix.embeddable-compiler, matrix.os, matrix.xcode, matrix.java) }}
Expand All @@ -94,36 +119,32 @@ jobs:
working-directory: sample
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: Cache Gradle
uses: ./.github/actions/cache-gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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: Install CocoaPods dependencies
run: |
./gradlew :shared:generateDummyFramework
pod install
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)] }}
run: >-
xcodebuild test
-workspace Sample.xcworkspace
-project KMPNativeCoroutinesSample.xcodeproj
-scheme "$XCODEBUILD_SCHEME"
-destination "$XCODEBUILD_DESTINATION"
-destination "$XCODEBUILD_DESTINATION"
Loading

0 comments on commit 50bf5e8

Please sign in to comment.