@@ -15,11 +15,19 @@ jobs:
1515 fail-fast : false
1616 matrix :
1717 config :
18- - name : Windows MSVC
18+ - name : Windows MSVC (dynamic)
1919 os : windows
2020 os-version : 2022
2121 environment : msvc
2222 shell : pwsh
23+ static : false
24+
25+ - name : Windows MSVC (static)
26+ os : windows
27+ os-version : 2022
28+ environment : msvc
29+ shell : pwsh
30+ static : true
2331
2432 - name : Windows MingGW
2533 os : windows
3543 architecture : ucrt-x86_64
3644 shell : ' msys2 {0}'
3745
38- - name : Linux
46+ - name : Linux
3947 os : ubuntu
4048 os-version : 24.04
4149 use-clang : false
@@ -157,6 +165,16 @@ jobs:
157165 echo "CXX_LD=lld" >> "$GITHUB_ENV"
158166 echo "OBJC_LD=lld" >> "$GITHUB_ENV"
159167
168+ - name : Unbreak Python in GHA (MacOS 13 image)
169+ if : matrix.config.os == 'macos' && matrix.config.os-version == 13
170+ run : |
171+ # TODO: remove this, after it works again
172+ # A workaround for "The `brew link` step did not complete successfully" error.
173+ # See e.g. https://github.com/Homebrew/homebrew-core/issues/165793#issuecomment-1991817938
174+ find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
175+ sudo rm -rf /Library/Frameworks/Python.framework/
176+ brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3
177+
160178 - name : Setup meson (MacOS)
161179 if : matrix.config.os == 'macos'
162180 run : |
@@ -186,10 +204,10 @@ jobs:
186204 - name : Build and Install OOPetris
187205 run : |
188206 cd oopetris
189- meson setup build -Dbuildtype=release -Ddefault_library=shared -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}/' || ''}}
207+ meson setup build -Dbuildtype=release -Ddefault_library=${{( matrix.config.os == 'windows' && matrix.config.environment == 'msvc' && matrix.config.static ) && 'static' ||' shared' }} -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' && ( ( matrix.config.environment == 'msvc' && matrix.config.static ) && ' -Db_vscrt=static_from_buildtype' || '-Db_vscrt= from_buildtype') || '' }} ${{ (matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )) && '-Dprefix=$RUNNER_TEMP/msys64${MINGW_PREFIX}/' || ''}}
190208 ${{ matrix.config.os == 'ubuntu' && 'sudo' || '' }} meson install -C build
191209
192210 - name : Build Wrapper
193211 run : |
194- meson setup -Dtests=false -Dexample=true build -Dbuildtype=release -Ddefault_library=shared -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} ${{ matrix.config.os == 'windows' && ' -Db_vscrt=from_buildtype' || '' }}
212+ meson setup -Dtests=false -Dexample=true build -Dbuildtype=release -Ddefault_library=${{( matrix.config.os == 'windows' && matrix.config.environment == 'msvc' && matrix.config.static ) && 'static' ||' shared' }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} ${{ matrix.config.os == 'windows' && ( ( matrix.config.environment == 'msvc' && matrix.config.static ) && ' -Db_vscrt=static_from_buildtype' || '-Db_vscrt= from_buildtype') || '' }}
195213 meson compile -C build
0 commit comments