Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Documentation: https://wiki.unvanquished.net/wiki/Continuous_integration

name: Build and test

on:
push:
branches:
- master
- 'for-*.*.*/sync' # Next-release branch
pull_request:
branches:
- '**'
paths:
- .github/workflows/build_test.yml
# The rest of this list should stay in sync with .appveyor.yml
- 'src/**'
- 'libs/**'
- 'cmake/**'
- CMakeLists.txt
- '**.cmake'
- .gitmodules

jobs:
mac:
name: Mac
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v7

- name: Check out submodules
shell: bash
env:
# For example: "master" (on pull requests only)
PR_TARGET_BRANCH: ${{ github.base_ref }}
# Target branch name, on pull requests only. Even if the branch comes from an external
# repo it is just the bare branch name, for example "new-feature".
PR_SOURCE_BRANCH: ${{ github.head_ref }}
# For example: "master" for a build of the 'master' branch
# Other formats exist for builds on pull requests
BUILD_SOURCE_BRANCH: ${{ github.ref_name }}
# "push" or "pull_request" (see 'on:')
EVENT_NAME: ${{ github.event_name }}
run: |
set -e
echo "Variables: PR_TARGET_BRANCH=${PR_TARGET_BRANCH} PR_SOURCE_BRANCH=${PR_SOURCE_BRANCH} BUILD_SOURCE_BRANCH=${BUILD_SOURCE_BRANCH}"
curl -fsSL https://gitlab.com/illwieckz/git-checkout-modules/raw/master/git-checkout-modules -o ~/git-checkout-modules
SYNC_ARGS=()
if [[ "$EVENT_NAME" == pull_request ]]; then
SYNC_ARGS=("--sub-ref=${PR_TARGET_BRANCH}:has=/sync" "--sub-ref=${PR_SOURCE_BRANCH}:has=/sync")
else # It is a branch build
SYNC_ARGS=("--sub-ref=${BUILD_SOURCE_BRANCH}:has=/sync")
fi
echo "${#SYNC_ARGS[@]} branch-name-based checkout arg(s): ${SYNC_ARGS[@]}"
bash ~/git-checkout-modules --update "${SYNC_ARGS[@]}" --print

- name: Build
shell: bash
run: |
set -e
set -x
cmake --version
export CFLAGS='-Wno-c++14-extensions'
export CXXFLAGS='-Wno-c++14-extensions'
cmake -Wdev -Wdeprecated -DUSE_PRECOMPILED_HEADER=0 -DUSE_WERROR=1 -DBE_VERBOSE=1 -DCMAKE_BUILD_TYPE=Release -DBUILD_DUMMY_APP=1 -DBUILD_DUMMY_GAMELOGIC=1 -DBUILD_TESTS=1 -H. -Bbuild
cmake --build build -- -j`sysctl -n hw.logicalcpu`

- name: Test
shell: bash
run: |
set -e
build/test-ttyclient -pakpath pkg -set fs_basepak daemon -set vm.cgame.type 3

linux:
name: Linux ${{ matrix.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- name: GCC
build_type: Release
c_compiler: gcc
cxx_compiler: g++
extra_packages: ''
extra_installs: ''
toolchain_file: ''
- name: Clang
build_type: Release
c_compiler: clang
cxx_compiler: clang++
extra_packages: ''
extra_installs: ''
toolchain_file: ''
- name: Mingw
build_type: Debug
c_compiler: x86_64-w64-mingw32-gcc
cxx_compiler: x86_64-w64-mingw32-g++
extra_packages: gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
extra_installs: sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix ; sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
toolchain_file: cmake/cross-toolchain-mingw64.cmake

steps:
- uses: actions/checkout@v7

- name: Check out submodules
shell: bash
env:
# For example: "master" (on pull requests only)
PR_TARGET_BRANCH: ${{ github.base_ref }}
# Target branch name, on pull requests only. Even if the branch comes from an external
# repo it is just the bare branch name, for example "new-feature".
PR_SOURCE_BRANCH: ${{ github.head_ref }}
# For example: "master" for a build of the 'master' branch
# Other formats exist for builds on pull requests
BUILD_SOURCE_BRANCH: ${{ github.ref_name }}
# "push" or "pull_request" (see 'on:')
EVENT_NAME: ${{ github.event_name }}
run: |
set -e
echo "Variables: PR_TARGET_BRANCH=${PR_TARGET_BRANCH} PR_SOURCE_BRANCH=${PR_SOURCE_BRANCH} BUILD_SOURCE_BRANCH=${BUILD_SOURCE_BRANCH}"
curl -fsSL https://gitlab.com/illwieckz/git-checkout-modules/raw/master/git-checkout-modules -o ~/git-checkout-modules
SYNC_ARGS=()
if [[ "$EVENT_NAME" == pull_request ]]; then
SYNC_ARGS=("--sub-ref=${PR_TARGET_BRANCH}:has=/sync" "--sub-ref=${PR_SOURCE_BRANCH}:has=/sync")
else # It is a branch build
SYNC_ARGS=("--sub-ref=${BUILD_SOURCE_BRANCH}:has=/sync")
fi
echo "${#SYNC_ARGS[@]} branch-name-based checkout arg(s): ${SYNC_ARGS[@]}"
bash ~/git-checkout-modules --update "${SYNC_ARGS[@]}" --print

- name: Install deps
shell: bash
run: |
set -e
sudo apt-get update
sudo apt-get -y -q --no-install-recommends install zlib1g-dev libncursesw5-dev nettle-dev libgmp-dev libcurl4-gnutls-dev libogg-dev libvorbis-dev libopusfile-dev libwebp-dev libjpeg8-dev libpng-dev libfreetype6-dev libglew-dev libopenal-dev liblua5.2-dev ninja-build ${{ matrix.extra_packages }}
${{ matrix.extra_installs }}

- name: Build
shell: bash
run: |
set -e
cmake --version
cmake -G "Ninja" -Wdev -Wdeprecated -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain_file }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DUSE_PRECOMPILED_HEADER=0 -DUSE_WERROR=1 -DBE_VERBOSE=1 -DBUILD_DUMMY_APP=1 -DBUILD_DUMMY_GAMELOGIC=1 -DBUILD_TESTS=1 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -H. -Bbuild
cmake --build build -- -j`nproc`

- name: Test
if: matrix.toolchain_file == ''
shell: bash
run: |
set -e
SDL_VIDEODRIVER=offscreen ALSOFT_DRIVERS=null build/test-client -pakpath pkg -set fs_basepak daemon -set vm.cgame.type 3
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ Dæmon is the standalone game engine that powers the multiplayer first person sh
[![Matrix](https://img.shields.io/badge/matrix-Unvanquished-9cf?logo=matrix)](https://matrix.to/#/!WnuetRiQZJNBTKwMrF:matrix.org?via=matrix.org)
[![Discord](https://img.shields.io/badge/discord-Unvanquished-9cf?logo=discord)](https://discord.gg/usuDT9Pyna)

Windows|macOS|Linux
-|-|-
[![AppVeyor branch](https://img.shields.io/appveyor/ci/DolceTriade/daemon/master.svg)](https://ci.appveyor.com/project/DolceTriade/daemon/history)|[![Azure branch](https://img.shields.io/azure-devops/build/UnvanquishedDevelopment/51482765-8c0b-4b28-a82c-09554ed6887e/1/master.svg)](https://dev.azure.com/UnvanquishedDevelopment/Daemon/_build?definitionId=1)| [![Azure branch](https://img.shields.io/azure-devops/build/UnvanquishedDevelopment/51482765-8c0b-4b28-a82c-09554ed6887e/1/master.svg)](https://dev.azure.com/UnvanquishedDevelopment/Daemon/_build?definitionId=1)

ℹ️ We provide ready-to-use downloads for the Unvanquished game on the [Unvanquished download page](https://unvanquished.net/download/), builds of the Dæmon engine are included.

ℹ️ The Unvanquished game logic source code can be found there: [github.com/Unvanquished/Unvanquished](https://github.com/Unvanquished/Unvanquished).
Expand Down
135 changes: 0 additions & 135 deletions azure-pipelines.yml

This file was deleted.

Loading