Skip to content

New iOS backend, build system and desktop updates. #40

New iOS backend, build system and desktop updates.

New iOS backend, build system and desktop updates. #40

Workflow file for this run

name: Java CI with Gradle
on:
pull_request:
branches: [ master ]
jobs:
natives-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install additional build dependencies
run: brew install nasm
- name: Build with Gradle
run: ./gradlew buildFFmpegMacos64 buildFFmpegMacosARM64 jnigen jnigenBuild
- name: Pack artifacts
run: |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list
zip -r natives-macos -@ < native-files-list
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: natives-macos.zip
path: natives-macos.zip
natives-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes gcc g++
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt install -y --force-yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
- name: Build natives with Gradle
run: ./gradlew buildFFmpegLinux64 buildFFmpegLinuxARM32 buildFFmpegLinuxARM64 jnigen jnigenBuildLinux64 jnigenBuildLinuxARM jnigenBuildLinuxARM64 --info
- name: Pack artifacts
run: |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list
zip -r natives-linux -@ < native-files-list
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: natives-linux.zip
path: natives-linux.zip
natives-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Build natives with Gradle
run: ./gradlew buildFFmpegWindows32 buildFFmpegWindows64 jnigen jnigenBuildWindows jnigenBuildWindows64 jnigenJarNativesDesktop --info
- name: Pack artifacts
run: |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list
zip -r natives-windows -@ < native-files-list
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: natives-windows.zip
path: natives-windows.zip
pack-natives:
needs:
- natives-macos
- natives-linux
- natives-windows
runs-on: ubuntu-20.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Download natives-macos artifact
uses: actions/download-artifact@v3
with:
name: natives-macos.zip
- name: Download natives-linux artifact
uses: actions/download-artifact@v3
with:
name: natives-linux.zip
- name: Download natives-windows artifact
uses: actions/download-artifact@v3
with:
name: natives-windows.zip
- name: Unpack natives
run: |
unzip -o natives-macos.zip
unzip -o natives-linux.zip
unzip -o natives-windows.zip
- name: Create JAR with natives for desktop
run: ./gradlew jnigenJarNativesDesktop --info
- name: Create debug keystore for android
run: keytool -genkey -v -keystore $HOME/.android/debug.keystore -storetype PKCS12 -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -noprompt -dname "CN=GdxVideo, OU=libGDX, O=libGDX, L=Unknown, ST=Unknown, C=US"
- name: Build whole project with gradle
run: ./gradlew build
- name: Upload all output libs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: output-libs
path: '**/build/libs/'