Added FPSLogger.setBound() (#7424) #130
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
name: Build and Publish | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
branches: [ master ] | |
release: | |
types: [ published ] | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
natives-ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- 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_15.4.0.app /Applications/Xcode.app | |
sudo xcode-select -switch /Applications/Xcode.app | |
/usr/bin/xcodebuild -version | |
./gradlew jniGen jnigenBuildIOS | |
./backends/gdx-backend-robovm/build-objectal.sh | |
- name: Pack artifacts | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" -o -name "*.xcframework" | grep "libs" > native-files-list | |
zip -r natives-ios -@ < native-files-list | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: natives-ios.zip | |
path: natives-ios.zip | |
natives-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- 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_15.4.0.app /Applications/Xcode.app | |
sudo xcode-select -switch /Applications/Xcode.app | |
/usr/bin/xcodebuild -version | |
./gradlew jniGen jnigenBuildMacOsX64 jnigenBuildMacOsXARM64 | |
- name: Pack artifacts | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list | |
zip 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 | |
container: | |
image: ubuntu:18.04 | |
steps: | |
- name: Install dependencies into minimal dockerfile | |
run: | | |
# ubuntu dockerfile is very minimal (only 122 packages are installed) | |
# need to install updated git (from official git ppa) | |
apt update | |
apt install -y software-properties-common | |
add-apt-repository ppa:git-core/ppa -y | |
# install dependencies expected by other steps | |
apt update | |
apt install -y git \ | |
curl \ | |
ca-certificates \ | |
wget \ | |
bzip2 \ | |
zip \ | |
unzip \ | |
xz-utils \ | |
maven \ | |
ant sudo locales | |
# set Locale to en_US.UTF-8 (avoids hang during compilation) | |
locale-gen en_US.UTF-8 | |
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV | |
echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV | |
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Install cross-compilation toolchains | |
run: | | |
sudo apt update | |
sudo apt install -y --force-yes gcc g++ | |
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 | |
sudo apt install -y --force-yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libc6-dev-riscv64-cross | |
- name: Build Linux natives | |
run: | | |
./gradlew jniGen jnigenBuildLinux64 jnigenBuildLinuxARM jnigenBuildLinuxARM64 jnigenBuildLinuxRISCV64 | |
- name: Pack artifacts | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list | |
zip 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@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Install cross-compilation toolchains | |
run: | | |
sudo apt update | |
sudo apt install -y --force-yes mingw-w64 lib32z1 | |
- name: Build Windows natives | |
run: | | |
./gradlew jniGen jnigenBuildWindows64 jnigenBuildWindows | |
- name: Pack artifacts | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list | |
zip natives-windows -@ < native-files-list | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: natives-windows.zip | |
path: natives-windows.zip | |
natives-android: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Download 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 Android natives | |
run: | | |
./gradlew jniGen jnigenBuildAndroid | |
- name: Pack artifacts | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list | |
zip natives-android -@ < native-files-list | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: natives-android.zip | |
path: natives-android.zip | |
pack-natives: | |
runs-on: ubuntu-20.04 | |
needs: [natives-macos, natives-linux, natives-windows, natives-ios, natives-android] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_EC2_METADATA_DISABLED: true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Download natives-ios artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: natives-ios.zip | |
- 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: Download natives-android artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: natives-android.zip | |
- name: Unpack natives | |
run: | | |
unzip -o natives-ios.zip | |
unzip -o natives-macos.zip | |
unzip -o natives-linux.zip | |
unzip -o natives-windows.zip | |
unzip -o natives-android.zip | |
- name: Pack desktop natives | |
run: | | |
./gradlew jniGen | |
ant -f gdx/jni/build.xml pack-natives | |
ant -f extensions/gdx-box2d/gdx-box2d/jni/build.xml pack-natives | |
ant -f extensions/gdx-freetype/jni/build.xml pack-natives | |
ant -f extensions/gdx-bullet/jni/build.xml pack-natives | |
- name: Pack natives | |
run: | | |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" -o -name "*-natives.jar" -o -name "*.xcframework" | grep "libs" > native-files-list | |
zip -r natives -@ < native-files-list | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: natives.zip | |
path: natives.zip | |
- name: Upload artifacts to S3 | |
if: env.AWS_ACCESS_KEY_ID != null | |
run: | | |
aws s3 cp natives.zip s3://libgdx-nightlies/libgdx-nightlies/natives.zip | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: pack-natives | |
env: | |
ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Download natives artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: natives.zip | |
- name: Unpack natives | |
run: | | |
unzip -o natives.zip | |
- name: Fetch external natives | |
run: | | |
./gradlew fetchExternalNatives | |
- name: Snapshot build deploy | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'libgdx' | |
run: | | |
./gradlew build publish | |
- name: Import GPG key | |
if: github.event_name == 'release' && github.repository_owner == 'libgdx' | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@1c6a9e9d3594f2d743f1b1dd7669ab0dfdffa922 | |
with: | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Release build deploy | |
if: github.event_name == 'release' && github.repository_owner == 'libgdx' | |
run: ./gradlew build publish -PRELEASE -Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }} | |
build-and-upload-runnables: | |
runs-on: ubuntu-20.04 | |
needs: pack-natives | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_EC2_METADATA_DISABLED: true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build Runnables | |
run: | | |
./gradlew clean fetchNatives | |
./gradlew buildRunnables build | |
- name: Upload artifacts to S3 | |
if: env.AWS_ACCESS_KEY_ID != null | |
run: | | |
aws s3 cp ./extensions/gdx-tools/build/libs/ s3://libgdx-nightlies/libgdx-runnables/ --recursive | |
aws s3 cp ./extensions/gdx-setup/build/libs/ s3://libgdx-nightlies/libgdx-runnables/ --recursive |