1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
on: [push, pull_request]
name: CI
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
name: [
release,
debug,
]
include:
- name: release
os: ubuntu-latest
config: --testing --unit-testing --python
package-name: Bitwuzla-Linux-x86_64
- name: release
os: macos-latest
config: --testing --unit-testing --python
package-name: Bitwuzla-macOS-arm64
- name: release
os: ubuntu-24.04-arm
config: --testing --unit-testing --python
package-name: Bitwuzla-Linux-arm64
- name: debug
config: debug --python --cryptominisat --kissat
- name: release-clang
os: ubuntu-latest
config: --testing --unit-testing --python --cryptominisat --kissat
env: CC=clang CXX=clang++
- name: debug-clang
os: ubuntu-latest
config: debug --shared --python
env: CC=clang CXX=clang++
- name: release-win64
os: ubuntu-latest
config: --win64
package-name: Bitwuzla-Win64-x86_64
name: ${{ matrix.os }}:${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: Install Packages (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgmp-dev ninja-build
if [[ "${{matrix.name}}" == "release-win64" ]]; then
sudo apt-get install -y mingw-w64
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
fi
if [[ "${{matrix.name}}" == "release-aarch64" ]]; then
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
fi
- name: Install Packages (macOS)
if: runner.os == 'macOS'
run: brew install ninja
- name: Setup Python Environment
run: |
python3 -m venv ~/.venv
source ~/.venv/bin/activate
python3 -m pip install meson pytest cython>=3.*
echo "$HOME/.venv/bin/" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.BZLA_LIBS_KEY }}
submodules: 'recursive'
- name: Wrap
run: meson wrap install gtest
- name: Configure
run: ${{ matrix.env }} ./configure.py --prefix=${{ github.workspace }}/build/install ${{ matrix.config }}
- name: Build
id: build
run: |
ninja install
echo "build-dir=$(pwd)" >> $GITHUB_OUTPUT
working-directory: build
- name: Test
if: matrix.name != 'release-win64' && matrix.name != 'release-aarch64'
run: meson test --print-errorlogs
working-directory: build
- name: Examples
if: matrix.name != 'release-win64' && matrix.name != 'release-aarch64'
working-directory: examples
run: |
pkgconfigdir=$(find ${{ github.workspace }}/build/install/lib -name pkgconfig)
pythonlibdir=$(find ${{ github.workspace }}/build/install/lib -name site-packages)
meson setup build --pkg-config-path=$pkgconfigdir -Dpython_path=$pythonlibdir
cd build
meson test -v
- name: Create and add static package to latest and release
id: create-static-package
if: matrix.package-name && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
uses: ./.github/actions/add-package
with:
build-dir: ${{ steps.build.outputs.build-dir }}
package-name: ${{ matrix.package-name }}-static
# when using GITHUB_TOKEN, no further workflows are triggered
github-token-latest: ${{ secrets.GITHUB_TOKEN }}
github-token-release: ${{ secrets.GITHUB_TOKEN }}
|