Fix the connection from FlatZinc to the linear propagator #37
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
name: Build and test | |
on: [push] | |
env: | |
RUST_CHANNEL: "stable" | |
RUST_TEST_CHANNEL: "nightly" | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] # TODO: Add windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --no-self-update ${{ env.RUST_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Build fzn-huub | |
run: cargo install --locked --root dist/ --path crates/fzn-huub | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fzn-huub-${{ matrix.os }} | |
path: dist/ | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --no-self-update ${{ env.RUST_TEST_CHANNEL }} | |
rustup default ${{ env.RUST_TEST_CHANNEL }} | |
- name: Install grcov | |
uses: SierraSoftworks/setup-grcov@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Run cargo test | |
run: cargo test --locked | |
env: | |
CARGO_INCREMENTAL: "0" | |
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" | |
RUSTDOCFLAGS: "-Cpanic=abort" | |
- name: Collect covereage data | |
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../**' --ignore '/*' -o ./lcov.info | |
- uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./lcov.info | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --component clippy --no-self-update ${{ env.RUST_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Run clippy | |
run: cargo clippy --tests -- -D warnings |