Release only the stagedRepositoryId created in deployment #4354
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
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 | |
SKIP_KORGE_SAMPLES: true | |
DISPLAY: ":99" | |
JAVA_VERSION: 21 | |
JAVA_DISTRIBUTION: zulu | |
ENABLE_BENCHMARKS: false | |
jobs: | |
test: | |
strategy: | |
fail-fast: false # Once working, comment this | |
matrix: | |
include: | |
- { outputKey: testIos, os: macos-latest, testTask: iosX64Test, precompileTask: compileTestKotlinIosX64, enableKotlinNative: true } | |
- { outputKey: testJs, os: ubuntu-latest, testTask: "wasmJsBrowserTest", buildTasks: "jsBrowserTest jsDenoTest", precompileTask: "wasmJsTestClasses jsTestClasses" } | |
- { outputKey: testAndroid, os: ubuntu-latest, enableAndroid: true, precompileTask: "compileDebugAndroidTestSources" } | |
- { outputKey: testJvmMacos, os: macos-latest, testTask: jvmTest, precompileTask: "compileTestKotlinJvm compileTestKotlin" } | |
- { outputKey: testJvmLinux, os: ubuntu-latest, testTask: jvmTest, precompileTask: "compileTestKotlinJvm compileTestKotlin", enableKotlinNative: true, enableSandbox: true, e2e: true } | |
- { outputKey: testJvmWindows, os: windows-latest, testTask: jvmTest, precompileTask: "compileTestKotlinJvm compileTestKotlin" } | |
#if: ${{ needs.changes.outputs[matrix.outputKey] == 'true' }} | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
env: | |
DISABLE_KOTLIN_NATIVE: ${{ !matrix.enableKotlinNative }} | |
DISABLE_ANDROID: ${{ !matrix.enableAndroid }} | |
DISABLE_SANDBOX: ${{ !matrix.enableSandbox }} | |
#GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process -Dorg.gradle.workers.max=3 | |
steps: | |
- { uses: actions/checkout@v4 } | |
- { name: Setup Deno, uses: denoland/setup-deno@916edb9a40fd86d1ff57b758807ebe57242f7407, with: { deno-version: "1.44.4" } } # https://github.com/denoland/setup-deno/releases/tag/1.4.0 | |
- { name: Install freeglut3 & openal, if: "${{ startsWith(matrix.os, 'ubuntu-') }}", run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev xvfb } | |
- { name: Run Xvfb in Background, if: "${{ startsWith(matrix.os, 'ubuntu-') }}", run: "Xvfb :99 &" } | |
- { name: Download and unzip opengl, if: "${{ startsWith(matrix.os, 'windows-') }}", shell: cmd, run: "curl -L -o opengl32-x64.zip https://github.com/korlibs/mesa-dist-win/releases/download/21.2.3/opengl32-x64.zip && unzip opengl32-x64.zip && unzip opengl32-x64.zip -d korge" } | |
- { name: Set up JDK, uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } # https://github.com/actions/setup-java/releases/tag/v4.2.2 | |
- { name: Prepare Gradle, uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 } # https://github.com/gradle/actions/releases/tag/v3.1.0 | |
- { name: Start gradle, run: ./gradlew } | |
- { name: "Building ${{ matrix.precompileTask }} classes", if: "${{ matrix.precompileTask }}", run: "./gradlew --stacktrace ${{ matrix.precompileTask }}" } | |
#- { name: Testing JVM on windows, shell: cmd, run: "CALL gradlew.bat --parallel jvmTest", env: { EGL_LOG_LEVEL: debug, LIBGL_DEBUG: verbose, LIBGL_ALWAYS_SOFTWARE: true, MESA_DEBUG: true } } | |
- { name: "Run ${{ matrix.testTask }} tests", if: "${{ matrix.testTask }}", run: "./gradlew ${{ matrix.testTask }}", env: { EGL_LOG_LEVEL: debug, LIBGL_DEBUG: verbose, LIBGL_ALWAYS_SOFTWARE: true, MESA_DEBUG: true } } | |
- { name: "Run ${{ matrix.buildTasks }}", if: "${{ matrix.buildTasks }}", run: "./gradlew ${{ 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@f0d1ed2dcad93c7479e8b2f2226c83af54494915, with: { "api-level": 21, "script": "./gradlew connectedCheck" } } # https://github.com/ReactiveCircus/android-emulator-runner/releases/tag/v2.32.0 | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v4, with: { name: "test-results-${{ matrix.os }}", retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { name: Check sandbox compiles, if: "${{ matrix.e2e }}", run: "./gradlew :korge-sandbox:jvmJar" } | |
- { name: Publish to maven local, if: "${{ matrix.e2e }}", run: ./gradlew --parallel publishJvmLocal publishKotlinMultiplatformPublicationToMavenLocal } | |
- { name: e2e test, if: "${{ matrix.e2e }}", working-directory: e2e/e2e-test, run: ./gradlew checkReferencesJvm --stacktrace } | |
- { name: Archive E2E Test Results, if: "${{ matrix.e2e && failure() }}", uses: actions/upload-artifact@v4, with: { name: e2e-test-results-linux-jvm, retention-days: 21, path: "**/e2e/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { name: e2e multi test and hotreload, if: "${{ matrix.e2e }}", working-directory: e2e/e2e-test-multi, run: "./gradlew --watch-fs --warn --configuration-cache --configuration-cache-problems=warn compileKotlinJvm" } | |
- { name: e2e multi test runJvmAutoreload, if: "${{ matrix.e2e }}", working-directory: e2e/e2e-test-multi, run: "./gradlew --configuration-cache :client:runJvmAutoreload" } | |
- { name: e2e multi test packageJvmFatJar, if: "${{ matrix.e2e }}", working-directory: e2e/e2e-test-multi, run: "./gradlew --configuration-cache :client:packageJvmFatJar" } | |
- { name: Check publication includes iOS, if: "${{ matrix.e2e }}", run: ./gradlew checkModulePublication } |