Skip to content

Commit 7c5ff6f

Browse files
SeaOtocinclusfacebook-github-bot
authored andcommitted
{Build} Fixing Brew install CMake issue. (#256)
Summary: Pull Request resolved: #256 This diff fixes the new brew install cmake issue on Github workflow. Installing a pre-installed package will trigger an error. Reviewed By: danielyan86129 Differential Revision: D81616132 fbshipit-source-id: 8729cd8c814334f0eeece25d79c0f9202ea432a9
1 parent aedf53e commit 7c5ff6f

5 files changed

Lines changed: 29 additions & 18 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ jobs:
4949
sudo apt-get clean
5050
5151
elif [ "$RUNNER_OS" == "macOS" ]; then
52-
# Install system deps with Homebrew
53-
brew install cmake
52+
# Update or install cmake
53+
brew upgrade cmake || brew install cmake
54+
5455
# VRS dependencies
5556
brew install boost fmt googletest glog lz4 zstd xxhash libpng jpeg-turbo
5657
else

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
sudo apt-get clean
5252
5353
elif [ "$RUNNER_OS" == "macOS" ]; then
54-
# Install system deps with Homebrew
55-
brew install cmake
54+
# Update or install cmake
55+
brew upgrade cmake || brew install cmake
5656
# VRS dependencies
5757
brew install boost fmt sophus glog lz4 zstd xxhash libpng jpeg-turbo
5858
else

cmake/Setup3rdParty.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ include(FetchContent) # once in the project to include the module
1616

1717
FetchContent_Declare(
1818
Dispenso
19-
GIT_REPOSITORY https://github.com/facebookincubator/dispenso.git
20-
GIT_TAG f5d0dc5c5c02bf26063ab11ebfaa42f6d1a7c650 # v1.4.0
19+
GIT_REPOSITORY https://github.com/facebookincubator/dispenso.git
20+
GIT_TAG f5d0dc5c5c02bf26063ab11ebfaa42f6d1a7c650 # v1.4.0
2121
)
2222

2323
FetchContent_Declare(
2424
vrs
25-
GIT_REPOSITORY https://github.com/facebookresearch/vrs.git
26-
GIT_TAG b5b854ea618f45fdce8c5d69e11cc879845adfc9 # master August 14, 2024.
25+
GIT_REPOSITORY https://github.com/facebookresearch/vrs.git
26+
GIT_TAG 26fdab54501d3567f27f953c13b9c786e000b7ee # master Sept 3, 2025.
2727
)
2828
# Override config for vrs
2929
option(UNIT_TESTS OFF)
@@ -35,13 +35,13 @@ FetchContent_MakeAvailable(vrs)
3535

3636
FetchContent_Declare(
3737
eigen
38-
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
39-
GIT_TAG 19cacd3ecb9dab73c2dd7bc39d9193e06ba92bdd # 3.4.90
38+
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
39+
GIT_TAG 19cacd3ecb9dab73c2dd7bc39d9193e06ba92bdd # 3.4.90
4040
)
4141
FetchContent_Declare(
4242
Sophus
43-
GIT_REPOSITORY https://github.com/strasdat/Sophus.git
44-
GIT_TAG de0f8d3d92bf776271e16de56d1803940ebccab9 # 1.22.10
43+
GIT_REPOSITORY https://github.com/strasdat/Sophus.git
44+
GIT_TAG de0f8d3d92bf776271e16de56d1803940ebccab9 # 1.22.10
4545
)
4646

4747
# Override config for Sophus
@@ -52,14 +52,14 @@ add_definitions("-DSOPHUS_DISABLE_ENSURES")
5252
FetchContent_Declare(
5353
cli11
5454
GIT_REPOSITORY https://github.com/CLIUtils/CLI11
55-
GIT_TAG v2.4.2
55+
GIT_TAG v2.4.2
5656
)
5757

5858

5959
FetchContent_Declare(
6060
nlohmann-json
6161
GIT_REPOSITORY https://github.com/nlohmann/json.git
62-
GIT_TAG v3.11.3
62+
GIT_TAG v3.11.3
6363
)
6464

6565
set(dependencies cli11 eigen Sophus Dispenso nlohmann-json)
@@ -72,8 +72,8 @@ include(ExternalProject)
7272
ExternalProject_Add(
7373
fast-cpp-csv-parser
7474
GIT_REPOSITORY https://github.com/ben-strasser/fast-cpp-csv-parser.git
75-
GIT_TAG origin/master
76-
SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/fast-cpp-csv-parser"
75+
GIT_TAG origin/master
76+
SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/fast-cpp-csv-parser"
7777
# disable following, since it is not needed
7878
CONFIGURE_COMMAND ""
7979
BUILD_COMMAND ""

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ cd /tmp && git clone --recursive https://github.com/boostorg/boost.git -b boost-
4444
'''
4545

4646
[tool.cibuildwheel.macos]
47-
before-build="brew install boost cmake fmt glog jpeg-turbo libpng lz4 xxhash zstd"
47+
before-build = '''
48+
# Update or install cmake
49+
brew upgrade cmake || brew install cmake
50+
51+
brew install boost fmt glog jpeg-turbo libpng lz4 xxhash zstd
52+
'''
4853
environment = {"CMAKE_ARGS"="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"}
4954

5055
##

pyproject_arm64.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ build-backend = "setuptools.build_meta"
1414

1515
[tool.cibuildwheel.macos]
1616
archs = ["arm64"]
17-
before-build="arch -arm64 brew install boost cmake fmt glog jpeg-turbo libpng lz4 xxhash zstd"
17+
before-build = '''
18+
# Update or install cmake
19+
arch -arm64 brew upgrade cmake || arch -arm64 brew install cmake
20+
21+
arch -arm64 brew install boost fmt glog jpeg-turbo libpng lz4 xxhash zstd
22+
'''
1823
environment = {"ARCHFLAGS" ="-arch arm64", "CMAKE_ARGS"="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"}

0 commit comments

Comments
 (0)