update readme for static bin by default #96
This file contains 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
on: [push, pull_request] | |
name: CI | |
jobs: | |
build: | |
strategy: | |
matrix: | |
name: [gcc] | |
include: | |
- name: gcc | |
env: CC=gcc CXX=g++ | |
name: ${{ matrix.name }} | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
bison \ | |
build-essential \ | |
clang \ | |
cmake \ | |
flex \ | |
gcc \ | |
git \ | |
libboost-all-dev \ | |
libboost-program-options-dev \ | |
libboost-serialization-dev \ | |
libgmp-dev \ | |
libmpfr-dev \ | |
ninja-build \ | |
python3 \ | |
python3-pip \ | |
python3-setuptools \ | |
zlib1g-dev | |
sudo pip3 install -U lit | |
- name: Check compiler version | |
run: | | |
g++ --version | |
gcc --version | |
- name: Dependencies | |
run: | | |
./scripts/deps/setup-staticdeps.sh | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake -DNOCRYPTOMINISAT:BOOL=OFF -DSTATICCOMPILE=ON -DENABLE_TESTING:BOOL=OFF -DPYTHON_EXECUTABLE:PATH="$(which python3)" .. | |
- name: Build | |
run: cmake --build . --parallel "$(nproc)" | |
working-directory: build | |
- name: Run CSB | |
run: | | |
output=$(./csb -c ../examples/bench_1059.smt2) | |
echo "$output" | |
echo "$output" | grep -q "s mc 483328" || { echo "Not expected count found!"; exit 1; } | |
working-directory: build | |
# Upload the binary as a build artifact | |
- name: Upload Binary Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: csb | |
path: build/csb | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout repository | |
- uses: actions/checkout@v2 | |
# Download the binary artifacts | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: csb | |
path: build/ | |
# Create a release and upload binaries | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: "Release v${{ github.run_number }}" | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: build/csb | |
asset_name: csb | |
asset_content_type: application/octet-stream | |
# - name: Test | |
# run: ctest --parallel "$(nproc)" -VV --output-on-failure | |
# working-directory: build | |
# EOF |