Skip to content

build

build #863

Workflow file for this run

name: build
on:
push:
branches: [master, aqtion, aqtion-alpha, ci]
pull_request:
branches: [master, aqtion, aqtion-alpha]
workflow_dispatch:
env:
MESON_ARGS: >-
--auto-features=enabled
--fatal-meson-warnings
-Danticheat-server=true
-Davcodec=disabled
-Dclient-gtv=true
-Dpacketdup-hack=true
-Dtests=false
-Dvariable-fps=true
-Dwerror=false
-Daqtion-build=true
-Ddiscord-sdk=false
MESON_ARGS_WIN: >-
-Dsdl2=disabled
-Dx11=disabled
-Dwayland=disabled
-Dwindows-egl=true
-Dwrap_mode=forcefallback
MESON_ARGS_LINUX: >-
-Dx11=enabled
-Dwayland=enabled
-Dsdl2=enabled
-Dwindows-crash-dumps=disabled
-Dwrap_mode=nofallback
MESON_ARGS_MAC: >-
-Dwindows-crash-dumps=disabled
-Dwrap_mode=nofallback
-Dwayland=disabled
-Dx11=disabled
-Dicmp-errors=disabled
jobs:
mingw:
runs-on: ubuntu-latest
strategy:
matrix:
#arch: ["i686", "x86_64"]
arch: ["x86_64"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64 nasm python3-pip ninja-build
sudo python3 -m pip install meson
- name: Build
run: |
meson setup --cross-file=.ci/${{ matrix.arch }}-w64-mingw32.txt \
${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
meson compile -vC builddir
- name: Generate Win Mingw archives
uses: actions/upload-artifact@v4
with:
name: q2pro-mingw-${{ matrix.arch }}
path: |
builddir/q2pro.exe
builddir/q2proded.exe
builddir/gamex86_64.dll
msvc:
runs-on: windows-latest
strategy:
matrix:
#arch: ["x86", "x64"]
arch: ["x64"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: ilammy/setup-nasm@v1
- name: Install dependencies
run: pip3 install --no-input meson ninja
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
meson compile -C builddir
- name: Generate Win MSVC archives
uses: actions/upload-artifact@v4
with:
name: q2pro-msvc-${{ matrix.arch }}
path: |
builddir/q2pro.exe
builddir/q2proded.exe
builddir/gamex86_64.dll
linux64:
runs-on: ubuntu-22.04
#runs-on: [self-hosted, x86]
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson libsdl2-dev libopenal-dev \
libpng-dev libjpeg-dev zlib1g-dev mesa-common-dev \
libcurl4-openssl-dev libx11-dev libxi-dev \
libwayland-dev wayland-protocols libdecor-0-dev \
libavcodec-dev libavformat-dev libavutil-dev \
libswresample-dev libswscale-dev \
uuid-dev patchelf
- name: Install libjansson libs from source
run: |
wget https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz
tar xfz jansson-2.14.tar.gz && cd jansson-2.14
CFLAGS="-fPIC" ./configure
make && make install
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX }} builddir
meson compile -C builddir
env:
CC: ${{ matrix.cc }}
- name: patchelf path to discord_game_sdk.so
run: |
patchelf --replace-needed /home/runner/work/q2pro/q2pro/extern/discord/lib/x86_64/discord_game_sdk.so ./discord_game_sdk.so builddir/q2pro
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Linux x64 archives
uses: actions/upload-artifact@v4
with:
name: q2pro-lin-${{ matrix.cc }}-x86_64
path: |
builddir/q2pro
builddir/q2proded
builddir/gamex86_64.so
linuxARM64:
runs-on: [self-hosted, ARM64]
strategy:
matrix:
cc: [gcc]
steps:
- uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y meson libsdl2-dev libopenal-dev \
# libpng-dev libjpeg-dev zlib1g-dev mesa-common-dev \
# libcurl4-gnutls-dev libx11-dev libxi-dev \
# libwayland-dev wayland-protocols libdecor-0-dev patchelf \
# libogg-dev libvorbis-dev
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX }} builddir
meson compile -vC builddir
env:
CC: ${{ matrix.cc }}
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Linux ARM archives
uses: actions/upload-artifact@v4
with:
name: q2pro-lin-arm64
path: |
builddir/q2pro
builddir/q2proded
builddir/gamearm64.so
darwin:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install pkg-config meson libpng sdl2 \
openal-soft zlib curl ffmpeg jpeg-turbo \
ossp-uuid jansson
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_MAC }} builddir
meson compile -vC builddir
env:
CC: "gcc"
PKG_CONFIG_PATH: "/usr/local/opt/openal-soft/lib/pkgconfig"
CFLAGS: "-mmacosx-version-min=10.7"
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Mac archives
uses: actions/upload-artifact@v4
with:
name: q2pro-darwin-x86_64
path: |
builddir/q2pro
builddir/q2proded
builddir/gamex86_64.dylib
darwin-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install pkg-config meson libpng sdl2 openal-soft zlib curl ffmpeg jpeg-turbo jansson ossp-uuid
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_MAC }} builddir
meson compile -vC builddir
env:
CC: "gcc"
PKG_CONFIG_PATH: "/opt/homebrew/opt/openal-soft/lib/pkgconfig"
CFLAGS: "-target arm64-apple-macos11"
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Mac archives
uses: actions/upload-artifact@v4
with:
name: q2pro-darwin-arm64
path: |
builddir/q2pro
builddir/q2proded
builddir/gamearm64.dylib