Publish #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Publish to Github Packages | |
name: Publish | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
macos: | |
runs-on: macos-11 | |
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 Github Packages, check AWT sample' | |
run: | | |
./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publish | |
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 | |
# TODO run iOS specific tests on iPhone simulator | |
- shell: bash | |
name: 'Publish to Github Packages' | |
run: ./gradlew --stacktrace --info -Pskiko.native.enabled=true :skiko:publish | |
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:publish | |
linux: | |
runs-on: ubuntu-20.04 | |
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' | |
- uses: nttld/setup-ndk@v1 | |
name: 'Set up Android NDK' | |
id: setup-ndk | |
with: | |
ndk-version: r21e | |
- uses: android-actions/setup-android@v2 | |
name: 'Set up Android SDK' | |
- shell: bash | |
name: 'Set up Linux build environment' | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
run: | | |
# TODO: simplify installation of compilers. | |
sudo apt-get update -y | |
sudo apt-get install build-essential software-properties-common -y | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
sudo apt-get update -y | |
sudo apt-get install build-essential software-properties-common -y | |
sudo apt-get update | |
sudo apt-get install gcc-9 g++-9 -y | |
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 apt-get install ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev libxrandr-dev libdbus-1-dev zip xvfb -y | |
sudo Xvfb :0 -screen 0 1280x720x24 & | |
- shell: bash | |
name: 'Publish to Github Packages, check AWT sample' | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
run: | | |
./gradlew --no-daemon -Pskiko.android.enabled=true :skiko:publish | |
windows: | |
runs-on: windows-2019 | |
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: 'Publish to Github Packages, check AWT sample' | |
run: | | |
./gradlew --stacktrace --info :skiko:publish | |
web: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: browser-actions/setup-chrome@v1 | |
with: | |
chrome-version: stable | |
id: setup-chrome | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libdbus-1-dev | |
- name: 'install emsdk' | |
shell: bash | |
run: | | |
cd ./skiko | |
sudo apt-get update -y | |
sudo apt-get install binutils build-essential -y | |
sudo apt-get install software-properties-common -y | |
sudo apt-get install python git curl wget -y | |
if [ -d ./emsdk ]; then | |
cd ./emsdk | |
git pull | |
else | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd ./emsdk | |
fi | |
./emsdk install 3.1.49 | |
./emsdk activate 3.1.49 | |
source ./emsdk_env.sh | |
cd .. | |
- name: 'run k/wasm tests' | |
shell: bash | |
run: | | |
cd ./skiko | |
source ./emsdk/emsdk_env.sh | |
./gradlew --stacktrace --info -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true publish |