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
33f26a48
Unverified
Commit
33f26a48
authored
May 13, 2021
by
Nikolay Igotti
Committed by
GitHub
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic tests. (#108)
parent
ad7229f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
blank.yml
.github/workflows/blank.yml
+3
-0
build.gradle.kts
skiko/build.gradle.kts
+16
-0
BaseTest.kt
skiko/src/jvmTest/kotlin/org/jetbrains/skiko/BaseTest.kt
+17
-0
No files found.
.github/workflows/blank.yml
View file @
33f26a48
...
@@ -30,6 +30,7 @@ jobs:
...
@@ -30,6 +30,7 @@ jobs:
-
shell
:
bash
-
shell
:
bash
run
:
|
run
:
|
cd $GITHUB_WORKSPACE/skiko
cd $GITHUB_WORKSPACE/skiko
./gradlew test
./gradlew publishToMavenLocal
./gradlew publishToMavenLocal
./gradlew -Pskiko.native.enabled=true publishToMavenLocal
./gradlew -Pskiko.native.enabled=true publishToMavenLocal
linux
:
linux
:
...
@@ -58,6 +59,7 @@ jobs:
...
@@ -58,6 +59,7 @@ jobs:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --config gcc
sudo update-alternatives --config gcc
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev zip -y
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev zip -y
./gradlew test
./gradlew publishToMavenLocal
./gradlew publishToMavenLocal
windows
:
windows
:
runs-on
:
windows-2019
runs-on
:
windows-2019
...
@@ -72,4 +74,5 @@ jobs:
...
@@ -72,4 +74,5 @@ jobs:
-
shell
:
bash
-
shell
:
bash
run
:
|
run
:
|
cd ./skiko
cd ./skiko
./gradlew test
./gradlew publishToMavenLocal
./gradlew publishToMavenLocal
skiko/build.gradle.kts
View file @
33f26a48
...
@@ -510,6 +510,14 @@ val skikoJvmJar: Provider<Jar> by tasks.registering(Jar::class) {
...
@@ -510,6 +510,14 @@ val skikoJvmJar: Provider<Jar> by tasks.registering(Jar::class) {
from
(
kotlin
.
jvm
().
compilations
[
"main"
].
output
.
allOutputs
)
from
(
kotlin
.
jvm
().
compilations
[
"main"
].
output
.
allOutputs
)
}
}
val
skikoNativeLib
:
File
get
()
{
val
linkTask
=
project
.
tasks
.
withType
(
LinkSharedLibrary
::
class
.
java
).
single
{
it
.
name
.
contains
(
buildType
.
id
)
}
val
lib
=
linkTask
.
outputs
.
files
.
single
{
it
.
name
.
endsWith
(
".dll"
)
||
it
.
name
.
endsWith
(
".dylib"
)
||
it
.
name
.
endsWith
(
".so"
)
}
return
lib
}
val
maybeSign
by
project
.
tasks
.
registering
{
val
maybeSign
by
project
.
tasks
.
registering
{
val
linkTask
=
project
.
tasks
.
withType
(
LinkSharedLibrary
::
class
.
java
).
single
{
it
.
name
.
contains
(
buildType
.
id
)
}
val
linkTask
=
project
.
tasks
.
withType
(
LinkSharedLibrary
::
class
.
java
).
single
{
it
.
name
.
contains
(
buildType
.
id
)
}
dependsOn
(
linkTask
)
dependsOn
(
linkTask
)
...
@@ -568,6 +576,14 @@ tasks.withType<AbstractPublishToMaven>().configureEach {
...
@@ -568,6 +576,14 @@ tasks.withType<AbstractPublishToMaven>().configureEach {
}
}
}
}
tasks
.
withType
<
Test
>().
configureEach
{
dependsOn
(
project
.
tasks
.
withType
(
LinkSharedLibrary
::
class
.
java
).
single
{
it
.
name
.
contains
(
buildType
.
id
)
})
options
{
val
dir
=
skikoNativeLib
.
parentFile
.
absolutePath
systemProperty
(
"skiko.library.path"
,
dir
)
}
}
fun
Publication
.
isSkikoPublication
()
=
fun
Publication
.
isSkikoPublication
()
=
(
this
as
?
MavenPublication
)
?.
name
?.
startsWith
(
"skiko"
)
==
true
(
this
as
?
MavenPublication
)
?.
name
?.
startsWith
(
"skiko"
)
==
true
...
...
skiko/src/jvmTest/kotlin/org/jetbrains/skiko/BaseTest.kt
0 → 100644
View file @
33f26a48
package
org.jetbrains.skiko
import
org.jetbrains.skija.Bitmap
import
org.junit.Test
internal
class
BaseTest
{
@Test
fun
`
load
library
`
()
{
Library
.
load
()
}
@Test
fun
`
make
bitmap
`
()
{
val
bitmap
=
Bitmap
()
assert
(
bitmap
.
isNull
)
}
}
\ No newline at end of file
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