Add initial multi-thread support #465
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| pull_request: | |
| branches: [ "*" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-15, macos-15-intel] | |
| build_type: [Release] | |
| staticcompile: [ON, OFF] | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install gmp for Mac | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| wget https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz | |
| tar xf gmp-6.3.0.tar.xz | |
| cd gmp-6.3.0 | |
| ./configure --enable-static -enable-cxx --enable-shared --with-pic | |
| make -j8 | |
| sudo make install | |
| cd .. | |
| - name: Install zlib for Mac dynamic | |
| if: contains(matrix.os, 'macos') && matrix.staticcompile == 'OFF' | |
| run: | | |
| wget https://www.zlib.net/zlib-1.3.1.tar.gz | |
| tar xzvf zlib-1.3.1.tar.gz | |
| cd zlib-1.3.1 | |
| ./configure | |
| make -j8 | |
| sudo make install | |
| cd .. | |
| - name: Install zlib for Mac static | |
| if: contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' | |
| run: | | |
| wget https://www.zlib.net/zlib-1.3.1.tar.gz | |
| tar xzvf zlib-1.3.1.tar.gz | |
| cd zlib-1.3.1 | |
| ./configure --static | |
| make -j8 | |
| sudo make install | |
| cd .. | |
| - name: Install mpfr for Mac | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz | |
| tar xf mpfr-4.2.1.tar.xz | |
| cd mpfr-4.2.1 | |
| ./configure --enable-static -enable-cxx --enable-shared | |
| make -j8 | |
| sudo make install | |
| cd .. | |
| - name: Install dependencies for Linux | |
| if: contains(matrix.os, 'ubuntu') | |
| run: sudo apt-get update && sudo apt-get install -yq help2man libgmp-dev libmpfr-dev | |
| - name: Install flint | |
| run: | | |
| wget https://github.com/flintlib/flint/releases/download/v3.2.0-rc1/flint-3.2.0-rc1.tar.gz | |
| tar xzf flint-3.2.0-rc1.tar.gz | |
| cd flint-3.2.0-rc1 | |
| ./configure --enable-static --enable-shared | |
| make -j8 | |
| sudo make install | |
| cd .. | |
| - name: Checkout Cadical | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/cadical | |
| ref: add_dynamic_lib | |
| path: cadical | |
| - name: Build Cadical | |
| run: | | |
| cd cadical | |
| CXXFLAGS=-fPIC ./configure --competition | |
| make -j8 | |
| cd .. | |
| - name: Checkout Cadiback | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/cadiback | |
| ref: synthesis | |
| path: cadiback | |
| - name: Build Cadiback | |
| run: | | |
| cd cadiback | |
| CXX=c++ ./configure | |
| make -j8 | |
| cd .. | |
| - name: Checkout breakid | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/breakid | |
| ref: master | |
| path: breakid | |
| - name: Build Breakid | |
| run: | | |
| cd breakid | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }} .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout CMS | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: msoos/cryptominisat | |
| ref: master | |
| path: cryptominisat | |
| submodules: 'true' | |
| - name: Build CMS | |
| run: | | |
| cd cryptominisat | |
| mkdir build &&cd build | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }} .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout SBVA | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/SBVA | |
| ref: master | |
| path: sbva | |
| - name: Build SBVA | |
| run: | | |
| cd sbva | |
| mkdir build | |
| cd build | |
| ln -s ../scripts/*.sh . | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }} .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout cereal | |
| run: | | |
| wget https://github.com/USCiLab/cereal/archive/v1.3.2.tar.gz | |
| - name: Build cereal | |
| run: | | |
| tar xvf v1.3.2.tar.gz | |
| # Fix cereal compilation on clang 19+; see | |
| # https://github.com/USCiLab/cereal/pull/835 | |
| if sed --version >/dev/null 2>&1; then | |
| # GNU sed (Linux) | |
| sed -i 's|::template apply|::apply|' cereal-1.3.2/include/cereal/types/tuple.hpp | |
| else | |
| # BSD sed (macOS) | |
| sed -i '' 's|::template apply|::apply|' cereal-1.3.2/include/cereal/types/tuple.hpp | |
| fi | |
| cd cereal-1.3.2 | |
| mkdir build | |
| cd build | |
| cmake -DJUST_INSTALL_CEREAL=ON .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| sudo cmake --install . --config ${{matrix.build_type}} -v | |
| cd .. | |
| - name: Checkout armadillo | |
| run: | | |
| wget https://sourceforge.net/projects/arma/files/armadillo-14.0.2.tar.xz | |
| - name: Build armadillo | |
| run: | | |
| tar xvf armadillo-14.0.2.tar.xz | |
| cd armadillo-14.0.2/ | |
| ./configure | |
| make -j6 | |
| sudo make install | |
| cd .. | |
| - name: Checkout ensmallen | |
| run: | | |
| wget https://ensmallen.org/files/ensmallen-2.22.2.tar.gz | |
| - name: Build ensmallen | |
| run: | | |
| tar xvf ensmallen-2.22.2.tar.gz | |
| cd ensmallen-2.22.2 | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| sudo cmake --install . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout mlpack | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: mlpack/mlpack | |
| ref: 4.6.2 | |
| path: mlpack | |
| - name: Build mlpack | |
| run: | | |
| cd mlpack | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_SHARED_LIBS=ON -DBUILD_CLI_EXECUTABLES=OFF .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| sudo cmake --install . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout arjun | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/arjun | |
| ref: master | |
| path: arjun | |
| - name: Build arjun | |
| run: | | |
| cd arjun | |
| mkdir build | |
| cd build | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DSTATICCOMPILE=${{ matrix.staticcompile }} \ | |
| -DENABLE_TESTING=OFF \ | |
| -S .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - name: Checkout approxmc | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: meelgroup/approxmc | |
| ref: master | |
| path: approxmc | |
| submodules: 'true' | |
| - name: Build approxmc | |
| run: | | |
| cd approxmc | |
| mkdir build | |
| cd build | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DSTATICCOMPILE=${{ matrix.staticcompile }} \ | |
| -DENABLE_TESTING=OFF \ | |
| -S .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| cd ../.. | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: project | |
| submodules: 'true' | |
| - name: Build project | |
| run: | | |
| cd project | |
| mkdir -p build && cd build | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DSTATICCOMPILE=${{ matrix.staticcompile }} \ | |
| -DENABLE_TESTING=OFF \ | |
| -S .. | |
| cmake --build . --config ${{matrix.build_type}} -v | |
| - name: Test | |
| run: ctest -C ${{matrix.build_type}} --verbose | |
| - name: Upload Artifact - Linux | |
| if: contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && !contains(matrix.os, 'arm') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ganak-linux-amd64 | |
| path: | | |
| project/build/ganak | |
| project/build/lib/* | |
| project/build/include/* | |
| - name: Upload Artifact - Linux arm | |
| if: contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && contains(matrix.os, 'arm') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ganak-linux-arm64 | |
| path: | | |
| project/build/ganak | |
| project/build/lib/* | |
| project/build/include/* | |
| - name: Upload Artifact - Mac Intel | |
| if: matrix.os == 'macos-15-intel' && matrix.staticcompile == 'ON' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ganak-mac-x86_64 | |
| path: | | |
| project/build/ganak | |
| project/build/lib/* | |
| project/build/include/* | |
| - name: Upload Artifact - Mac Arm | |
| if: matrix.os == 'macos-14' && matrix.staticcompile == 'ON' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ganak-mac-arm64 | |
| path: | | |
| project/build/ganak | |
| project/build/lib/* | |
| project/build/include/* | |