diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c26f676a..4c8c56e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,13 +18,30 @@ jobs: submodules: recursive - name: Install Linux deps if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get -y --no-install-recommends install git g++ cmake ninja-build llvm-15-dev zlib1g-dev libglew-dev flex bison libfl-dev libboost-thread-dev libboost-filesystem-dev libzstd-dev + run: sudo apt-get update && sudo apt-get -y --no-install-recommends install git g++ cmake ninja-build llvm-15-dev zlib1g-dev libglew-dev flex bison libfl-dev libzstd-dev - name: Install macOS deps if: runner.os == 'macOS' - run: brew install cmake ninja llvm@15 zlib glew flex bison boost@1.85 zstd ncurses + run: brew install cmake ninja llvm@15 zlib glew flex bison boost zstd ncurses + - uses: actions/checkout@v6 + if: runner.os == 'Linux' + with: + repository: boostorg/boost + path: boost + ref: boost-1.90.0 + - name: Build Boost (Linux) + if: runner.os == 'Linux' + run: | + cd ${{ github.workspace }}/boost + git submodule update --depth 1 --init tools/boostdep libs/filesystem libs/thread libs/random libs/asio + python tools/boostdep/depinst/depinst.py -X test -g "--depth 1" filesystem + python tools/boostdep/depinst/depinst.py -X test -g "--depth 1" thread + python tools/boostdep/depinst/depinst.py -X test -g "--depth 1" random + python tools/boostdep/depinst/depinst.py -X test -g "--depth 1" asio + ./bootstrap.sh --prefix=${{ github.workspace }}/boost-fpic + ./b2 install link=static runtime-link=shared threading=multi variant=release cxxflags=-fPIC - name: Configure (Linux) if: runner.os == 'Linux' - run: cmake -S ocelot -B ocelot/build -G Ninja -DBUILD_TESTS=ON -DBUILD_TESTS_CUDA=OFF -DLLVM_DIR=$(llvm-config-15 --cmakedir) + run: cmake -S ocelot -B ocelot/build -G Ninja -DBUILD_TESTS=ON -DBUILD_TESTS_CUDA=OFF -DLLVM_DIR=$(llvm-config-15 --cmakedir) -DBOOST_ROOT=${{ github.workspace }}/boost-fpic - name: Configure (macOS) if: runner.os == 'macOS' run: cmake -S ocelot -B ocelot/build -G Ninja -DBUILD_TESTS=ON -DBUILD_TESTS_CUDA=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 diff --git a/ocelot/CMakeLists.txt b/ocelot/CMakeLists.txt index c084efa9..765fbdf2 100644 --- a/ocelot/CMakeLists.txt +++ b/ocelot/CMakeLists.txt @@ -30,7 +30,10 @@ if (APPLE) "/opt/homebrew/opt/bison") endif() -find_package(Boost COMPONENTS system filesystem REQUIRED) +set(Boost_USE_STATIC_LIBS ON) +set(Boost_USE_MULTITHREADED ON) + +find_package(Boost COMPONENTS filesystem thread REQUIRED) find_package(FLEX 2.5 REQUIRED) find_package(BISON 2.5 REQUIRED) find_package(GLEW REQUIRED) @@ -244,7 +247,6 @@ set(${PROJECT_NAME}_INCLUDE_DIRS set(${PROJECT_NAME}_LINK_LIBRARIES GLEW::GLEW hydrazine - Boost::system Boost::filesystem ZLIB::ZLIB ${CURSES_LIBRARIES}