Fix grayscale jpeg rendering colors. #3202
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
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: 11 | |
JAVA_DISTRIBUTION: zulu | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
testJvm: ${{ steps.filter.outputs.jvm == 'true' || steps.filter.outputs.all == 'true' }} | |
testJs: ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.all == 'true' }} | |
testWasm: ${{ steps.filter.outputs.wasm == 'true' || steps.filter.outputs.all == 'true' }} | |
testAndroid: ${{ steps.filter.outputs.android == 'true' || steps.filter.outputs.all == 'true' }} | |
testWindows: ${{ steps.filter.outputs.windows == 'true' || steps.filter.outputs.native == 'true' || steps.filter.outputs.all == 'true' || steps.filter.outputs.jvm == 'true' }} | |
testLinux: ${{ steps.filter.outputs.linux == 'true' || steps.filter.outputs.native == 'true' || steps.filter.outputs.all == 'true' || steps.filter.outputs.jvm == 'true' }} | |
testMacos: ${{ steps.filter.outputs.macos == 'true' || steps.filter.outputs.native == 'true' || steps.filter.outputs.all == 'true' || steps.filter.outputs.jvm == 'true' }} | |
testIos: ${{ steps.filter.outputs.ios == 'true' || steps.filter.outputs.native == 'true' || steps.filter.outputs.all == 'true' || steps.filter.outputs.jvm == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
if: ${{ github.event_name != 'pull_request' }} | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
all: | |
- '.github/workflows/TEST.yml' | |
- '**/build.gradle' | |
- '**/build.gradle.kts' | |
- '**/settings.gradle' | |
- '**/settings.gradle.kts' | |
- '**/buildSrc/**' | |
- '**/gradle/**' | |
- '**/src/common*/**' | |
jvm: | |
- '**/src/jvm*/**' | |
- '**/src/concurrent*/**' | |
android: | |
- '**/AndroidManifest.xml' | |
- '**/src/android*/**' | |
- '**/src/jvmAndroid*/**' | |
- '**/src/concurrent*/**' | |
- '**/src/main/**' | |
js: | |
- '**/src/js*/**' | |
wasm: | |
- '**/src/wasm*/**' | |
native: | |
- '**/src/native*/**' | |
- '**/src/concurrent*/**' | |
windows: | |
- '**/src/mingw*/**' | |
linux: | |
- '**/src/linux*/**' | |
- '**/src/posix*/**' | |
macos: | |
- '**/src/macos*/**' | |
- '**/src/darwin*/**' | |
- '**/src/posix*/**' | |
ios: | |
- '**/src/ios*/**' | |
- '**/src/tvos*/**' | |
- '**/src/watchos*/**' | |
- '**/src/darwin*/**' | |
- '**/src/posix*/**' | |
test-jvm: | |
needs: changes | |
if: ${{ needs.changes.outputs.testJvm == 'true' }} | |
timeout-minutes: 240 | |
runs-on: ubuntu-latest | |
env: | |
ENABLE_BENCHMARKS: true | |
steps: | |
- { uses: actions/checkout@v3 } | |
#- { name: Configure local.properties, run: "echo org.gradle.parallel=true >> local.properties && echo org.gradle.workers.max=2 >> local.properties" } | |
- { name: Configure local.properties, run: "echo org.gradle.parallel=true >> local.properties" } | |
- { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev xvfb } | |
- { name: Run Xvfb in Background, run: "Xvfb :99 &" } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew --stacktrace } | |
#- { name: Testing buildSrc, run: "./gradlew :buildSrc:test" } | |
- { name: Building classes, run: ./gradlew --stacktrace --parallel compileTestKotlinJvm } | |
- { name: Testing JVM, run: "./gradlew --stacktrace --parallel jvmTest", env: { EGL_LOG_LEVEL: debug, LIBGL_DEBUG: verbose, LIBGL_ALWAYS_SOFTWARE: true, MESA_DEBUG: true } } | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: screenshot-test-results-linux, retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { name: Check sandbox compiles, run: "./gradlew :korge-sandbox:jvmJar" } | |
- { name: Publish to maven local, run: ./gradlew publishJvmLocal } | |
- { name: e2e test, working-directory: e2e-test, run: ./gradlew checkReferencesJvm --stacktrace } | |
- { name: Archive E2E Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: e2e-test-results-linux-jvm, retention-days: 21, path: "**/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { name: e2e multi test and hotreload, working-directory: e2e-test-multi, run: "./gradlew --watch-fs --warn --configuration-cache --configuration-cache-problems=warn compileKotlinJvm" } | |
- { name: Run benchmarks, run: "./gradlew :korge-benchmarks:jvmBenchmark" } | |
#- { name: e2e test, uses: GabrielBB/xvfb-action@v1, with: { working-directory: e2e-test, run: ./gradlew checkReferencesJvm --stacktrace } } | |
test-coverage: | |
needs: changes | |
if: ${{ needs.changes.outputs.testJvm == 'true' }} | |
timeout-minutes: 240 | |
runs-on: ubuntu-latest | |
env: | |
DISABLE_HEADLESS_TEST: true | |
ENABLE_KOVER: true | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev xvfb } | |
- { name: Run Xvfb in Background, run: "Xvfb :99 &" } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
#- { name: Kover Merged HTML Reports, run: ./gradlew koverMergedHtmlReport koverMergedXmlReport } | |
#- uses: actions/upload-artifact@v3 | |
# with: | |
# name: coverage-results | |
# path: build/reports/kover/merged/html/ | |
#- { name: Kover Merged XML Reports, uses: GabrielBB/xvfb-action@v1, with: { run: ./gradlew koverMergedXmlReport } } | |
- { name: Kover Merged XML Reports, run: ./gradlew --parallel koverMergedXmlReport } | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./build/reports/kover/merged/xml/report.xml | |
flags: unittests # optional | |
name: codecov-kover # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: true # optional (default = false) | |
test-js: | |
needs: changes | |
if: ${{ needs.changes.outputs.testJs == 'true' }} | |
timeout-minutes: 240 | |
runs-on: ubuntu-latest | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
- { name: Testing NodeJS, run: ./gradlew jsNodeTest } | |
- { name: Testing Browser, run: ./gradlew jsBrowserTest } | |
# test-wasm: | |
# needs: changes | |
# if: ${{ needs.changes.outputs.testWasm == 'true' }} | |
# timeout-minutes: 240 | |
# runs-on: ubuntu-latest | |
# steps: | |
# - { uses: actions/checkout@v3 } | |
# - { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
# - { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev } | |
# - { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
# - { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
# - { name: Start gradle, run: ./gradlew } | |
#- { name: Testing NodeJS, run: ./gradlew wasmNodeTest } | |
# - { name: Testing Browser, run: ./gradlew wasmBrowserTest } | |
test-android: | |
needs: changes | |
if: ${{ needs.changes.outputs.testAndroid == 'true' }} | |
timeout-minutes: 240 | |
runs-on: macos-11 | |
#runs-on: ubuntu-latest | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
#- { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev } | |
#- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
#- { name: Try building Android, run: ./gradlew publishAndroidPublicationToMavenLocal } | |
- name: Run Android Connected Tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 21 | |
script: ./gradlew connectedCheck | |
test-native-ios: | |
needs: changes | |
if: ${{ needs.changes.outputs.testIos == 'true' }} | |
timeout-minutes: 240 | |
runs-on: macos-11 | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
- { name: Run ios simulator tests, run: ./gradlew iosX64Test } | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: screenshot-test-results-ios, retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { name: Check compilation of iOS targets, run: ./gradlew publishIosX64PublicationToMavenLocal publishIosArm64PublicationToMavenLocal } | |
- { name: Check compilation of watchOS targets, run: ./gradlew publishWatchosArm64PublicationToMavenLocal publishWatchosX64PublicationToMavenLocal } | |
- { name: Check compilation of tvOS targets, run: ./gradlew publishTvosArm64PublicationToMavenLocal publishTvosX64PublicationToMavenLocal } | |
#- { name: Check compilation of TvOS targets, run: ./gradlew publishTvosArm64PublicationToMavenLocal publishTvosX64PublicationToMavenLocal publishTvosSimulatorArm64PublicationToMavenLocal } | |
test-native-linux: | |
needs: changes | |
if: ${{ needs.changes.outputs.testLinux == 'true' }} | |
timeout-minutes: 240 | |
runs-on: ubuntu-latest | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Install freeglut3 & openal, run: sudo apt-get update && sudo apt-get -y install freeglut3-dev libopenal-dev xvfb } | |
- { name: Run Xvfb in Background, run: "Xvfb :99 &" } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
#- { name: Testing JVM on Linux, uses: GabrielBB/xvfb-action@v1, with: { run: ./gradlew jvmTest } } | |
- { name: Testing Kotlin/Native Linux, run: ./gradlew linuxX64Test } | |
- { name: Publish gradle plugin and reload agent, run: "./gradlew :korge-gradle-plugin:publishToMavenLocal :korge-reload-agent:publishToMavenLocal" } | |
- { name: Publish X64, run: ./gradlew publishLinuxX64PublicationToMavenLocal publishKotlinMultiplatformPublicationToMavenLocal } | |
- { name: Stop gradle daemon, run: ./gradlew --stop } | |
- { name: e2e test native, working-directory: e2e-test, run: ./gradlew checkReferencesNative --stacktrace } | |
- { name: Archive E2E Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: e2e-test-results-linux, retention-days: 21, path: "**/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { name: Testing Linux Arm64 Publishing, run: ./gradlew publishLinuxArm64PublicationToMavenLocal } | |
- { name: Publish JS, run: ./gradlew publishJsPublicationToMavenLocal } | |
- { name: e2e test JS, working-directory: e2e-test, run: ./gradlew browserReleaseEsbuild --stacktrace } | |
test-native-macos: | |
needs: changes | |
if: ${{ needs.changes.outputs.testMacos == 'true' }} | |
timeout-minutes: 240 | |
runs-on: macos-11 | |
#env: | |
# DISABLE_HEADLESS_TEST: true | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Grant execute permission for gradlew, run: chmod +x gradlew } | |
- { name: Start gradle, run: ./gradlew } | |
- { name: Testing JVM on MacosX64, run: ./gradlew jvmTest } | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: screenshot-test-results-macos, retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { name: Testing Kotlin/Native MacosX64, run: ./gradlew macosX64Test } | |
- { name: Publish gradle plugin, run: "./gradlew :korge-gradle-plugin:publishToMavenLocal :korge-reload-agent:publishToMavenLocal" } | |
- { name: Publish X64, run: ./gradlew publishMacosX64PublicationToMavenLocal publishKotlinMultiplatformPublicationToMavenLocal } | |
- { name: e2e test, working-directory: e2e-test, run: ./gradlew checkReferencesNative --stacktrace } | |
- { name: Archive E2E Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: e2e-test-results-macos, retention-days: 21, path: "**/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { name: Publish Arm64, run: ./gradlew publishMacosArm64PublicationToMavenLocal } | |
- { name: Publish JS, run: ./gradlew publishJsPublicationToMavenLocal } | |
- { name: e2e test JS, working-directory: e2e-test, run: ./gradlew browserReleaseEsbuild --stacktrace } | |
test-native-windows: | |
needs: changes | |
if: ${{ needs.changes.outputs.testWindows == 'true' }} | |
timeout-minutes: 240 | |
runs-on: windows-latest | |
env: | |
DISABLE_JAVASCRIPT_TEST: true | |
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process -Dorg.gradle.workers.max=3 | |
steps: | |
- { uses: actions/checkout@v3 } | |
- { name: Configure local.properties, run: "echo org.gradle.parallel=false >> local.properties" } | |
- { name: Download, shell: cmd, run: "curl -L -o opengl32-x64.zip https://github.com/korlibs/mesa-dist-win/releases/download/21.2.3/opengl32-x64.zip" } | |
- { name: unzip, shell: cmd, run: "unzip opengl32-x64.zip" } | |
- { name: unzip to korge, shell: cmd, run: "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: Gradle cache, uses: ./.github/actions/gradle-cache } | |
- { name: Testing JVM on windows, shell: cmd, run: "CALL gradlew.bat jvmTest", env: { EGL_LOG_LEVEL: debug, LIBGL_DEBUG: verbose, LIBGL_ALWAYS_SOFTWARE: true, MESA_DEBUG: true } } | |
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: screenshot-test-results-windows, retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } } | |
- { name: Testing Kotlin/Native MingwX64Test, shell: cmd, run: CALL gradlew.bat --no-parallel mingwX64Test } | |
- { name: Publish gradle plugin, shell: cmd, run: "CALL gradlew.bat :korge-gradle-plugin:publishToMavenLocal :korge-reload-agent:publishToMavenLocal" } | |
- { name: Publish X64, shell: cmd, run: CALL gradlew.bat publishMingwX64PublicationToMavenLocal publishKotlinMultiplatformPublicationToMavenLocal } | |
- { name: e2e test, shell: cmd, working-directory: e2e-test, run: CALL gradlew.bat checkReferencesNative --stacktrace } | |
- { name: Archive E2E Test Results, if: failure(), uses: actions/upload-artifact@v3, with: { name: e2e-test-results-windows, retention-days: 21, path: "**/e2e-test/build/screenshots", if-no-files-found: ignore } } | |
- { name: Publish JS, run: ./gradlew publishJsPublicationToMavenLocal } | |
- { name: e2e test JS, working-directory: e2e-test, run: ./gradlew browserReleaseEsbuild --stacktrace } |