Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI speed. #255

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,15 @@ jobs:
- uses: actions/checkout@v4
- name: Install Z3
run: sudo apt-get install libz3-dev
- name: Build
run: cargo build -vv --all
- name: Run tests
run: cargo test --workspace
# XXX: Ubuntu's Z3 package seems to be missing some symbols, like
# `Z3_mk_pbeq`, leading to linker errors. Just ignore this, I guess, until
# we figure out how to work around it. At least we have the
# statically-linked Z3 tests below...
if: ${{ success() || failure() }}
- name: Run tests
run: cargo test -vv --all
# See above.
if: ${{ success() || failure() }}
- name: Run tests with `arbitrary-size-numeral` enabled
run: cargo test --manifest-path z3/Cargo.toml -vv --features arbitrary-size-numeral
run: cargo test --workspace --features arbitrary-size-numeral
# See above.
if: ${{ success() || failure() }}

Expand All @@ -61,7 +57,7 @@ jobs:
- name: Build z3-sys and z3 with statically linked Z3
run: |
source ~/emsdk/emsdk_env.sh
cargo build --target=wasm32-unknown-emscripten -vv --features static-link-z3
cargo build --target=wasm32-unknown-emscripten --features static-link-z3

build_z3_statically:
strategy:
Expand All @@ -88,12 +84,10 @@ jobs:
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'
- name: Build `z3-sys` and `z3` with statically linked Z3
run: cargo build -vv --features static-link-z3
- name: Test `z3-sys` and `z3` with statically linked Z3
run: cargo test -vv --features static-link-z3
run: cargo test --workspace --features static-link-z3
- name: Test `z3` with statically linked Z3 and `arbitrary-size-numeral` enabled
run: cargo test --manifest-path z3/Cargo.toml -vv --features 'static-link-z3 arbitrary-size-numeral'
run: cargo test --workspace --features 'static-link-z3 arbitrary-size-numeral'
build_with_vcpkg_installed_z3:
strategy:
matrix:
Expand Down Expand Up @@ -137,12 +131,10 @@ jobs:
extra-args: --clean-buildtrees-after-build
- name: Show default toolchain of rust.
run: rustup default
- name: Build `z3-sys` and `z3` with vcpkg installed Z3
run: cargo build -vv --features vcpkg
- name: Test `z3-sys` and `z3` with vcpkg installed Z3
run: cargo test -vv --features vcpkg
run: cargo test --workspace --features vcpkg
- name: Test `z3` with vcpkg installed Z3 and `arbitrary-size-numeral` enabled
run: cargo test --manifest-path z3/Cargo.toml -vv --features 'vcpkg arbitrary-size-numeral'
run: cargo test --workspace --features 'vcpkg arbitrary-size-numeral'

run_clippy:
runs-on: macos-latest
Expand All @@ -151,4 +143,4 @@ jobs:
- name: Install Z3
run: brew install z3
- name: Run clippy
run: cargo clippy -vv --workspace --all-targets
run: cargo clippy --workspace --all-targets