Skip to content

Commit

Permalink
add ./gradlew clean
Browse files Browse the repository at this point in the history
  • Loading branch information
eymar committed Aug 9, 2024
1 parent 8c0652a commit 7264a89
Showing 1 changed file with 151 additions and 149 deletions.
300 changes: 151 additions & 149 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,121 +11,121 @@ on:
workflow_dispatch:

jobs:
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
name: 'Check out code'

- uses: actions/setup-java@v3
name: 'Set up JDK 11'
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'

- shell: bash
name: 'Compile and run AWT tests'
run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:awtTest

- shell: bash
name: 'Compile and run macOS x64 tests'
run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:macosX64Test

- shell: bash
name: 'Publish to Maven Local, check AWT sample'
run: |
./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal
./gradlew --stacktrace --info :SkiaAwtSample:installDist
- shell: bash
name: 'Publish Debug to Maven Local'
run: |
./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal -Pskiko.debug=true
- uses: actions/upload-artifact@v3
name: 'Save test results as artifact'
if: always()
with:
name: test-reports-macos
path: ./skiko/build/reports/tests
retention-days: 5

iOS:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
name: 'Check out code'

- uses: actions/setup-java@v3
name: 'Set up JDK 11'
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'

- name: 'Print the devices list'
run: xcrun simctl list devices available --json

# install jq - cli tool for json querying
# retrieve the device .udid to use in tests and store it in env var
- name: 'Set Up Simulator UUID'
run: |
brew install jq &&
IOS_SIM_UUID=$(xcrun simctl list devices available --json | jq -r '.devices."com.apple.CoreSimulator.SimRuntime.iOS-17-0"[] | select(.name == "iPhone 14") | .udid') &&
echo "IOS_SIM_UUID=$IOS_SIM_UUID" >> $GITHUB_ENV
- name: 'Print Selected UUID'
run: echo $IOS_SIM_UUID

- name: 'Compile and run iOS x64 tests'
uses: nick-fields/retry@v2
with:
max_attempts: 10
timeout_minutes: 60
shell: bash
command: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true -Pskiko.iosSimulatorUUID="${{ env.IOS_SIM_UUID }}" :skiko: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 --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:iosSimulatorArm64Test

# TODO run iOS specific tests on iPhone simulator
- shell: bash
name: 'Publish to Maven Local'
run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal

- uses: actions/upload-artifact@v3
name: 'Save test results as artifact'
if: always()
with:
name: test-reports-macos
path: ./skiko/build/reports/tests
retention-days: 5

tvOS:
# TVOS requires macos 13
runs-on: macos-13
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- shell: bash
run: |
./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosX64Test
# 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=true :skiko:tvosSimulatorArm64Test
- uses: actions/upload-artifact@v2
if: always()
with:
name: test-reports-macos
path: ./skiko/build/reports/tests
retention-days: 5
# macos:
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v3
# name: 'Check out code'
#
# - uses: actions/setup-java@v3
# name: 'Set up JDK 11'
# with:
# distribution: 'adopt'
# java-version: '11'
# cache: 'gradle'
#
# - shell: bash
# name: 'Compile and run AWT tests'
# run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:awtTest
#
# - shell: bash
# name: 'Compile and run macOS x64 tests'
# run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:macosX64Test
#
# - shell: bash
# name: 'Publish to Maven Local, check AWT sample'
# run: |
# ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal
# ./gradlew --stacktrace --info :SkiaAwtSample:installDist
#
# - shell: bash
# name: 'Publish Debug to Maven Local'
# run: |
# ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal -Pskiko.debug=true
#
# - uses: actions/upload-artifact@v3
# name: 'Save test results as artifact'
# if: always()
# with:
# name: test-reports-macos
# path: ./skiko/build/reports/tests
# retention-days: 5

# iOS:
# runs-on: macos-13
# steps:
# - uses: actions/checkout@v3
# name: 'Check out code'
#
# - uses: actions/setup-java@v3
# name: 'Set up JDK 11'
# with:
# distribution: 'adopt'
# java-version: '11'
# cache: 'gradle'
#
# - name: 'Print the devices list'
# run: xcrun simctl list devices available --json
#
# # install jq - cli tool for json querying
# # retrieve the device .udid to use in tests and store it in env var
# - name: 'Set Up Simulator UUID'
# run: |
# brew install jq &&
# IOS_SIM_UUID=$(xcrun simctl list devices available --json | jq -r '.devices."com.apple.CoreSimulator.SimRuntime.iOS-17-0"[] | select(.name == "iPhone 14") | .udid') &&
# echo "IOS_SIM_UUID=$IOS_SIM_UUID" >> $GITHUB_ENV
#
# - name: 'Print Selected UUID'
# run: echo $IOS_SIM_UUID
#
# - name: 'Compile and run iOS x64 tests'
# uses: nick-fields/retry@v2
# with:
# max_attempts: 10
# timeout_minutes: 60
# shell: bash
# command: ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true -Pskiko.iosSimulatorUUID="${{ env.IOS_SIM_UUID }}" :skiko: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 --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:iosSimulatorArm64Test
#
# # TODO run iOS specific tests on iPhone simulator
# - shell: bash
# name: 'Publish to Maven Local'
# run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publishToMavenLocal
#
# - uses: actions/upload-artifact@v3
# name: 'Save test results as artifact'
# if: always()
# with:
# name: test-reports-macos
# path: ./skiko/build/reports/tests
# retention-days: 5

# tvOS:
# # TVOS requires macos 13
# runs-on: macos-13
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# - uses: actions/setup-java@v2
# with:
# distribution: 'adopt'
# java-version: '11'
# - shell: bash
# run: |
# ./gradlew --stacktrace --info -Pskiko.native.enabled=true -Pskiko.test.onci=true :skiko:tvosX64Test
# # 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=true :skiko:tvosSimulatorArm64Test
# - uses: actions/upload-artifact@v2
# if: always()
# with:
# name: test-reports-macos
# path: ./skiko/build/reports/tests
# retention-days: 5

linux:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -171,12 +171,14 @@ jobs:
name: 'Compile and run Linux x64 tests'
run: |
export DISPLAY=:0
./gradlew :skiko:clean
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -Pskiko.test.onci=true :skiko:linuxX64Test
- shell: bash
name: 'Compile and run AWT tests'
run: |
export DISPLAY=:0
./gradlew :skiko:clean
./gradlew --no-daemon --stacktrace --info -Pskiko.native.enabled=true -Pkotlin.native.cacheKind.linuxX64=none -Pskiko.test.onci=true :skiko:awtTest
timeout-minutes: 25

Expand All @@ -197,38 +199,38 @@ jobs:
path: ./skiko/build/reports/tests
retention-days: 5

windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
name: 'Check out code'

- uses: microsoft/setup-msbuild@v1

- uses: ilammy/msvc-dev-cmd@v1

- uses: actions/setup-java@v3
name: 'Set up JDK 11'
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'

- shell: bash
name: 'Compile and run AWT tests'
run: ./gradlew --stacktrace --info -Pskiko.test.onci=true :skiko:awtTest

- shell: bash
name: 'Publish to Maven Local, check AWT sample'
run: |
./gradlew --stacktrace --info :skiko:publishToMavenLocal
./gradlew --stacktrace --info :SkiaAwtSample:installDist
- uses: actions/upload-artifact@v3
name: 'Save test results as artifact'
if: always()
with:
name: test-reports-windows
path: ./skiko/build/reports/tests
retention-days: 5
# windows:
# runs-on: windows-2022
# steps:
# - uses: actions/checkout@v3
# name: 'Check out code'
#
# - uses: microsoft/setup-msbuild@v1
#
# - uses: ilammy/msvc-dev-cmd@v1
#
# - uses: actions/setup-java@v3
# name: 'Set up JDK 11'
# with:
# distribution: 'adopt'
# java-version: '11'
# cache: 'gradle'
#
# - shell: bash
# name: 'Compile and run AWT tests'
# run: ./gradlew --stacktrace --info -Pskiko.test.onci=true :skiko:awtTest
#
# - shell: bash
# name: 'Publish to Maven Local, check AWT sample'
# run: |
# ./gradlew --stacktrace --info :skiko:publishToMavenLocal
# ./gradlew --stacktrace --info :SkiaAwtSample:installDist
#
# - uses: actions/upload-artifact@v3
# name: 'Save test results as artifact'
# if: always()
# with:
# name: test-reports-windows
# path: ./skiko/build/reports/tests
# retention-days: 5

0 comments on commit 7264a89

Please sign in to comment.