mirror of
https://github.com/bitsycore/skiko.git
synced 2026-10-05 14:37:26 +00:00
This PR includes: - Skottie extension module for each target - Exposing some internal parts of skiko so that they can be used in extension modules Required external changes : - Compile Skia static libraries with `visibility=default` instead of `hidden`. I found it difficult to make symbols tagged as `hidden` visible again. Going from `visible` to `hidden` was much more straightforward - Each static library that Skia produces is self-contained and thus, might have Skia core object files inside. This means we have to remove such files from Skottie during the Skia build Closes [SKIKO-1146](https://youtrack.jetbrains.com/issue/SKIKO-1146) --------- Co-authored-by: Ivan Matkov <matkov.ivan@gmail.com>
432 lines
12 KiB
YAML
432 lines
12 KiB
YAML
name: Skiko Tests
|
|
|
|
on:
|
|
workflow_call: # Allow being called by other workflows
|
|
|
|
# TODO: Set up Android tests
|
|
# Some tests can fail on Android while passing in other JVM targets.
|
|
# Example: https://github.com/JetBrains/skiko/pull/1211
|
|
jobs:
|
|
macos:
|
|
name: 'macOS'
|
|
# On `macos-15` UI tests blocked by a system popup with
|
|
# "bash" is requesting to bypass the system private window picker and directly access your screen and audio.
|
|
# TODO: Update once resolved
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: actions/setup-java@v4
|
|
name: 'Setup JDK 21'
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'corretto'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- shell: bash
|
|
name: 'Run AWT Tests'
|
|
run: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
awtTest
|
|
|
|
- shell: bash
|
|
name: 'Run macOS Tests'
|
|
run: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
macosArm64Test
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
name: 'Upload Test Results'
|
|
if: failure()
|
|
with:
|
|
name: test-reports-macos
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
./skiko/**/src/jvmTest/screenshots/*_actual.png
|
|
./skiko/**/hs_err_pid*.log
|
|
retention-days: 5
|
|
|
|
- uses: test-summary/action@v2
|
|
name: 'Test Summary'
|
|
with:
|
|
paths: |
|
|
./skiko/**/build/test-results/**/TEST-*.xml
|
|
if: always()
|
|
|
|
ios:
|
|
name: 'iOS'
|
|
runs-on: macos-15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: actions/setup-java@v4
|
|
name: 'Setup JDK 21'
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'corretto'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
# Retrieve the device .udid to use in tests and store it in env var
|
|
- shell: bash
|
|
name: 'Set Up Simulator UUID'
|
|
run: |
|
|
IOS_SIM_LIST=$(xcrun simctl list devices available --json)
|
|
IOS_SIM_UUID=$(echo $IOS_SIM_LIST | jq -r '.devices."com.apple.CoreSimulator.SimRuntime.iOS-18-6"[] | select(.name == "iPhone 16") | .udid')
|
|
echo "IOS_SIM_UUID=$IOS_SIM_UUID" >> $GITHUB_ENV
|
|
|
|
- uses: nick-fields/retry@v2
|
|
name: 'Run iOS (x64) tests'
|
|
with:
|
|
max_attempts: 10
|
|
timeout_minutes: 60
|
|
shell: bash
|
|
command: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
-Pskiko.iosSimulatorUUID="${{ env.IOS_SIM_UUID }}" \
|
|
iosX64TestWithMetal
|
|
|
|
# iosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
|
|
- shell: bash
|
|
name: 'Compile iOS (arm64) tests'
|
|
run: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
iosSimulatorArm64Test
|
|
|
|
# TODO run iOS specific tests on iPhone simulator
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: test-reports-ios
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
retention-days: 5
|
|
|
|
tvos:
|
|
name: 'tvOS'
|
|
runs-on: macos-15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: actions/setup-java@v4
|
|
name: 'Setup JDK 21'
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'corretto'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- shell: bash
|
|
name: 'Run tvOS Tests'
|
|
run: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
tvosX64Test
|
|
|
|
# tvosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
tvosSimulatorArm64Test
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
name: 'Upload Test Results'
|
|
if: failure()
|
|
with:
|
|
name: test-reports-tvos
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
retention-days: 5
|
|
|
|
linux-amd64:
|
|
name: 'Linux (x64)'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- uses: ./.github/actions/docker-skiko-run
|
|
name: 'Run Linux (x64) Tests'
|
|
with:
|
|
image_name: linux-amd64
|
|
virtual-display: true
|
|
command: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
linuxX64Test
|
|
|
|
- uses: ./.github/actions/docker-skiko-run
|
|
name: 'Run AWT Tests'
|
|
timeout-minutes: 25
|
|
with:
|
|
image_name: linux-compat
|
|
virtual-display: true
|
|
command: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
awtTest
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
name: 'Upload Test Results'
|
|
if: failure()
|
|
with:
|
|
name: test-reports-linux
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
./skiko/**/src/jvmTest/screenshots/*_actual.png
|
|
./skiko/**/hs_err_pid*.log
|
|
|
|
- uses: test-summary/action@v2
|
|
name: 'Test Summary'
|
|
with:
|
|
paths: |
|
|
./skiko/**/build/test-results/**/TEST-*.xml
|
|
if: always()
|
|
|
|
linux-cross-compile:
|
|
name: 'Cross-compile Linux (arm) on x64'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- uses: ./.github/actions/docker-skiko-run
|
|
name: 'Compile Linux (arm64) Tests'
|
|
with:
|
|
image_name: linux-amd64
|
|
command: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.arch=x64 \
|
|
-Pskiko.native.linux.enabled=true \
|
|
linkDebugTestLinuxArm64
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
name: 'Upload linuxArm64 test binary as artifact'
|
|
with:
|
|
name: test-binary-linuxArm64
|
|
path: |
|
|
./skiko/build/bin/linuxArm64
|
|
./skiko/*/build/bin/linuxArm64
|
|
if-no-files-found: error
|
|
retention-days: 5
|
|
|
|
linux-arm:
|
|
name: 'Linux (arm64)'
|
|
needs: linux-cross-compile
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- uses: actions/download-artifact@v4
|
|
name: 'Download precompiled linuxArm64 test binary'
|
|
with:
|
|
name: test-binary-linuxArm64
|
|
path: ./skiko
|
|
|
|
- uses: ./.github/actions/docker-skiko-run
|
|
name: 'Run Linux (arm64) Tests'
|
|
with:
|
|
image_name: linux-compat
|
|
working_directory: skiko
|
|
virtual-display: true
|
|
command: |
|
|
chmod +x ./build/bin/linuxArm64/debugTest/test.kexe
|
|
./build/bin/linuxArm64/debugTest/test.kexe
|
|
cd ./skiko-skottie
|
|
chmod +x ./build/bin/linuxArm64/debugTest/test.kexe
|
|
./build/bin/linuxArm64/debugTest/test.kexe
|
|
|
|
- uses: ./.github/actions/docker-skiko-run
|
|
name: 'Run AWT Tests'
|
|
timeout-minutes: 25
|
|
with:
|
|
image_name: linux-compat
|
|
virtual-display: true
|
|
command: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Pskiko.native.enabled=true \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
awtTest
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: test-reports-linux-arm
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
./skiko/**/src/jvmTest/screenshots/*_actual.png
|
|
./skiko/**/hs_err_pid*.log
|
|
retention-days: 5
|
|
|
|
- name: Test Summary
|
|
uses: test-summary/action@v2
|
|
with:
|
|
paths: |
|
|
./skiko/**/build/test-results/**/TEST-*.xml
|
|
if: always()
|
|
|
|
windows:
|
|
name: 'Windows'
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
- uses: microsoft/setup-msbuild@v1
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- uses: actions/setup-java@v4
|
|
name: 'Setup JDK 21'
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'corretto'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
# OPENGL is ignored as it doesn't exist on the Windows GitHub agent
|
|
- shell: bash
|
|
name: 'Run AWT tests'
|
|
run: |
|
|
./gradlew -p skiko --no-daemon --stacktrace \
|
|
-Dskiko.test.onci=true \
|
|
-Dskiko.test.performance.enabled=false \
|
|
-Dskiko.test.ui.renderApi.ignoreAssertsFor=OPENGL \
|
|
awtTest
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
name: 'Upload Test Results'
|
|
if: failure()
|
|
with:
|
|
name: test-reports-windows
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
./skiko/**/src/jvmTest/screenshots/*_actual.png
|
|
./skiko/**/hs_err_pid*.log
|
|
retention-days: 5
|
|
|
|
- uses: test-summary/action@v2
|
|
name: 'Test Summary'
|
|
with:
|
|
paths: |
|
|
./skiko/**/build/test-results/**/TEST-*.xml
|
|
if: always()
|
|
|
|
web-wasm:
|
|
name: 'Web'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: 'Check out code'
|
|
|
|
# Setup environment directly instead of using docker image
|
|
# because of instability of running tests inside docker
|
|
|
|
- uses: actions/setup-java@v4
|
|
name: 'Setup JDK 21'
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'corretto'
|
|
|
|
- uses: ./.github/actions/setup-prerequisites
|
|
name: 'Setup Prerequisites'
|
|
|
|
- uses: browser-actions/setup-chrome@v1
|
|
name: 'Setup Google Chrome'
|
|
with:
|
|
chrome-version: stable
|
|
|
|
- name: 'Install Emscripten'
|
|
shell: bash
|
|
working-directory: skiko
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install libdbus-1-dev
|
|
if [ -d ./emsdk ]; then
|
|
cd ./emsdk
|
|
git pull
|
|
else
|
|
git clone https://github.com/emscripten-core/emsdk.git
|
|
cd ./emsdk
|
|
fi
|
|
./emsdk install 4.0.7
|
|
./emsdk activate 4.0.7
|
|
|
|
- shell: bash
|
|
name: 'Run WASM Tests'
|
|
working-directory: skiko
|
|
run: |
|
|
source ./emsdk/emsdk_env.sh
|
|
./gradlew --no-daemon --stacktrace \
|
|
-Pskiko.wasm.enabled=true \
|
|
-Pskiko.js.enabled=true \
|
|
-Pskiko.test.onci=true \
|
|
wasmJsTest
|
|
|
|
- shell: bash
|
|
name: 'Run JS Tests'
|
|
working-directory: skiko
|
|
run: |
|
|
source ./emsdk/emsdk_env.sh
|
|
./gradlew --no-daemon --stacktrace \
|
|
-Pskiko.wasm.enabled=true \
|
|
-Pskiko.js.enabled=true \
|
|
-Pskiko.test.onci=true \
|
|
jsTest
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: test-reports-web
|
|
path: |
|
|
./skiko/**/build/reports/tests
|
|
retention-days: 5
|
|
|
|
- uses: test-summary/action@v2
|
|
name: 'Test Summary'
|
|
with:
|
|
paths: |
|
|
./skiko/**/build/test-results/**/TEST-*.xml
|
|
if: always()
|