Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX #694
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: 'Linux (Legacy)' | |
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: x64 | |
Backend: GLFW | |
CC: gcc | |
CXX: g++ | |
- BuildType: Release | |
Platform: x64 | |
Backend: SDL2 | |
CC: gcc | |
CXX: g++ | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'Create Build Environment' | |
run: | | |
sudo apt update -y | |
sudo apt install -y cmake curl g++ libgl1-mesa-dev libglew-dev libglfw3-dev libsdl2-dev libopenal-dev libopenmpt-dev rpm | |
- name: 'Configure CMake' | |
run: | | |
export CC=${{ matrix.CC }} | |
export CXX=${{ matrix.CXX }} | |
rm -f ./Content/Translations/*.po | |
cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_STRIP_BINARIES=ON -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_ASSEMBLE_DEB=ON -D NCINE_ASSEMBLE_RPM=ON -D NCINE_DOWNLOAD_DEPENDENCIES=OFF -D NCINE_WITH_GLEW=OFF | |
- name: 'Build' | |
run: | | |
make -j $(nproc) -C ./_build/ | |
- name: 'Create Package' | |
run: | | |
make package -C ./_build/ | |
mkdir ./_package/ | |
cp -f ./_build/jazz2 ./_package/jazz2 | |
cp -f ./_build/*.deb ./_package/jazz2.deb | |
cp -f ./_build/*.rpm ./_package/jazz2.rpm | |
cp -f -r ./Content/ ./_package/Content/ | |
cp -f ./LICENSE ./_package/LICENSE | |
case "${{ matrix.CC }}" in | |
gcc ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_Legacy" ;; | |
clang ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_LegacyClang" ;; | |
* ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_Legacy${{ matrix.CC }}" ;; | |
esac | |
echo "artifactPath=$artifactPath" >> $GITHUB_ENV | |
- name: 'Upload Package' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.artifactPath }} | |
path: ./_package/ |