@@ -2,7 +2,7 @@ name: Build CI
22
33on :
44 push :
5- branches : [" main" ]
5+ branches : [' main' ]
66 pull_request :
77 workflow_dispatch :
88
3030 architecture : x86_64
3131 buildtype : release
3232 library_type : static
33- shell : " msys2 {0}"
33+ shell : ' msys2 {0}'
3434
3535 - name : Windows UCRT Release
3636 os : windows
3939 architecture : ucrt-x86_64
4040 buildtype : release
4141 library_type : static
42- shell : " msys2 {0}"
42+ shell : ' msys2 {0}'
4343
4444 - name : Linux Release
4545 os : ubuntu
@@ -90,15 +90,14 @@ jobs:
9090 steps :
9191 - uses : actions/checkout@v4
9292 with :
93- fetch-depth : " 0 "
93+ fetch-depth : ' 0 '
9494
9595 - name : Setup MSVC (Windows)
9696 if : matrix.config.os == 'windows' && matrix.config.environment == 'msvc'
9797 uses : TheMrMilchmann/setup-msvc-dev@v3
9898 with :
9999 arch : x64
100- toolset : " 14.41"
101-
100+ toolset : ' 14.41'
102101
103102 - name : Setup MYSYS2 (Windows)
104103 if : matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )
@@ -120,17 +119,31 @@ jobs:
120119 mingw-w64-${{matrix.config.architecture}}-cmake
121120 git
122121
123- - name : Setup Clang (Linux)
124- if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
122+ - name : Setup Clang (Linux) (libc++)
123+ if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib
125124 run : |
126125 wget https://apt.llvm.org/llvm.sh
127126 chmod +x llvm.sh
128- sudo ./llvm.sh 18
129- sudo apt-get install libc++-18* libc++abi*18* -y
130- echo "CC=clang-18" >> "$GITHUB_ENV"
131- echo "CXX=clang++-18" >> "$GITHUB_ENV"
132- echo "OBJC=clang-18" >> "$GITHUB_ENV"
133-
127+ sudo ./llvm.sh 19
128+ sudo apt-get install libc++-19* libc++abi*19* -y --no-install-recommends
129+ echo "CC=clang-19" >> "$GITHUB_ENV"
130+ echo "CXX=clang++-19" >> "$GITHUB_ENV"
131+ echo "OBJC=clang-19" >> "$GITHUB_ENV"
132+
133+ - name : Setup Clang (Linux) (libstdc++)
134+ if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && (! matrix.config.use-clang_stdlib)
135+ run : |
136+ wget https://apt.llvm.org/llvm.sh
137+ chmod +x llvm.sh
138+ sudo ./llvm.sh 19
139+ echo "CC=clang-19" >> "$GITHUB_ENV"
140+ echo "CXX=clang++-19" >> "$GITHUB_ENV"
141+ echo "OBJC=clang-19" >> "$GITHUB_ENV"
142+ # Patch the libstd++ library, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115119
143+ # This is a dirty workaround, but it is needed, since gcc 14.2 (where this was patched usptream) is not easily available
144+ # If we use the oracular (Ubuntu 24.10) repos, we could install gcc 14.2, but clang-19 isn't compatible with that
145+ # TODO: remove this, after it works again
146+ sudo patch -p1 /usr/include/c++/14/bits/unicode.h .github/patches/gcc_14_2.diff
134147
135148 - name : Setup GCC (Linux)
136149 if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
@@ -143,10 +156,11 @@ jobs:
143156 if : matrix.config.os == 'macos'
144157 run : |
145158 brew update
146- brew install llvm@18
147- echo "$(brew --prefix)/opt/llvm@18/bin" >> $GITHUB_PATH
148- echo "LDFLAGS=-L$(brew --prefix)/opt/llvm@18/lib -L$(brew --prefix)/opt/llvm@18/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm@18/lib/c++" >> "$GITHUB_ENV"
149- echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm@18/include" >> "$GITHUB_ENV"
159+ # TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
160+ brew install llvm@19 lld
161+ echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
162+ echo "LDFLAGS=-L$(brew --prefix)/opt/llvm/lib -L$(brew --prefix)/opt/llvm/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm/lib/c++" >> "$GITHUB_ENV"
163+ echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
150164 echo "CC=clang" >> "$GITHUB_ENV"
151165 echo "CXX=clang++" >> "$GITHUB_ENV"
152166 echo "OBJC=clang" >> "$GITHUB_ENV"
@@ -155,7 +169,7 @@ jobs:
155169 echo "OBJC_LD=lld" >> "$GITHUB_ENV"
156170
157171 - name : Unbreak Python in GHA (MacOS 13 image)
158- if : matrix.config.os == 'macos' && matrix.config.os-version == 13
172+ if : matrix.config.os == 'macos' && matrix.config.os-version == 13
159173 run : |
160174 # TODO: remove this, after it works again
161175 # A workaround for "The `brew link` step did not complete successfully" error.
@@ -180,7 +194,7 @@ jobs:
180194 if : matrix.config.os == 'ubuntu'
181195 run : |
182196 sudo apt-get update
183- sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
197+ sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends
184198
185199 - name : Install dependencies (MacOS)
186200 if : matrix.config.os == 'macos'
@@ -189,10 +203,10 @@ jobs:
189203 brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
190204
191205 - name : Configure
192- run : meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
206+ run : meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
193207
194208 - name : Build
195- run : meson compile -C build
209+ run : meson compile -C build
196210
197211 - name : Upload artifacts
198212 uses : actions/upload-artifact@v4
0 commit comments