@@ -108,16 +108,31 @@ jobs:
108108 mingw-w64-${{matrix.config.architecture}}-cmake
109109 git
110110
111- - name : Setup Clang (Linux)
112- if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
111+ - name : Setup Clang (Linux) (libc++)
112+ if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib
113113 run : |
114114 wget https://apt.llvm.org/llvm.sh
115115 chmod +x llvm.sh
116- sudo ./llvm.sh 18
117- sudo apt-get install libc++-18* libc++abi*18* -y --no-install-recommends
118- echo "CC=clang-18" >> "$GITHUB_ENV"
119- echo "CXX=clang++-18" >> "$GITHUB_ENV"
120- echo "OBJC=clang-18" >> "$GITHUB_ENV"
116+ sudo ./llvm.sh 19
117+ sudo apt-get install libc++-19* libc++abi*19* -y --no-install-recommends
118+ echo "CC=clang-19" >> "$GITHUB_ENV"
119+ echo "CXX=clang++-19" >> "$GITHUB_ENV"
120+ echo "OBJC=clang-19" >> "$GITHUB_ENV"
121+
122+ - name : Setup Clang (Linux) (libstdc++)
123+ if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && (! matrix.config.use-clang_stdlib)
124+ run : |
125+ wget https://apt.llvm.org/llvm.sh
126+ chmod +x llvm.sh
127+ sudo ./llvm.sh 19
128+ echo "CC=clang-19" >> "$GITHUB_ENV"
129+ echo "CXX=clang++-19" >> "$GITHUB_ENV"
130+ echo "OBJC=clang-19" >> "$GITHUB_ENV"
131+ # Patch the libstd++ library, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115119
132+ # This is a dirty workaround, but it is needed, since gcc 14.2 (where this was patched usptream) is not easily available
133+ # If we use the oracular (Ubuntu 24.10) repos, we could install gcc 14.2, but clang-19 isn't compatible with that
134+ # TODO: remove this, after it works again
135+ sudo patch -p1 /usr/include/c++/14/bits/unicode.h .github/patches/gcc_14_2.diff
121136
122137 - name : Setup GCC (Linux)
123138 if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
@@ -130,7 +145,8 @@ jobs:
130145 if : matrix.config.os == 'macos'
131146 run : |
132147 brew update
133- brew install llvm@18
148+ # TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
149+ brew install llvm@19 lld
134150 echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
135151 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"
136152 echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
@@ -141,6 +157,16 @@ jobs:
141157 echo "CXX_LD=lld" >> "$GITHUB_ENV"
142158 echo "OBJC_LD=lld" >> "$GITHUB_ENV"
143159
160+ - name : Unbreak Python in GHA (MacOS 13 image)
161+ if : matrix.config.os == 'macos' && matrix.config.os-version == 13
162+ run : |
163+ # TODO: remove this, after it works again
164+ # A workaround for "The `brew link` step did not complete successfully" error.
165+ # See e.g. https://github.com/Homebrew/homebrew-core/issues/165793#issuecomment-1991817938
166+ find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
167+ sudo rm -rf /Library/Frameworks/Python.framework/
168+ brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3
169+
144170 - name : Setup meson (MacOS)
145171 if : matrix.config.os == 'macos'
146172 run : |
@@ -167,7 +193,7 @@ jobs:
167193 choco install pkgconfiglite
168194 echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
169195
170- - name : Configure
196+ - name : Configure OOPetris
171197 run : |
172198 cd oopetris
173199 meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }} ${{ (matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )) && '-Dprefix=$RUNNER_TEMP/msys64${MINGW_PREFIX}/' || ''}}
0 commit comments