cmake: enabled linking PhysX libraries for server #711
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
name: nightly-builds | |
on: | |
push: | |
paths-ignore: | |
- 'documentation/**' | |
jobs: | |
build-windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
cmake_preset: ci-windows-x86 | |
build_conf: Debug | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Create build environment | |
# Some projects don't allow in-source building, so create a separate build directory | |
# We'll use this as our working directory for all subsequent commands | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake | |
# Use a bash shell so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
# Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
run: cmake $GITHUB_WORKSPACE --preset ${{ matrix.cmake_preset }} -DCMAKE_BUILD_TYPE=${{ matrix.build_conf }} | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: cmake --build . --config ${{ matrix.build_conf }} --parallel 8 | |
- name: Prepare artifacts | |
run: | | |
mkdir publish\ | |
mkdir publish\primext | |
mkdir publish\primext\bin | |
mkdir publish\primext\devkit | |
move build\${{ matrix.build_conf }}\* publish\ | |
move game_dir\* publish\primext | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows | |
path: | | |
publish/* | |
build-linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
cmake_preset: ci-linux-x64 | |
build_conf: Debug | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Create build environment | |
# Some projects don't allow in-source building, so create a separate build directory | |
# We'll use this as our working directory for all subsequent commands | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-multilib g++-multilib cmake ninja-build | |
sudo apt-get install qtbase5-dev | |
- name: Configure CMake | |
# Use a bash shell so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
# Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
run: cmake $GITHUB_WORKSPACE --preset ${{ matrix.cmake_preset }} -DCMAKE_BUILD_TYPE=${{ matrix.build_conf }} | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: cmake --build . --config ${{ matrix.build_conf }} --parallel 8 | |
- name: Prepare artifacts | |
run: | | |
mkdir publish/ | |
mkdir publish/primext | |
mkdir publish/primext/bin | |
mkdir publish/primext/devkit | |
cp -r build/${{ matrix.build_conf }}/primext/* publish/primext/ | |
cp build/${{ matrix.build_conf }}/primext_run publish/ | |
cp -r game_dir/* publish/primext | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Linux | |
path: | | |
publish/* | |
build-android: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
conf: [Debug] | |
env: | |
BUILD_TYPE: ${{ matrix.conf }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-multilib g++-multilib cmake ninja-build | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: 'microsoft' | |
java-version: '11' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Build | |
run: chmod +x ./gradlew && ./gradlew assembleDebug | |
working-directory: android | |
- name: Prepare artifacts | |
run: | | |
mkdir publish/ | |
mkdir publish/primext | |
mkdir publish/primext/bin | |
mkdir publish/primext/devkit | |
cp android/app/build/outputs/apk/debug/app-debug.apk publish/primext-debug.apk | |
cp -r game_dir/* publish/primext | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Android | |
path: | | |
publish/* | |
release: | |
name: release-builds | |
runs-on: ubuntu-latest | |
needs: [build-windows, build-linux] | |
if: ${{ always() && github.ref == 'refs/heads/master' }} | |
steps: | |
- name: Fetch artifacts | |
uses: actions/[email protected] | |
- name: Remove old release | |
uses: dev-drprasad/[email protected] | |
with: | |
delete_release: true | |
tag_name: continious | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Repackage binaries and allow GitHub to process removed release for few seconds | |
continue-on-error: true | |
run: | | |
cd Windows | |
zip -r ../PrimeXT-Windows-x86.zip * | |
cd ../Linux | |
tar -czvf ../PrimeXT-Linux-i386.tar.gz * | |
#cd ../Android | |
#zip -r ../PrimeXT-Android.zip * | |
sleep 20s | |
- name: Upload new release | |
uses: softprops/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: PrimeXT-* | |
tag_name: continious | |
draft: false | |
prerelease: true | |
name: PrimeXT Continuous Build |