Extraction of korlibs-crypto #3924
Workflow file for this run
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: 17 | |
JAVA_DISTRIBUTION: zulu | |
ENABLE_BENCHMARKS: false | |
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-11, testTask: macosX64Test, buildTasks: publishMacosArm64PublicationToMavenLocal, enableKotlinNative: true } | |
- { outputKey: testIos, os: macos-11, testTask: iosX64Test, enableKotlinNative: true } | |
- { outputKey: testJs, os: ubuntu-latest, testTask: "wasmJsBrowserTest", buildTasks: "jsNodeTest jsBrowserTest" } | |
- { outputKey: testAndroid, os: ubuntu-latest, enableAndroid: true } | |
- { outputKey: testJvmMacos, os: macos-11, 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: 25 | |
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@v3 } | |
- { name: Configure parallel in local.properties, run: "echo org.gradle.parallel=true >> local.properties" } | |
- { 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" } | |
- { if: "${{ startsWith(matrix.os, 'ubuntu-') }}", name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev xvfb } | |
- { if: "${{ startsWith(matrix.os, 'ubuntu-') }}", name: Run Xvfb in Background, run: "Xvfb :99 &" } | |
- { if: "${{ startsWith(matrix.os, 'windows-') }}", name: Download and unzip opengl, 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@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0 | |
- { name: Start gradle, run: ./gradlew } | |
- { if: "${{ matrix.precompileTask }}", name: "Building ${{ matrix.precompileTask }} classes", run: "./gradlew --stacktrace --parallel ${{ 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 } } | |
- { if: "${{ matrix.testTask }}", name: "Run ${{ matrix.testTask }} tests", run: "./gradlew ${{ matrix.testTask }}", env: { EGL_LOG_LEVEL: debug, LIBGL_DEBUG: verbose, LIBGL_ALWAYS_SOFTWARE: true, MESA_DEBUG: true } } | |
- { if: "${{ matrix.buildTasks }}", name: "Run ${{ matrix.buildTasks }}", run: "./gradlew ${{ matrix.buildTasks }}" } | |
- { name: "Run Android Tests", if: "${{ matrix.enableAndroid }}", uses: reactivecircus/android-emulator-runner@v2, with: { "api-level": 21, "script": "./gradlew connectedCheck" } } | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: "test-results-${{ matrix.os }}", retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { if: "${{ matrix.e2e }}", name: Check sandbox compiles, run: "./gradlew :korge-sandbox:jvmJar" } | |
- { if: "${{ matrix.e2e }}", name: Publish to maven local, run: ./gradlew --parallel publishJvmLocal publishKotlinMultiplatformPublicationToMavenLocal } | |
- { if: "${{ matrix.e2e }}", name: e2e test, working-directory: e2e/e2e-test, run: ./gradlew checkReferencesJvm --stacktrace } | |
- { if: "${{ matrix.e2e && failure() }}", name: Archive E2E Test Results, uses: actions/upload-artifact@v3, with: { name: e2e-test-results-linux-jvm, retention-days: 21, path: "**/e2e/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { if: "${{ matrix.e2e }}", name: e2e multi test and hotreload, working-directory: e2e/e2e-test-multi, run: "./gradlew --watch-fs --warn --configuration-cache --configuration-cache-problems=warn compileKotlinJvm" } | |
- { if: "${{ matrix.e2e }}", name: e2e multi test runJvmAutoreload, working-directory: e2e/e2e-test-multi, run: "./gradlew --configuration-cache :client:runJvmAutoreload" } | |
- { if: "${{ matrix.e2e }}", name: Check publication includes iOS, run: ./gradlew checkModulePublication } |