mirror of
https://github.com/bitsycore/skiko.git
synced 2026-10-07 07:27:26 +00:00
109 lines
3.9 KiB
YAML
109 lines
3.9 KiB
YAML
# This is a basic workflow to help you get started with Actions
|
|
|
|
name: CI
|
|
|
|
# Controls when the action will run.
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the master branch
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
macos:
|
|
# The type of runner that the job will run on
|
|
runs-on: macos-10.15
|
|
# 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: |
|
|
cd $GITHUB_WORKSPACE/skiko
|
|
./gradlew jvmTest
|
|
./gradlew publishToMavenLocal
|
|
./gradlew -Pskiko.native.enabled=true macosX64Test iosX64Test
|
|
./gradlew -Pskiko.native.enabled=true publishToMavenLocal
|
|
linux:
|
|
runs-on: ubuntu-20.04
|
|
# 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'
|
|
# Runs a set of commands using the runners shell
|
|
- shell: bash
|
|
run: |
|
|
cd ./skiko
|
|
# 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 zip -y
|
|
./gradlew -Pskiko.native.enabled=true -i linuxX64Test jvmTest
|
|
./gradlew publishToMavenLocal
|
|
js:
|
|
runs-on: ubuntu-20.04
|
|
# 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'
|
|
# Runs a set of commands using the runners shell
|
|
- 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 2.0.29
|
|
./emsdk activate 2.0.29
|
|
source ./emsdk_env.sh
|
|
cd ..
|
|
./gradlew -Pskiko.wasm.enabled=true jsTest
|
|
./gradlew -Pskiko.wasm.enabled=true publishSkikoWasmRuntimePublicationToMavenLocal
|
|
windows:
|
|
runs-on: windows-2019
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: microsoft/setup-msbuild@v1
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'adopt'
|
|
java-version: '11'
|
|
- shell: bash
|
|
run: |
|
|
cd ./skiko
|
|
./gradlew jvmTest
|
|
./gradlew publishToMavenLocal
|