Skip to content

add CI

add CI #1

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, macos-13]
build_type: [Release]
staticcompile: ['ON']
steps:
- uses: actions/setup-python@v5
if: ${{ !contains(matrix.os, 'macos') }}
with:
python-version: '3.10'
- name: Install dependencies for Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -yq git cmake bison flex libboost-all-dev python3 perl \
build-essential python3-distutils-extra wget zlib1g-dev \
libboost-program-options-dev libboost-serialization-dev \
libgmp-dev libmpfr-dev help2man
- name: Install dependencies for macOS
if: contains(matrix.os, 'macos')
run: |
brew update
brew install cmake boost gmp mpfr wget zig
- name: Checkout Minisat
uses: actions/checkout@v4
with:
repository: meelgroup/minisat
ref: 8c9ea22aff06fdf284b8bb13f8524a96f7d446af
path: minisat
- name: Build Minisat (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
cd minisat
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_SHARED_LIBS=OFF \
-DSTATICCOMPILE=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DZLIB_LIBRARY=-lz
cmake --build build --parallel --config ${{ matrix.build_type }}
sudo cmake --install build --config ${{ matrix.build_type }}
cd ..
- name: Build Minisat (macOS)
if: contains(matrix.os, 'macos')
run: |
cd minisat
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_SHARED_LIBS=OFF \
-DSTATICCOMPILE=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/zig-macos-static.cmake
cmake --build build --parallel --config ${{ matrix.build_type }}
sudo cmake --install build --config ${{ matrix.build_type }}
cd ..