File: install_macos.sh

package info (click to toggle)
openvdb 10.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 23,092 kB
  • sloc: cpp: 293,853; ansic: 2,268; python: 776; objc: 714; sh: 527; yacc: 382; lex: 348; makefile: 176
file content (44 lines) | stat: -rwxr-xr-x 1,460 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash

set -x

brew update
brew install bash gnu-getopt # for CI scripts
brew install cmake
brew install boost
brew install boost-python3 # also installs the dependent python version
brew install zlib
brew install glfw
brew install googletest
brew install c-blosc
brew install jq # for trivial parsing of brew json

# Alias python version installed by boost-python3 to path
py_version=$(brew info boost-python3 --json | \
    jq -cr '.[].dependencies[] | select(. | startswith("python"))')
echo "Using python $py_version"
# export for subsequent action steps (note, not exported for this env)
echo "Python_ROOT_DIR=/usr/local/opt/$py_version" >> $GITHUB_ENV
echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH

# use gnu-getopt
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH

LATEST=$1
if [ "$LATEST" == "latest" ]; then
    brew install tbb
    brew install openexr
else
    brew install ilmbase
    brew install tbb@2020
    brew install openexr@2

    # Export OpenEXR paths which are no longer installed to /usr/local (as v2.x is deprecated)
    echo "IlmBase_ROOT=/usr/local/opt/ilmbase" >> $GITHUB_ENV
    echo "OpenEXR_ROOT=/usr/local/opt/openexr@2" >> $GITHUB_ENV
    echo "/usr/local/opt/openexr@2/bin" >> $GITHUB_PATH

    # Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated)
    echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV
    echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH
fi