Skip to content

Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX #710

Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX

Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX #710

Workflow file for this run

name: 'Linux (Cross-compile)'
on:
push:
branches:
- 'master'
pull_request:
types: [ opened, synchronize ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build:
strategy:
fail-fast: false
matrix:
include:
- BuildType: Release
Platform: aarch64
Backend: GLFW
CC: gcc
CXX: g++
- BuildType: Release
Platform: aarch64
Backend: SDL2
CC: gcc
CXX: g++
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Configure Cross-Compile Support (ARM64)'
uses: cyberjunk/gha-ubuntu-cross@v4
with:
arch: arm64
- name: 'Create Build Environment'
run: |
sudo apt install -y cmake curl
sudo apt install -y libgl1-mesa-dev:arm64 libglfw3-dev:arm64 libsdl2-dev:arm64 libopenal-dev:arm64 libopenmpt-dev:arm64 zlib1g:arm64
- name: 'Configure CMake'
run: |
export CC=aarch64-linux-gnu-${{ matrix.CC }}
export CXX=aarch64-linux-gnu-${{ matrix.CXX }}
rm -f ./Content/Translations/*.po
cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D CMAKE_SYSTEM_NAME=Linux -D CMAKE_SYSTEM_PROCESSOR=aarch64 -D CMAKE_FIND_ROOT_PATH=/usr/aarch64-linux-gnu -D NCINE_STRIP_BINARIES=ON -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_WITH_GLEW=OFF
- name: 'Build'
run: |
make -j $(nproc) -C ./_build/
- name: 'Create Package'
run: |
mkdir ./_package/
cp -f ./_build/jazz2 ./_package/jazz2
cp -f -r ./Content/ ./_package/Content/
cp -f ./LICENSE ./_package/LICENSE
case "${{ matrix.CC }}" in
gcc ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}" ;;
clang ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_Clang" ;;
* ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_${{ matrix.CC }}" ;;
esac
echo "artifactPath=$artifactPath" >> $GITHUB_ENV
- name: 'Upload Package'
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactPath }}
path: ./_package/