Skip to content

testbuild_linux

testbuild_linux #1

Workflow file for this run

name: Testbuild for Linux
run-name: testbuild_linux
on:
push:
branches:
- 'master'
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
cmake -G Ninja ../
ninja
- name: Create testbuild package
run: |
# Create release directory tree
export PKGDIR="librecoop-linux-$(git rev-parse --short HEAD)"
echo "pkgname=$PKGDIR" >> $GITHUB_ENV
mkdir -p publish/$PKGDIR/librecoop
mkdir publish/$PKGDIR/librecoopd3xp
# Copy release assets
cd build
cp librecoop.so librecoop.so ../publish/$PKGDIR/
cd ..
# Copy misc assets
echo "librecoop for 64bit (amd64 aka x86_64 aka x64) Linux, built $(date)" > publish/$PKGDIR/README.txt
echo -e "from ${{ github.ref_name }} commit ${{ github.sha }}\n" >> publish/$PKGDIR/README.txt
cat README.md >> publish/$PKGDIR/README.txt
- name: Upload testbuild package
uses: actions/upload-artifact@v4
with:
name: ${{ env.pkgname }}
path: publish/
if-no-files-found: error