7878 - { compiler: clang, os: macos-14, type: Debug }
7979
8080 # Linux:
81- # Oldest Compilers
81+ # Oldest Compilers
8282 # GCC 9 also known to show a few warnings that newer versions dont show
8383 # Use system cmake
8484 # Use boost 1.73 (min version)
@@ -105,14 +105,66 @@ jobs:
105105 # Use default boost
106106 # Use (compiler) default C++ 17 standard
107107 # Use default cmake
108- - { compiler: gcc-14, os: ubuntu-24.04, type: Debug }
109- - { compiler: gcc-15, os: ubuntu-24 .04, type: Debug }
110- - { compiler: clang-18, os: ubuntu-24.04, type: Debug, externalSanitizer: true }
111- - { compiler: clang-21, os: ubuntu-latest, type: Debug, init_llvm: true}
108+ - { compiler: gcc-14, os: ubuntu-24.04, type: Debug }
109+ - { compiler: gcc-15, container: " ubuntu:25 .04" , type: Debug, os: ubuntu-latest }
110+ - { compiler: clang-18, os: ubuntu-24.04, type: Debug, externalSanitizer: true }
111+ - { compiler: clang-21, os: ubuntu-latest, type: Debug, init_llvm: true}
112112
113113 runs-on : ${{matrix.os}}
114+ container : ${{matrix.container}}
115+ defaults :
116+ run :
117+ shell : bash
114118
115119 steps :
120+ - name : Install system packages
121+ run : |
122+ if [[ "${{runner.os}}" =~ macOS ]]; then
123+ echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX"
124+ echo "HOMEBREW_CELLAR=$HOMEBREW_CELLAR"
125+ brew install cmake boost sdl2 sdl2_mixer gettext miniupnpc
126+ echo "Available Boost installs: $(ls "$HOMEBREW_CELLAR/boost/")"
127+ # Use the latest (last folder)
128+ BOOST_ROOT=$(find "$HOMEBREW_CELLAR/boost/"* -maxdepth 0 -type d | tail -n1)
129+ echo "Choosen Boost: $BOOST_ROOT"
130+ [[ -n "$BOOST_ROOT" ]] || exit 1
131+ ls "$BOOST_ROOT/include"
132+ echo "CMake config files:"
133+ find "$BOOST_ROOT"/lib/cmake -type f
134+ echo "BOOST_ROOT=${BOOST_ROOT}" >> $GITHUB_ENV
135+ else
136+ echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
137+ export DEBIAN_FRONTEND=noninteractive
138+
139+ if [ -n "${{matrix.container}}" ] && [ -f "/etc/debian_version" ]; then
140+ apt-get -o Acquire::Retries=5 update
141+ apt-get -o Acquire::Retries=5 -y -q --no-install-suggests --no-install-recommends install \
142+ sudo \
143+ software-properties-common \
144+ bzip2 \
145+ g++ \
146+ git \
147+ make \
148+ wget
149+ fi
150+ compiler=${{matrix.compiler}}
151+ compiler=${compiler/gcc-/g++-}
152+ if [[ "${{matrix.init_llvm}}" == "true" ]]; then
153+ clang_version=${compiler#clang-*}
154+ wget -qO- "https://apt.llvm.org/llvm.sh" | sudo bash -s -- "${clang_version}"
155+ fi
156+ sudo apt-get -o Acquire::Retries=5 update
157+ sudo apt-get -o Acquire::Retries=5 -y -q --no-install-suggests --no-install-recommends install \
158+ cmake \
159+ gettext \
160+ libbz2-dev \
161+ libcurl4-openssl-dev \
162+ liblua5.2-dev \
163+ libminiupnpc-dev \
164+ libsdl2-dev libsdl2-mixer-dev \
165+ $compiler
166+ fi
167+
116168 - name : Setup env and configure flags
117169 run : |
118170 echo "DEPS_DIR=${{runner.temp}}/.cache" >> $GITHUB_ENV
@@ -156,36 +208,10 @@ jobs:
156208 path : ${{env.DEPS_DIR}}
157209 key : ${{matrix.os}}-${{env.BOOST_VERSION}}
158210
159- - name : Install system packages
160- run : |
161- if [[ "${{runner.os}}" =~ macOS ]]; then
162- echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX"
163- echo "HOMEBREW_CELLAR=$HOMEBREW_CELLAR"
164- brew install cmake boost sdl2 sdl2_mixer gettext miniupnpc
165- echo "Available Boost installs: $(ls "$HOMEBREW_CELLAR/boost/")"
166- # Use the latest (last folder)
167- BOOST_ROOT=$(find "$HOMEBREW_CELLAR/boost/"* -maxdepth 0 -type d | tail -n1)
168- echo "Choosen Boost: $BOOST_ROOT"
169- [[ -n "$BOOST_ROOT" ]] || exit 1
170- ls "$BOOST_ROOT/include"
171- echo "CMake config files:"
172- find "$BOOST_ROOT"/lib/cmake -type f
173- echo "BOOST_ROOT=${BOOST_ROOT}" >> $GITHUB_ENV
174- else
175- compiler=${{matrix.compiler}}
176- compiler=${compiler/gcc-/g++-}
177- if [[ "${{matrix.init_llvm}}" == "true" ]]; then
178- clang_version=${compiler#clang-*}
179- wget -qO- "https://apt.llvm.org/llvm.sh" | sudo bash -s -- "${clang_version}"
180- fi
181- sudo apt-get -o Acquire::Retries=5 update
182- sudo apt-get -o Acquire::Retries=5 -y -q --no-install-suggests --no-install-recommends install gettext libsdl2-dev libsdl2-mixer-dev libcurl4-openssl-dev libbz2-dev libminiupnpc-dev liblua5.2-dev $compiler
183- fi
184-
185211 - name : Setup CCache
186212 uses : hendrikmuhs/ccache-action@v1
187213 with :
188- key : ${{matrix.os}}-${{matrix.compiler}}-${{matrix.type}}-${{matrix.boost}}
214+ key : ${{matrix.os}}-${{matrix.container}}-${{matrix. compiler}}-${{matrix.type}}-${{matrix.boost}}
189215 max-size : 200M
190216
191217 - name : Compile CMake (Linux)
0 commit comments