Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
ffbff629
Unverified
Commit
ffbff629
authored
Oct 08, 2025
by
Alexander Maryanovsky
Committed by
GitHub
Oct 08, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix invocation of tests that only run on CI (#1108)
parent
a29209ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
14 deletions
+26
-14
ci.yml
.github/workflows/ci.yml
+15
-11
SkiaLayerPerformanceTest.kt
...st/kotlin/org/jetbrains/skiko/SkiaLayerPerformanceTest.kt
+8
-0
SkiaLayerTest.kt
...o/src/awtTest/kotlin/org/jetbrains/skiko/SkiaLayerTest.kt
+2
-2
ScreenshotTestRule.kt
...est/kotlin/org/jetbrains/skiko/util/ScreenshotTestRule.kt
+1
-1
org_jetbrains_skiko_SkiaLayerTest_render_text_MacOS.png
...s/org_jetbrains_skiko_SkiaLayerTest_render_text_MacOS.png
+0
-0
No files found.
.github/workflows/ci.yml
View file @
ffbff629
...
@@ -25,11 +25,11 @@ jobs:
...
@@ -25,11 +25,11 @@ jobs:
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
and
run
AWT
tests'
name
:
'
Compile
and
run
AWT
tests'
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:awtTest
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:awtTest
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
and
run
macOS
x64
tests'
name
:
'
Compile
and
run
macOS
x64
tests'
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:macosX64Test
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:macosX64Test
-
shell
:
bash
-
shell
:
bash
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
...
@@ -83,12 +83,12 @@ jobs:
...
@@ -83,12 +83,12 @@ jobs:
max_attempts
:
10
max_attempts
:
10
timeout_minutes
:
60
timeout_minutes
:
60
shell
:
bash
shell
:
bash
command
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e -Pskiko.iosSimulatorUUID="${{ env.IOS_SIM_UUID }}" :skiko:iosX64TestWithMetal
command
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e -Pskiko.iosSimulatorUUID="${{ env.IOS_SIM_UUID }}" :skiko:iosX64TestWithMetal
# iosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
# iosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
iOS
arm64
tests'
name
:
'
Compile
iOS
arm64
tests'
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:iosSimulatorArm64Test
run
:
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:iosSimulatorArm64Test
# TODO run iOS specific tests on iPhone simulator
# TODO run iOS specific tests on iPhone simulator
-
shell
:
bash
-
shell
:
bash
...
@@ -118,9 +118,9 @@ jobs:
...
@@ -118,9 +118,9 @@ jobs:
-
shell
:
bash
-
shell
:
bash
run
:
|
run
:
|
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:tvosX64Test
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:tvosX64Test
# tvosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
# tvosSimulatorArm64Test will build the binary but the tests will be skipped due to X64 host machine
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:tvosSimulatorArm64Test
./gradlew --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:tvosSimulatorArm64Test
-
uses
:
actions/upload-artifact@v4
-
uses
:
actions/upload-artifact@v4
if
:
always()
if
:
always()
...
@@ -170,21 +170,25 @@ jobs:
...
@@ -170,21 +170,25 @@ jobs:
name
:
'
Compile
and
run
Linux
x64
tests'
name
:
'
Compile
and
run
Linux
x64
tests'
run
:
|
run
:
|
export DISPLAY=:0
export DISPLAY=:0
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -
Pskiko.test.onci=tru
e :skiko:linuxX64Test
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:linuxX64Test
# Linux arm64 tests are executed on a separate runner
# Linux arm64 tests are executed on a separate runner
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
Linux
arm64
tests'
name
:
'
Compile
Linux
arm64
tests'
run
:
|
run
:
|
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -
Pskiko.test.onci=tru
e :skiko:linkDebugTestLinuxArm64
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:linkDebugTestLinuxArm64
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
and
run
AWT
tests'
name
:
'
Compile
and
run
AWT
tests'
run
:
|
run
:
|
export DISPLAY=:0
export DISPLAY=:0
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -
Pskiko.test.onci=tru
e :skiko:awtTest
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:awtTest
timeout-minutes
:
25
timeout-minutes
:
25
-
name
:
Clean Gradle cache to recover disk space
run
:
|
rm -rf ~/.gradle/caches
-
shell
:
bash
-
shell
:
bash
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
env
:
env
:
...
@@ -250,7 +254,7 @@ jobs:
...
@@ -250,7 +254,7 @@ jobs:
name
:
'
Compile
and
run
AWT
tests'
name
:
'
Compile
and
run
AWT
tests'
run
:
|
run
:
|
export DISPLAY=:0
export DISPLAY=:0
./gradlew --no-daemon --stacktrace --info -
Pskiko.test.onci=tru
e :skiko:awtTest
./gradlew --no-daemon --stacktrace --info -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=fals
e :skiko:awtTest
timeout-minutes
:
25
timeout-minutes
:
25
-
shell
:
bash
-
shell
:
bash
...
@@ -287,7 +291,7 @@ jobs:
...
@@ -287,7 +291,7 @@ jobs:
# OPENGL is ignored as it doesn't exist on the Windows GitHub agent
# OPENGL is ignored as it doesn't exist on the Windows GitHub agent
-
shell
:
bash
-
shell
:
bash
name
:
'
Compile
and
run
AWT
tests'
name
:
'
Compile
and
run
AWT
tests'
run
:
./gradlew --stacktrace --info -
Pskiko.test.onci=true -P
skiko.test.ui.renderApi.ignoreAssertsFor=OPENGL :skiko:awtTest
run
:
./gradlew --stacktrace --info -
Dskiko.test.onci=true -Dskiko.test.performance.enabled=false -D
skiko.test.ui.renderApi.ignoreAssertsFor=OPENGL :skiko:awtTest
-
shell
:
bash
-
shell
:
bash
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
name
:
'
Publish
to
Maven
Local,
check
AWT
sample'
...
...
skiko/src/awtTest/kotlin/org/jetbrains/skiko/SkiaLayerPerformanceTest.kt
View file @
ffbff629
...
@@ -13,6 +13,7 @@ import org.junit.Test
...
@@ -13,6 +13,7 @@ import org.junit.Test
import
java.awt.Point
import
java.awt.Point
import
javax.swing.WindowConstants
import
javax.swing.WindowConstants
import
kotlin.math.*
import
kotlin.math.*
import
kotlin.time.Duration.Companion.nanoseconds
@Suppress
(
"BlockingMethodInNonBlockingContext"
,
"SameParameterValue"
)
@Suppress
(
"BlockingMethodInNonBlockingContext"
,
"SameParameterValue"
)
class
SkiaLayerPerformanceTest
{
class
SkiaLayerPerformanceTest
{
...
@@ -75,6 +76,13 @@ class SkiaLayerPerformanceTest {
...
@@ -75,6 +76,13 @@ class SkiaLayerPerformanceTest {
println
(
"Deltas "
+
millis
.
map
{
String
.
format
(
"%.1f"
,
it
)
})
println
(
"Deltas "
+
millis
.
map
{
String
.
format
(
"%.1f"
,
it
)
})
println
(
"Average %.2f"
.
format
(
millis
.
average
()))
println
(
"Average %.2f"
.
format
(
millis
.
average
()))
println
(
"Standard deviation %.2f"
.
format
(
millis
.
stddev
()))
println
(
"Standard deviation %.2f"
.
format
(
millis
.
stddev
()))
println
(
"Expected frame time: "
+
"${if (expectedFrameNanos.isFinite()) {
expectedFrameNanos
.
nanoseconds
.
inWholeMilliseconds
}
else
{
expectedFrameNanos
}}
ms
.
"
)
fun
deviateMessage
(
percent
:
Double
,
deviated
:
List
<
Long
>):
String
{
fun
deviateMessage
(
percent
:
Double
,
deviated
:
List
<
Long
>):
String
{
val
deviatedStr
=
deviated
.
map
{
String
.
format
(
"%.1f"
,
it
/
1
E6
)
}
val
deviatedStr
=
deviated
.
map
{
String
.
format
(
"%.1f"
,
it
/
1
E6
)
}
...
...
skiko/src/awtTest/kotlin/org/jetbrains/skiko/SkiaLayerTest.kt
View file @
ffbff629
...
@@ -829,8 +829,8 @@ class SkiaLayerTest {
...
@@ -829,8 +829,8 @@ class SkiaLayerTest {
val
dt
=
renderTimes
.
last
()
-
renderTimes
.
first
()
val
dt
=
renderTimes
.
last
()
-
renderTimes
.
first
()
assertTrue
(
assertTrue
(
actual
=
dt
<
1
0
0
,
actual
=
dt
<
1
5
0
,
message
=
"2nd frame drawn ${dt}ms after 1st"
message
=
"2nd frame drawn ${dt}ms after 1st
: ${renderTimes.map { it - renderTimes.first() }}}
"
)
)
renderTimes
.
clear
()
renderTimes
.
clear
()
}
}
...
...
skiko/src/awtTest/kotlin/org/jetbrains/skiko/util/ScreenshotTestRule.kt
View file @
ffbff629
...
@@ -59,7 +59,7 @@ class ScreenshotTestRule : TestRule {
...
@@ -59,7 +59,7 @@ class ScreenshotTestRule : TestRule {
}
}
if
(
expectedFile
.
exists
())
{
if
(
expectedFile
.
exists
())
{
val
expected
=
Image
.
makeFromEncoded
(
expectedFile
.
readBytes
())
val
expected
=
Image
.
makeFromEncoded
(
expectedFile
.
readBytes
())
// macO
s
screenshots can have different color on different configurations
// macO
S
screenshots can have different color on different configurations
if
(!
isContentSame
(
expected
,
actual
,
sensitivity
=
0.25
))
{
if
(!
isContentSame
(
expected
,
actual
,
sensitivity
=
0.25
))
{
actualFile
.
writeBytes
(
actual
.
encodeToData
()
!!
.
bytes
)
actualFile
.
writeBytes
(
actual
.
encodeToData
()
!!
.
bytes
)
throw
AssertionError
(
throw
AssertionError
(
...
...
skiko/src/jvmTest/screenshots/org_jetbrains_skiko_SkiaLayerTest_render_text_MacOS.png
View replaced file @
a29209ba
View file @
ffbff629
1.27 KB
|
W:
|
H:
1.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment