Build system overhaul #408
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoketest / Informative / Ubuntu | |
on: | |
pull_request: | |
jobs: | |
test: | |
name: Compilers | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
# Versions between LTS are not available for long - we only do LTS | |
ubuntu: | |
- "20.04" | |
- "22.04" | |
# 24.04 LTS is expected in 2024-04 | |
# 26.04 LTS is expected in 2026-04 | |
compiler: | |
- g++ | |
- clang++ | |
build-type: | |
- Release | |
- Debug | |
container: ubuntu:${{ matrix.ubuntu }} | |
steps: | |
- name: Install Dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
apt-get -qq update | |
apt-get -qq upgrade -y | |
apt-get -qq install -y --no-install-recommends \ | |
apt-file | |
apt-file update | |
apt-get -qq install -y --no-install-recommends \ | |
ca-certificates \ | |
git \ | |
"$(\ | |
apt-file search '/usr/bin/${{ matrix.compiler }}' \ | |
| head -n 1 \ | |
| cut -d' ' -f 1 \ | |
| sed 's/://g' \ | |
)" \ | |
"$( \ | |
if [ '${{ matrix.compiler }}' = 'clang++' ]; \ | |
then \ | |
echo 'llvm-dev'; \ | |
fi \ | |
)" \ | |
cmake \ | |
make \ | |
ccache \ | |
libboost-dev \ | |
libboost-filesystem-dev \ | |
libboost-locale-dev \ | |
libboost-regex-dev \ | |
libboost-system-dev \ | |
libcairo2-dev \ | |
libglew-dev \ | |
libglm-dev \ | |
libsdl2-dev \ | |
libsdl2-image-dev \ | |
libsdl2-mixer-dev \ | |
libsdl2-ttf-dev \ | |
libvorbis-dev | |
- name: Checkout Anura | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: true | |
- name: Set ccache up | |
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9 | |
with: | |
key: ${{ github.job }}-ubuntu-${{ matrix.ubuntu }}-${{ matrix.compiler }}-${{ matrix.build-type }} | |
- name: Build Prep Anura | |
run: | | |
cmake . \ | |
-D CMAKE_CXX_COMPILER="${{ matrix.compiler }}" \ | |
-D CMAKE_BUILD_TYPE="${{ matrix.build-type }}" | |
- name: Build Anura | |
run: | | |
# Compile with number of available hyperthreads | |
make -j "$(getconf _NPROCESSORS_ONLN)" | |
- name: Run Unit Tests | |
run: ./anura --tests |