2024-08-11 15:08:40 +00:00
|
|
|
name: Testbuild for Linux
|
|
|
|
run-name: testbuild_linux
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- edited
|
2024-08-12 13:43:40 +00:00
|
|
|
- opened
|
|
|
|
- synchronize
|
2024-08-11 15:08:40 +00:00
|
|
|
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:
|
2024-08-18 14:29:21 +00:00
|
|
|
build_ubuntu_x86_64:
|
|
|
|
runs-on: ubuntu-22.04
|
2024-08-11 15:08:40 +00:00
|
|
|
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 \
|
|
|
|
libavformat-dev libswscale-dev libvulkan-dev build-essential
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
sed -i 's|WITH_AVCODEC:=yes|WITH_AVCODEC:=no|g' Makefile
|
|
|
|
# Public runners come with 2 CPUs.
|
|
|
|
make -j2
|
2024-08-12 16:21:22 +00:00
|
|
|
make -j2 ref_gles1
|
2024-08-11 15:08:40 +00:00
|
|
|
- name: Create testbuild package
|
|
|
|
run: |
|
|
|
|
# Create release directory tree
|
|
|
|
mkdir -p publish/quake2-linux-${{github.sha}}/misc/docs
|
|
|
|
# Copy release assets
|
|
|
|
cp -r release/* publish/quake2-linux-${{github.sha}}/
|
|
|
|
# Copy misc assets
|
|
|
|
cp -r stuff/yq2.cfg publish/quake2-linux-${{github.sha}}/misc/yq2.cfg
|
|
|
|
cp -r stuff/mapfixes publish/quake2-linux-${{github.sha}}/misc
|
|
|
|
cp LICENSE publish/quake2-linux-${{github.sha}}/misc/docs/LICENSE.txt
|
|
|
|
cp README.md publish/quake2-linux-${{github.sha}}/misc/docs/README.txt
|
|
|
|
cp doc/010_index.md publish/quake2-linux-${{github.sha}}/misc/docs/010_index.txt
|
|
|
|
cp doc/020_installation.md publish/quake2-linux-${{github.sha}}/misc/docs/020_installation.txt
|
|
|
|
cp doc/030_configuration.md publish/quake2-linux-${{github.sha}}/misc/docs/030_configuration.txt
|
|
|
|
cp doc/040_cvarlist.md publish/quake2-linux-${{github.sha}}/misc/docs/040_cvarlist.txt
|
|
|
|
cp doc/050_commands.md publish/quake2-linux-${{github.sha}}/misc/docs/050_commands.txt
|
|
|
|
cp doc/060_multiplayer.md publish/quake2-linux-${{github.sha}}/misc/docs/060_multiplayer.txt
|
|
|
|
cp doc/070_packaging.md publish/quake2-linux-${{github.sha}}/misc/docs/070_packaging.txt
|
|
|
|
cp doc/080_contributing.md publish/quake2-linux-${{github.sha}}/misc/docs/080_contributing.txt
|
|
|
|
cp doc/090_filelists.md publish/quake2-linux-${{github.sha}}/misc/docs/090_filelists.md
|
|
|
|
- name: Upload testbuild package
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: quake2-linux-${{github.sha}}
|
|
|
|
path: publish/
|
|
|
|
if-no-files-found: error
|