-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
1,664 additions
and
0 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,46 @@ | ||
name: DEPLOY | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
inputs: | ||
forced_version: | ||
description: 'FORCED_VERSION to use' | ||
required: true | ||
type: string | ||
|
||
env: | ||
CI: true | ||
FORCED_VERSION: ${{ inputs.forced_version || github.ref }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPEUSERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
JAVA_VERSION: 17 | ||
JAVA_DISTRIBUTION: zulu | ||
|
||
jobs: | ||
publish: | ||
runs-on: macos-latest | ||
steps: | ||
- { name: Checkout, uses: actions/checkout@v3 } | ||
- { name: Use Node.js 20.x, uses: actions/setup-node@v3, with: { node-version: 20.x } } | ||
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | ||
- { name: Replace Gradle Wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" } | ||
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0 | ||
- { name: Initialize Gradle, run: ./gradlew --no-configuration-cache } | ||
|
||
# To ensure we are fine before staging repository | ||
- { name: Publish Publications To Maven Local, run: ./gradlew --no-configuration-cache publishToMavenLocal } | ||
- { name: Generate artifacts .tar.zstd, run: ./gradlew --no-configuration-cache generateArtifactsTarZstd } | ||
- name: Github Release | ||
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
build/korlibs-*.tar.zstd | ||
- { name: Start Maven Central Staging Repository, run: ./gradlew --no-configuration-cache startReleasingMavenCentral } | ||
- { name: Publish Publications To Maven Repository, run: "./gradlew --no-configuration-cache publishAllPublicationsToMavenRepository" } | ||
- { name: Release to Maven Central, run: ./gradlew --no-configuration-cache releaseMavenCentral } |
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,58 @@ | ||
name: TEST | ||
# https://docs.github.com/en/actions/learn-github-actions/expressions | ||
|
||
on: | ||
push: | ||
branches: [ main, 'release/**' ] | ||
pull_request: | ||
branches: [ main, 'release/**' ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CI: true | ||
|
||
JAVA_VERSION: 17 | ||
JAVA_DISTRIBUTION: zulu | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false # Once working, comment this | ||
matrix: | ||
include: | ||
- { outputKey: testWindows, os: windows-latest, testTask: mingwX64Test, enableKotlinNative: true } | ||
- { outputKey: testLinux, os: ubuntu-latest, testTask: linuxX64Test, buildTasks: publishLinuxArm64PublicationToMavenLocal, enableKotlinNative: true } | ||
- { outputKey: testMacos, os: macos-latest, testTask: macosX64Test, buildTasks: publishMacosArm64PublicationToMavenLocal, enableKotlinNative: true } | ||
- { outputKey: testIos, os: macos-latest, testTask: iosX64Test, enableKotlinNative: true } | ||
#- { outputKey: testJs, os: ubuntu-latest, testTask: "wasmBrowserTest", buildTasks: "jsNodeTest jsBrowserTest" } | ||
- { outputKey: testJs, os: ubuntu-latest, testTask: "wasmBrowserTest", buildTasks: "jsBrowserTest jsDenoTest" } | ||
- { outputKey: testAndroid, os: ubuntu-latest, enableAndroid: true } | ||
- { outputKey: testJvmMacos, os: macos-latest, testTask: jvmTest } | ||
- { outputKey: testJvmLinux, os: ubuntu-latest, testTask: jvmTest, precompileTask: compileTestKotlinJvm, enableKotlinNative: true, enableSandbox: true, e2e: true } | ||
- { outputKey: testJvmWindows, os: windows-latest, testTask: jvmTest, precompileTask: compileTestKotlinJvm } | ||
#if: ${{ needs.changes.outputs[matrix.outputKey] == 'true' }} | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- { uses: actions/checkout@v4 } | ||
- { name: Use Node.js 20.x, uses: actions/setup-node@v4, with: { node-version: 20.x } } | ||
- { name: Setup Deno, uses: denoland/setup-deno@v1, with: { deno-version: "1.44.4" } } | ||
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" } | ||
- { name: Set up JDK, uses: actions/setup-java@v4, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | ||
- { name: Prepare Gradle, uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 } # v3.1.0 | ||
- { name: Start gradle, run: ./gradlew } | ||
- { if: "${{ matrix.precompileTask }}", name: "Building ${{ matrix.precompileTask }} classes", run: "./gradlew --no-configuration-cache --stacktrace ${{ matrix.precompileTask }}" } | ||
- { if: "${{ matrix.testTask }}", name: "Run ${{ matrix.testTask }} tests", run: "./gradlew --no-configuration-cache ${{ matrix.testTask }}" } | ||
- { if: "${{ matrix.buildTasks }}", name: "Run ${{ matrix.buildTasks }}", run: "./gradlew --no-configuration-cache ${{ matrix.buildTasks }}" } | ||
- name: Enable KVM | ||
if: "${{ matrix.enableAndroid }}" | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- { name: "Run Android Tests", if: "${{ matrix.enableAndroid }}", uses: reactivecircus/android-emulator-runner@v2, with: { "api-level": 21, "script": "./gradlew --no-configuration-cache connectedCheck lintDebug" } } | ||
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v4, with: { name: "test-results-${{ matrix.outputKey }}", retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | ||
- { if: "${{ matrix.e2e }}", name: Publish to maven local, run: ./gradlew --no-configuration-cache publishJvmLocal publishKotlinMultiplatformPublicationToMavenLocal } |
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,10 @@ | ||
/.gradle | ||
/.kotlin | ||
/.idea | ||
/build | ||
/java_*.hprof | ||
/local.properties | ||
$catalog.json | ||
/stagedRepositoryId | ||
/*/build | ||
.DS_Store |
Oops, something went wrong.