Skip to content

testbuild_linux

testbuild_linux #24

Workflow file for this run

name: Testbuild for Linux
run-name: testbuild_linux
on:
push:
branches:
- 'master'
- 'gh-build'
pull_request:
types:
- edited
- opened
- synchronize
concurrency:
# Cancel concurrent workflows for the same PR or commit hash.
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
cancel-in-progress: true
jobs:
build_ubuntu_x86_64:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- env: ubuntu
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev cmake ninja-build
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: |
mkdir build
cd build
# -DFORCE_COLORED_OUTPUT=ON ? didn't seem to work, or at least not visible on website
cmake -G Ninja -DDEDICATED=ON ../neo/
ninja
- name: Create testbuild package
run: |
# Create release directory tree
export PKGDIR="dhewm3-linux-$(git rev-parse --short HEAD)"
echo "pkgname=$PKGDIR" >> $GITHUB_ENV
mkdir -p publish/$PKGDIR/base
mkdir publish/$PKGDIR/d3xp
# Copy release assets
cd build
cp dhewm3 dhewm3ded base.so d3xp.so ../publish/$PKGDIR/
cd ..
# Copy misc assets
cp base/gamepad.cfg publish/$PKGDIR/base/
cp base/gamepad-d3xp.cfg publish/$PKGDIR/d3xp/
cp COPYING.txt publish/$PKGDIR/
cp README.md publish/$PKGDIR/README.txt
cp Changelog.md publish/$PKGDIR/Changelog.txt
cp Configuration.md publish/$PKGDIR/Configuration.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: ${{ env.pkgname }}
path: publish/
if-no-files-found: error