Skip to content

Build system overhaul #253

Build system overhaul

Build system overhaul #253

name: Smoketest / Informative / Fedora
on:
pull_request:
merge_group:
jobs:
test:
name: Compilers
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
fedora:
# 37 is the oldest Fedora with a new enough dnf for resolving CXX
- "37"
- "38"
compiler:
- g++
- clang++
build-type:
- Release
- Debug
container: fedora:${{ matrix.fedora }}
steps:
- name: Install Dependencies
run: |
dnf -y update
dnf -y install \
git \
"$(\
dnf repoquery \
--whatprovides '/usr/bin/${{ matrix.compiler }}' \
--arch x86_64 \
--latest-limit 1 \
--queryformat '%{NAME}' \
)" \
cmake \
make \
ccache \
boost-devel \
cairo-devel \
glew-devel \
glm-devel \
libvorbis-devel \
SDL2_image-devel \
SDL2_mixer-devel \
SDL2_ttf-devel \
SDL2-devel
- name: Checkout Anura
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
submodules: true
- name: Set ccache up
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
with:
key: ${{ github.job }}-fedora-${{ matrix.fedora }}-${{ matrix.compiler }}-${{ matrix.build-type }}
- name: Build Anura
env:
CXX: ${{ matrix.compiler }}
# Compile with number of available hyperthreads
run: |
cmake -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" .
make -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run Unit Tests
run: ./anura --tests