Skip to content

Commit

Permalink
Use system TBB and Embree 4 on ubuntu-24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwa committed Jul 21, 2024
1 parent 867621e commit a8d33fe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/continuous-building.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
run: |
sudo apt update
sudo apt install qtbase5-dev libqt5svg5-dev
- name: 'Linux: Install TBB and Embree, if using distro packages'
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
sudo apt install libtbb-dev libembree-dev
echo "USE_SYSTEM_TBB_AND_EMBREE=1" >> $GITHUB_ENV
- name: 'Linux: Build the artifact'
if: startsWith(matrix.os, 'ubuntu-')
run: ./build-linux-64.sh
Expand Down
31 changes: 20 additions & 11 deletions build-linux-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@ cmake --version

mkdir "$BUILD_DIR"
cd "$BUILD_DIR"
wget -q https://github.com/embree/embree/releases/download/v3.13.1/embree-3.13.1.x86_64.linux.tar.gz -O embree.tgz
wget -q https://github.com/oneapi-src/oneTBB/releases/download/v2021.3.0/oneapi-tbb-2021.3.0-lin.tgz -O tbb.tgz

tar xf embree.tgz
tar xf tbb.tgz
if [ "$USE_SYSTEM_TBB_AND_EMBREE" == "1" ]; then
if [ "$USE_ASAN" == "YES" ]; then
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DERICWTOOLS_ASAN=YES
else
cmake .. -DCMAKE_BUILD_TYPE=Release
fi
else
wget -q https://github.com/embree/embree/releases/download/v3.13.1/embree-3.13.1.x86_64.linux.tar.gz -O embree.tgz
wget -q https://github.com/oneapi-src/oneTBB/releases/download/v2021.3.0/oneapi-tbb-2021.3.0-lin.tgz -O tbb.tgz

EMBREE_CMAKE_DIR="$(pwd)/embree-3.13.1.x86_64.linux/lib/cmake/embree-3.13.1"
TBB_CMAKE_DIR="$(pwd)/oneapi-tbb-2021.3.0/lib/cmake"
tar xf embree.tgz
tar xf tbb.tgz

# check USE_ASAN environment variable (see cmake.yml)
if [ "$USE_ASAN" == "YES" ]; then
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR" -DENABLE_LIGHTPREVIEW=YES -DERICWTOOLS_ASAN=YES
else
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
EMBREE_CMAKE_DIR="$(pwd)/embree-3.13.1.x86_64.linux/lib/cmake/embree-3.13.1"
TBB_CMAKE_DIR="$(pwd)/oneapi-tbb-2021.3.0/lib/cmake"

# check USE_ASAN environment variable (see cmake.yml)
if [ "$USE_ASAN" == "YES" ]; then
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR" -DENABLE_LIGHTPREVIEW=YES -DERICWTOOLS_ASAN=YES
else
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
fi
fi

# not yet free of memory leaks, so don't abort on leak detection
Expand Down

0 comments on commit a8d33fe

Please sign in to comment.