Skip to content

Add a more memory efficient mapping for bool_to_int #19

Add a more memory efficient mapping for bool_to_int

Add a more memory efficient mapping for bool_to_int #19

Workflow file for this run

name: Build and test
on:
push:
branches: ["develop"]
pull_request:
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 --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
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 -- -D warnings