[cd skip] Update CHANGES #85
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: SNAPSHOT Build | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
macos: | |
if: "!contains(github.event.head_commit.message, 'cd skip')" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup Eclipse Temurin OpenJDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build macOS natives | |
run: | | |
# See https://github.com/actions/virtual-environments/issues/2557 | |
sudo mv /Library/Developer/CommandLineTools/SDKs/* /tmp | |
sudo mv /Applications/Xcode.app /Applications/Xcode.app.bak | |
sudo mv /Applications/Xcode_14.3.1.app /Applications/Xcode.app | |
sudo xcode-select -switch /Applications/Xcode.app | |
/usr/bin/xcodebuild -version | |
./gradlew jniGen jnigenBuildIOS jnigenBuildMacOsX64 jnigenBuildMacOsXARM64 | |
- name: Upload macOS/iOS natives | |
uses: actions/upload-artifact@v2.1.4 | |
with: | |
name: macos-natives | |
path: libs | |
linux: | |
if: "!contains(github.event.head_commit.message, 'cd skip')" | |
needs: macos | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup Eclipse Temurin OpenJDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt | |
- name: Add extra platform architectures | |
run: sudo dpkg --add-architecture i386; sudo dpkg --add-architecture armhf; sudo dpkg --add-architecture arm64 | |
- run: sudo apt-get update || true | |
- name: Install Windows compilers | |
run: sudo apt-get -yq install g++-mingw-w64-i686 g++-mingw-w64-x86-64 | |
- name: Install Linux cross-compilation toolchains | |
run: | | |
sudo apt-get -yq install gcc g++ gcc-multilib g++-multilib | |
sudo apt-get -yq install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
sudo apt-get -yq install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf | |
- name: Download macOS/iOS natives | |
uses: actions/download-artifact@v2.0.5 | |
with: | |
name: macos-natives | |
path: libs | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Download Android NDK | |
run: | | |
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip -O android-ndk.zip | |
echo "769ee342ea75f80619d985c2da990c48b3d8eaf45f48783a2d48870d04b46108 android-ndk.zip" | sha256sum --check | |
unzip android-ndk.zip | |
echo "NDK_HOME=$(pwd)/android-ndk-r25c" >> $GITHUB_ENV | |
- name: Build with Gradle | |
run: | | |
./gradlew jniGen jnigenBuildLinux64 jnigenBuildLinuxARM jnigenBuildLinuxARM64 jnigenBuildWindows64 jnigenBuildWindows jnigenBuildAndroid | |
- name: Publish SNAPSHOT artifacts | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
run: ./gradlew publish -PSNAPSHOT=true | |
- name: Upload all output libs | |
uses: actions/upload-artifact@v2.1.4 | |
with: | |
name: output-libs | |
path: build/libs/ |