Skip to content

feat: impl Sum and Product for Int and Real #1016

feat: impl Sum and Product for Int and Real

feat: impl Sum and Product for Int and Real #1016

Workflow file for this run

name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_INCREMENTAL: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUSTFLAGS: "-D warnings"
EMSCRIPTEN_VERSION: "latest"
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt -- --check
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Z3 (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libz3-dev
- name: Install Z3 (macOS)
if: matrix.os == 'macos-latest'
run: brew install z3
- name: Run tests
run: cargo test --workspace
build_on_wasm:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install emscripten
run: |
cd ~
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
source ./emsdk_env.sh
- name: Install wasm32-unknown-emscripten target
run: rustup target add wasm32-unknown-emscripten
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Build z3-sys and z3 with bundled Z3
run: |
source ~/emsdk/emsdk_env.sh
cargo build --target=wasm32-unknown-emscripten --features bundled
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
_EM_CCACHE: "true"
EM_COMPILER_WRAPPER: "sccache"
build_with_bundled_z3:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
build: [linux, macos, windows]
include:
- build: linux
os: ubuntu-latest
- build: macos
os: macos-latest
- build: windows
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@v2
if: matrix.os == 'windows-latest'
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Test `z3-sys` and `z3` with bundled linked Z3
run: cargo test --workspace --features bundled
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CMAKE_C_COMPILER_LAUNCHER: "sccache"
CMAKE_CXX_COMPILER_LAUNCHER: "sccache"
build_with_vcpkg_installed_z3:
strategy:
matrix:
build: [linux, macos, windows]
include:
- build: linux
os: ubuntu-latest
vcpkg_triplet: x64-linux
- build: macos
os: macos-latest
vcpkg_triplet: arm64-osx
- build: windows
os: windows-latest
vcpkg_triplet: x64-windows-static-md
runs-on: ${{ matrix.os }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@v2
if: matrix.os == 'windows-latest'
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'
- run: echo Instaling z3:${{ matrix.vcpkg_triplet }} on ${{ matrix.os }}.
- name: vcpkg build z3
uses: johnwason/vcpkg-action@v7
id: vcpkg
with:
pkgs: z3
triplet: ${{ matrix.vcpkg_triplet }}
cache-key: ${{ matrix.os }}
revision: master
token: ${{ github.token }}
extra-args: --clean-buildtrees-after-build
- name: Show default toolchain of rust.
run: rustup default
- name: Test `z3-sys` and `z3` with vcpkg installed Z3
run: cargo test --workspace --features vcpkg
run_clippy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Z3
run: brew install z3
- name: Run clippy
run: cargo clippy --workspace --all-targets
build_with_gh_release_z3:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
build: [linux, macos, windows]
include:
- build: linux
os: ubuntu-latest
- build: macos
os: macos-latest
- build: windows
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Test `z3-sys` and `z3` with gh-release linked Z3
run: cargo test --workspace --features gh-release
env:
READ_ONLY_GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_TOKEN }}