ci(macos): install boost from source (#1954)
This commit is contained in:
parent
8d14e7c6f1
commit
a452402267
1 changed files with 45 additions and 3 deletions
48
.github/workflows/CI.yml
vendored
48
.github/workflows/CI.yml
vendored
|
|
@ -504,6 +504,8 @@ jobs:
|
|||
name: MacOS
|
||||
runs-on: macos-11
|
||||
needs: [check_changelog, setup_release]
|
||||
env:
|
||||
BOOST_VERSION: 1.83.0
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -514,10 +516,50 @@ jobs:
|
|||
- name: Setup Dependencies MacOS
|
||||
run: |
|
||||
# install dependencies using homebrew
|
||||
brew install boost cmake curl node opus pkg-config
|
||||
brew install cmake curl node openssl opus pkg-config
|
||||
|
||||
# fix openssl header not found
|
||||
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
|
||||
# by installing boost from source, several headers cannot be found...
|
||||
# the above commented out link only works if boost is installed from homebrew... does not make sense
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "openssl" -path "*/openssl@3/*/include" | head -n 1) \
|
||||
/usr/local/include/openssl
|
||||
|
||||
# fix opus header not found
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \
|
||||
/usr/local/include/opus
|
||||
|
||||
- name: Install Boost
|
||||
# installing boost from homebrew takes 30 minutes in a GitHub runner
|
||||
run: |
|
||||
export BOOST_ROOT=${HOME}/boost-${BOOST_VERSION}
|
||||
|
||||
# install boost
|
||||
wget \
|
||||
https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}.tar.gz \
|
||||
--progress=bar:force:noscroll -q --show-progress
|
||||
tar xf boost-${BOOST_VERSION}.tar.gz
|
||||
cd boost-${BOOST_VERSION}
|
||||
|
||||
# libdir should be set by --prefix but isn't
|
||||
./bootstrap.sh \
|
||||
--prefix=${BOOST_ROOT} \
|
||||
--libdir=${BOOST_ROOT}/lib \
|
||||
--with-libraries=locale,log,program_options,system,thread
|
||||
./b2 headers
|
||||
./b2 install \
|
||||
--prefix=${BOOST_ROOT} \
|
||||
--libdir=${BOOST_ROOT}/lib \
|
||||
-j$(sysctl -n hw.ncpu) \
|
||||
link=shared,static \
|
||||
variant=release \
|
||||
cxxflags=-std=c++14 \
|
||||
cxxflags=-stdlib=libc++ \
|
||||
linkflags=-stdlib=libc++
|
||||
|
||||
# put boost in cmake prefix path
|
||||
echo "BOOST_ROOT=${BOOST_ROOT}" >> ${GITHUB_ENV}
|
||||
|
||||
- name: Build MacOS
|
||||
env:
|
||||
|
|
@ -532,7 +574,7 @@ jobs:
|
|||
-DSUNSHINE_ASSETS_DIR=local/sunshine/assets \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
..
|
||||
make -j ${nproc}
|
||||
make -j $(sysctl -n hw.ncpu)
|
||||
|
||||
- name: Package MacOS
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue