Skip to content

Commit 5624bc4

Browse files
SeaOtocinclusfacebook-github-bot
authored andcommitted
{Build} Fix macos GitHub worfklow (facebookresearch#213)
Summary: Summary of the encountered error: ``` Error: cmake was installed from the local/pinned tap but you are trying to install it from the homebrew/core tap. Formulae with the same name from different taps cannot be installed at the same time. ``` Solution: - Use existing GitHub runner images Git and Ninja - so we avoid this Error - Force update CMake to have CMake >= 4 Then another issue appears with BOOST being updated to `Boost-1.89.0` on mac ``` Could not find a package configuration file provided by "boost_system" ``` Solution: - Boost.system is now a header only library and we don't need to "link" to it (boostorg/system#132 (comment)) Differential Revision: D81600728
1 parent 6c7f474 commit 5624bc4

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/build-and-test.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ jobs:
3333
libeigen3-dev
3434
3535
elif [ "$RUNNER_OS" == "macOS" ]; then
36-
brew install cmake git ninja googletest glog fmt \
37-
jpeg-turbo libpng \
38-
lz4 zstd xxhash \
39-
boost \
40-
opus \
41-
qt5 portaudio \
42-
eigen
36+
# Force update cmake
37+
brew uninstall cmake; brew install cmake
38+
# Install deps, but use pre-installed git, ninja
39+
brew install googletest glog fmt \
40+
jpeg-turbo libpng \
41+
lz4 zstd xxhash \
42+
boost \
43+
opus \
44+
qt5 portaudio \
45+
eigen
4346
4447
else
4548
echo "$RUNNER_OS not supported"

cmake/LibrariesSetup.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ if (EXISTS "$ENV{HOME}/homebrew")
1717
list(APPEND CMAKE_FIND_ROOT_PATH "$ENV{HOME}/homebrew")
1818
endif()
1919

20-
find_package(Boost REQUIRED
21-
COMPONENTS
20+
find_package(Boost
21+
REQUIRED COMPONENTS
2222
filesystem
2323
date_time
24-
system
24+
OPTIONAL_COMPONENTS system
2525
)
2626

2727
find_package(Threads REQUIRED)

0 commit comments

Comments
 (0)