Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system overhaul #332

Merged
merged 17 commits into from
Sep 7, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
663 changes: 0 additions & 663 deletions .cproject

This file was deleted.

8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Exclude `external/` and `MacOS/` from GitHub language stats
# (github.com/github/linguist). `external/` should be implicitly
# marked vendored, but not `MacOS/`.
external/ linguist-vendored=true
# Github language stats configuration
MacOS/ linguist-vendored=true
MacOS_legacy/ linguist-vendored=true
windows/ linguist-vendored=true
src/imgui linguist-vendored=true
40 changes: 30 additions & 10 deletions .github/workflows/pr-smoketest-debian.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Smoketest / Informative / Debian
on:
pull_request:
merge_group:

jobs:
test:
Expand All @@ -14,10 +13,14 @@ jobs:
# Bullseye is the oldest Debian with a new enough glm
- "bullseye" # 11
- "bookworm" # 12
- "trixie" # 13
# 13 Trixie is expected in 2025-06
# 14 is expected in 2027-06
compiler:
- g++
- clang
- clang++
build-type:
- Release
- Debug
container: debian:${{ matrix.debian }}-slim
steps:
- name: Install Dependencies
Expand All @@ -26,10 +29,18 @@ jobs:
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 \
${{ matrix.compiler }} \
g++ \
clang \
llvm-dev \
cmake \
make \
ccache \
libboost-dev \
libboost-filesystem-dev \
libboost-locale-dev \
Expand All @@ -42,19 +53,28 @@ jobs:
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libvorbis-dev \
make
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 }}-debian-${{ matrix.debian }}-${{ 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
env:
CXX: ${{ matrix.compiler }}
# Number of cores * 3
run: make -j "$(($(getconf _NPROCESSORS_ONLN) * 3))"
run: |
# Compile with number of available hyperthreads
make -j "$(getconf _NPROCESSORS_ONLN)"

- name: Run Unit Tests
run: ./anura --tests
48 changes: 33 additions & 15 deletions .github/workflows/pr-smoketest-fedora.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Smoketest / Informative / Fedora
on:
pull_request:
merge_group:

jobs:
test:
Expand All @@ -20,39 +19,58 @@ jobs:
- "37"
- "38"
- "39"
- "40"
# 40 is expected in 2024-04
# 41 is expected in 2024-11
# 42 is expected in 2025-04
compiler:
- g++
- clang
- clang++
build-type:
- Release
- Debug
container: fedora:${{ matrix.fedora }}
steps:
- name: Install Dependencies
run: |
dnf -y update
dnf -y install \
dnf -qy update
dnf -qy install \
git \
${{ matrix.compiler }} \
g++ \
clang \
cmake \
make \
which \
SDL2-devel \
ccache \
boost-devel \
glm-devel \
glew-devel \
cairo-devel \
SDL2_ttf-devel \
glew-devel \
glm-devel \
libvorbis-devel \
SDL2_image-devel \
SDL2_mixer-devel \
libvorbis-devel
SDL2_ttf-devel \
SDL2-devel

- 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 }}-fedora-${{ matrix.fedora }}-${{ 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
env:
CXX: ${{ matrix.compiler }}
# Number of cores * 3
run: make -j "$(($(getconf _NPROCESSORS_ONLN) * 3))"
run: |
# Compile with number of available hyperthreads
make -j "$(getconf _NPROCESSORS_ONLN)"

- name: Run Unit Tests
run: ./anura --tests
72 changes: 41 additions & 31 deletions .github/workflows/pr-smoketest-opensuse-leap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Smoketest / Informative / openSUSE Leap
on:
pull_request:
merge_group:

jobs:
test:
Expand All @@ -11,58 +10,69 @@ jobs:
fail-fast: false
matrix:
suse:
# 15.3 is the oldest openSUSE Leap with a new enough glm
- "15.3"
# 15.4 is the oldest openSUSE Leap with a new enough clang
- "15.4"
- "15.5"
- "15.6"
# 15.7 is expected in 2025-06
# 15.8 is expected in 2026-06
compiler:
- g++
- clang
- clang++
build-type:
- Release
- Debug
container: opensuse/leap:${{ matrix.suse }}
steps:
- name: Resolve Compiler Package Name
run: |
if [[ ${{ matrix.compiler }} == g++ ]]
then
echo compiler=gcc-c++ >> "$GITHUB_ENV"
else
echo compiler=clang >> "$GITHUB_ENV"
fi

- name: Install Dependencies
run: |
zypper --non-interactive update
zypper --non-interactive install \
zypper -q --non-interactive update
zypper -q --non-interactive install \
tar \
gzip \
git \
${{ env.compiler }} \
gcc-c++ \
clang \
llvm-gold-provider \
cmake \
make \
which \
libSDL2-devel \
glm-devel \
ccache \
libboost_filesystem-devel \
libboost_locale-devel \
libboost_regex-devel \
libboost_system-devel \
cairo-devel \
glew-devel \
glm-devel \
boost-devel \
libicu-devel \
libSDL2_image-devel \
cairo-devel \
libSDL2_ttf-devel \
libSDL2_mixer-devel \
libSDL2_ttf-devel \
libSDL2-devel \
libvorbis-devel \
libicu-devel \
libboost_system*6*devel \
libboost_locale*6*devel \
libboost_regex*6*devel \
libboost_filesystem*6*devel \
libboost_thread*6*devel
libjack

- 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 }}-opensuse-leap-${{ matrix.suse }}-${{ 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
env:
CXX: ${{ matrix.compiler }}
# Number of cores * 3
run: make -j "$(($(getconf _NPROCESSORS_ONLN) * 3))"
run: |
# Compile with number of available hyperthreads
make -j "$(getconf _NPROCESSORS_ONLN)"

- name: Run Unit Tests
run: ./anura --tests
44 changes: 34 additions & 10 deletions .github/workflows/pr-smoketest-ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Smoketest / Informative / Ubuntu
on:
pull_request:
merge_group:

jobs:
test:
Expand All @@ -10,11 +9,19 @@ jobs:
strategy:
fail-fast: false
matrix:
# Versions between LTS are not available for long - we only do LTS
ubuntu:
- "22.04" # LTS only for sanity
- "20.04"
- "22.04"
- "24.04"
# 26.04 LTS is expected in 2026-04
# 28.04 LTS is expected in 2028-04
compiler:
- g++
- clang
- clang++
build-type:
- Release
- Debug
container: ubuntu:${{ matrix.ubuntu }}
steps:
- name: Install Dependencies
Expand All @@ -23,10 +30,18 @@ jobs:
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 \
${{ matrix.compiler }} \
g++ \
clang \
llvm-dev \
cmake \
make \
ccache \
libboost-dev \
libboost-filesystem-dev \
libboost-locale-dev \
Expand All @@ -39,19 +54,28 @@ jobs:
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libvorbis-dev \
make
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
env:
CXX: ${{ matrix.compiler }}
# Number of cores * 3
run: make -j "$(($(getconf _NPROCESSORS_ONLN) * 3))"
run: |
# Compile with number of available hyperthreads
make -j "$(getconf _NPROCESSORS_ONLN)"

- name: Run Unit Tests
run: ./anura --tests
Loading
Loading