Skip to content

Better gitignore

Better gitignore #9

Workflow file for this run

name: build
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, ubuntu-24.04-arm]
build_type: [Release]
staticcompile: [ON, OFF]
c_compiler: [gcc]
cpp_compiler: [g++]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install python dependencies
run: |
pip install numpy lit
- name: Install boost for Mac
if: matrix.os == 'macos-14'
run: |
brew install automake libtool boost pkg-config
export BOOST_ROOT=$(brew --prefix boost)
- name: Install gmp for Mac
if: matrix.os == 'macos-14'
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
make -j8
sudo make install
cd ..
- name: Install zlib for Mac dynamic
if: matrix.os == 'macos-14' && 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: matrix.os == 'macos-14' && 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: matrix.os == 'macos-14'
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: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
run: sudo apt-get update && sudo apt-get install -yq help2man libgmp-dev libmpfr-dev libboost-all-dev
- 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 }} ..
cd ../..
- name: Checkout CMS
uses: actions/checkout@v4
with:
repository: msoos/cryptominisat
ref: synthesis
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: Install m4ri
run: |
wget https://github.com/malb/m4ri/releases/download/20250128/m4ri-20250128.tar.gz
tar xvf m4ri-20250128.tar.gz
cd m4ri-20250128
./configure --enable-static --enable-shared
make -j8
sudo make install
cd ..
- name: Install BRiAl
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
run: |
wget https://github.com/BRiAl/BRiAl/releases/download/1.2.12/brial-1.2.12.tar.bz2
tar xvf brial-1.2.12.tar.bz2
cd brial-1.2.12
./configure --enable-static --enable-shared
make -j8
sudo make install
cd ..
- name: Install BRiAl
if: matrix.os == 'macos-14'
run: |
wget https://github.com/BRiAl/BRiAl/releases/download/1.2.12/brial-1.2.12.tar.bz2
tar xvf brial-1.2.12.tar.bz2
cd brial-1.2.12
export CXXFLAGS="-I$(brew --prefix boost)/include"
export LDFLAGS="-L$(brew --prefix boost)/lib"
./configure --with-boost=$(brew --prefix boost) --enable-static --enable-shared
make -j8
sudo make install
cd ..
- uses: actions/checkout@v4
with:
path: project
submodules: 'true'
- name: Build project
run: |
cd project
mkdir -p build && cd build
cmake \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DSTATICCOMPILE=${{ matrix.staticcompile }} \
-DENABLE_TESTING=ON \
-S ..
cmake --build . --config ${{matrix.build_type}} -v
- name: Test project
if: matrix.staticcompile == 'ON'
run: |
ctest -V
- name: Upload Artifact - Linux
if: matrix.os == 'ubuntu-latest' && matrix.staticcompile == 'ON'
uses: actions/upload-artifact@v4
with:
name: bosphorus-linux-amd64
path: project/build/bosphorus
- name: Upload Artifact - Linux arm
if: matrix.os == 'ubuntu-24.04-arm' && matrix.staticcompile == 'ON'
uses: actions/upload-artifact@v4
with:
name: bosphorus-linux-arm64
path: project/build/bosphorus
- name: Upload Artifact - Mac
if: matrix.os == 'macos-14' && matrix.staticcompile == 'ON'
uses: actions/upload-artifact@v4
with:
name: bosphorus-mac-arm64
path: project/build/bosphorus
- name: Upload Artifact - Windows
if: matrix.os == 'windows-2022' && matrix.staticcompile == 'ON'
uses: actions/upload-artifact@v4
with:
name: bosphorus-win64.exe
path: project\build\Release\bosphorus.exe
- name: Test
run: ctest -C ${{matrix.build_type}} --verbose