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

Fix: macOS Homebrew CI #8

Merged
merged 2 commits into from
Sep 30, 2023
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
# rdar://FB11369327
name: '${{ matrix.os }} (homebrew, ${{ matrix.compiler }})'
runs-on: ${{ matrix.os }}
if: false
defaults:
run:
shell: bash
Expand Down Expand Up @@ -144,7 +143,8 @@ jobs:
meson --version
ninja --version
- name: Configure
run: meson setup build --prefix=$HOME/.local $BUILD_OPTS
# GCC on macOS cannot do LTO for now due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111635
run: meson setup build --prefix=$HOME/.local -Db_lto=false $BUILD_OPTS
- name: Build
run: meson compile -C build
- name: Test
Expand All @@ -156,7 +156,7 @@ jobs:
# Codecov no longer parses gcov files automatically
run: |
rm -rf build
meson setup build --prefix=$HOME/.local -Db_coverage=true --buildtype=debug
meson setup build --prefix=$HOME/.local -Db_lto=false -Db_coverage=true --buildtype=debug $BUILD_OPTS
meson compile -C build
meson test -C build
ninja -C build coverage-xml
Expand Down
7 changes: 7 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# SPDX-FileContributor: Written by Rachel Mant <git@dragonmux.network>
cxx = meson.get_compiler('cpp')

if get_option('b_lto') and host_machine.system() == 'darwin' and cxx.get_id() == 'gcc'
error(
'GCC on macOS does not correctly implement support for LTO, please pass `-Db_lto=false` to Meson\n',
'-> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111635 for details'
)
endif

if cxx.get_id() == 'msvc' and cxx.version().version_compare('<19.37')
error('Your compiler is broken, please upgrade to at least MSVC 2022 release 17.7 to build bmpflash with MSVC.')
endif
Expand Down