Unverified Commit 1641d30c authored by Dmitry's avatar Dmitry Committed by GitHub

check SkiaJvmSample on pull_request (#442)

parent 5fd5fd63
...@@ -28,10 +28,10 @@ jobs: ...@@ -28,10 +28,10 @@ jobs:
java-version: '11' java-version: '11'
- shell: bash - shell: bash
run: | run: |
cd $GITHUB_WORKSPACE/skiko ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:awtTest
./gradlew --stacktrace --info -Pskiko.native.enabled=true awtTest ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:macosX64Test
./gradlew --stacktrace --info -Pskiko.native.enabled=true macosX64Test ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal
./gradlew --stacktrace --info -Pskiko.native.enabled=true publishToMavenLocal ./gradlew --stacktrace --info :SkiaJvmSample:installDist # check jvm sample works
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: test-reports-macos name: test-reports-macos
...@@ -51,9 +51,9 @@ jobs: ...@@ -51,9 +51,9 @@ jobs:
java-version: '11' java-version: '11'
- shell: bash - shell: bash
run: | run: |
cd $GITHUB_WORKSPACE/skiko ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:iosX64Test
./gradlew --stacktrace --info -Pskiko.native.enabled=true iosX64Test ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal
./gradlew --stacktrace --info -Pskiko.native.enabled=true publishToMavenLocal # TODO run iOS specific tests on iPhone simulator
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: test-reports-macos name: test-reports-macos
...@@ -73,7 +73,6 @@ jobs: ...@@ -73,7 +73,6 @@ jobs:
# Runs a set of commands using the runners shell # Runs a set of commands using the runners shell
- shell: bash - shell: bash
run: | run: |
cd ./skiko
# TODO: simplify installation of compilers. # TODO: simplify installation of compilers.
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install build-essential software-properties-common -y sudo apt-get install build-essential software-properties-common -y
...@@ -87,8 +86,9 @@ jobs: ...@@ -87,8 +86,9 @@ jobs:
sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev zip xvfb -y sudo apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev zip xvfb -y
sudo Xvfb :0 -screen 0 1280x720x24 & sudo Xvfb :0 -screen 0 1280x720x24 &
export DISPLAY=:0 export DISPLAY=:0
./gradlew --stacktrace --info -Pskiko.native.enabled=true linuxX64Test awtTest ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:linuxX64Test :skiko:awtTest
./gradlew --stacktrace --info publishToMavenLocal ./gradlew --stacktrace --info :skiko:publishToMavenLocal
./gradlew --stacktrace --info :SkiaJvmSample:installDist # check jvm sample works
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: test-reports-linux name: test-reports-linux
...@@ -144,9 +144,9 @@ jobs: ...@@ -144,9 +144,9 @@ jobs:
java-version: '11' java-version: '11'
- shell: bash - shell: bash
run: | run: |
cd ./skiko ./gradlew --stacktrace --info :skiko:awtTest
./gradlew --stacktrace --info awtTest ./gradlew --stacktrace --info :skiko:publishToMavenLocal
./gradlew --stacktrace --info publishToMavenLocal ./gradlew --stacktrace --info :SkiaJvmSample:installDist # check jvm sample works
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: test-reports-windows name: test-reports-windows
......
...@@ -72,7 +72,7 @@ To use latest development snapshot use version `0.0.0-SNAPSHOT`. ...@@ -72,7 +72,7 @@ To use latest development snapshot use version `0.0.0-SNAPSHOT`.
## Building JVM bindings ## Building JVM bindings
* Set JAVA_HOME to location of JDK, at least version 11 * Set JAVA_HOME to location of JDK, at least version 11
* `cd skiko && ./gradlew publishToMavenLocal` will build the artefact and publish it to local Maven repo * `./gradlew :skiko:publishToMavenLocal` will build the artifact and publish it to local Maven repo
To build with debug symbols and debug Skia build use `-Pskiko.debug=true` Gradle argument. To build with debug symbols and debug Skia build use `-Pskiko.debug=true` Gradle argument.
...@@ -113,3 +113,7 @@ For example, if we want to include UI tests when we test JVM target, call this: ...@@ -113,3 +113,7 @@ For example, if we want to include UI tests when we test JVM target, call this:
./gradlew awtTest -Dskiko.test.ui.enabled=true ./gradlew awtTest -Dskiko.test.ui.enabled=true
``` ```
Don't run any background tasks, click mouse, or press keys during the tests. Otherwise, they probably fail. Don't run any background tasks, click mouse, or press keys during the tests. Otherwise, they probably fail.
#### Run samples
- First follow the instruction here: [Building JVM bindings](#building-jvm-bindings)
- `./gradlew :SkiaJvmSample:run`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment