Skip to content

Commit 27aba0c

Browse files
committed
Build only MacOS
1 parent c5cda62 commit 27aba0c

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

.github/scripts/cibw_before_all_macos.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ brew install sdformat15
3030
echo "Cloning GTSAM source (develop branch)..."
3131
git clone --depth 1 https://github.com/borglab/gtsam.git ${INSTALL_PREFIX}/gtsam_source
3232

33-
# Write environment file for before-build scripts
34-
BOOST_PREFIX="$(brew --prefix boost)"
35-
3633
cat > ${INSTALL_PREFIX}/env.sh << EOF
3734
export INSTALL_PREFIX="${INSTALL_PREFIX}"
38-
export BOOST_ROOT="${BOOST_PREFIX}"
39-
export BOOST_INCLUDEDIR="${BOOST_PREFIX}/include"
40-
export BOOST_LIBRARYDIR="${BOOST_PREFIX}/lib"
4135
export MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"
4236
export CMAKE_PREFIX_PATH="${BOOST_PREFIX}:\${CMAKE_PREFIX_PATH}"
4337
export LD_LIBRARY_PATH="${BOOST_PREFIX}/lib:\${LD_LIBRARY_PATH}"

.github/scripts/cibw_before_build_macos.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ NUM_CORES=$(sysctl -n hw.logicalcpu)
1212
# Source environment from before-all
1313
source ${INSTALL_PREFIX}/env.sh
1414

15-
# Get the Python executable provided by cibuildwheel
16-
PYTHON_EXE=$(which python)
15+
# Get the Python executable provided by cibuildwheel (full path)
16+
# Use `python -c` so we get the exact interpreter executable path
17+
PYTHON_EXE=$(python -c "import sys; print(sys.executable)")
1718
PYTHON_VERSION=$($PYTHON_EXE -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
1819

1920
echo "Building for Python ${PYTHON_VERSION} at ${PYTHON_EXE}"
@@ -106,7 +107,8 @@ sed -i '' 's/Interpreter Development/Interpreter Development.Module/g' \
106107
# Build GTDynamics C++ extension for this Python version
107108
echo "Building GTDynamics C++ extension..."
108109
GTD_BUILD="${INSTALL_PREFIX}/gtd_build_py${PYTHON_VERSION}"
109-
rm -rf ${GTD_BUILD}
110+
GTD_PREFIX="${INSTALL_PREFIX}/gtd_py${PYTHON_VERSION}"
111+
rm -rf ${GTD_BUILD} ${GTD_PREFIX}
110112
mkdir -p ${GTD_BUILD}
111113

112114
cd ${GTD_BUILD}
@@ -133,14 +135,13 @@ find ${GTD_BUILD}/python/gtdynamics -name "gtdynamics*.so" \
133135
-exec cp {} ${PROJECT_DIR}/python/gtdynamics/ \;
134136

135137
# Install GTDynamics shared library where delocate-wheel can find it
136-
GTD_PREFIX="${INSTALL_PREFIX}/gtd_py${PYTHON_VERSION}"
137138
mkdir -p ${GTD_PREFIX}/lib
138139
find ${GTD_BUILD} -maxdepth 2 -name "libgtdynamics*.dylib" \
139140
-exec cp {} ${GTD_PREFIX}/lib/ \;
140141
rm -f ${INSTALL_PREFIX}/gtd_current
141142
ln -sf ${GTD_PREFIX} ${INSTALL_PREFIX}/gtd_current
142143

143-
# Remove any accidental duplicate gtsam dylibs from GTDynamics lib directory
144+
# Remove any duplicate gtsam dylibs from GTDynamics lib directory
144145
find ${GTD_PREFIX}/lib -name "libgtsam*.dylib" -delete
145146

146147
export DYLD_LIBRARY_PATH="${GTD_PREFIX}/lib:${DYLD_LIBRARY_PATH}"

.github/workflows/build-wheels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
matrix:
2222
include:
2323
# Linux x86_64
24-
- os: ubuntu-latest
25-
cibw_archs: x86_64
24+
#- os: ubuntu-latest
25+
# cibw_archs: x86_64
2626
# Linux aarch64
27-
- os: ubuntu-24.04-arm
28-
cibw_archs: aarch64
27+
#- os: ubuntu-24.04-arm
28+
# cibw_archs: aarch64
2929
# macOS arm64 (macOS 14 Sonoma)
3030
- os: macos-14
3131
cibw_archs: arm64

0 commit comments

Comments
 (0)