-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable test coverage details and enable dependabot
- Loading branch information
Showing
3 changed files
with
88 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Check Format | ||
|
||
on: | ||
pull_request: | ||
branches-ignore: ["dependabot/**"] | ||
|
||
env: | ||
# Lets us format with unstable rustfmt options | ||
RUST_CHANNEL: nightly | ||
|
||
jobs: | ||
check_format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Check formatting of Rust files | ||
- name: Install Rust toolchain | ||
run: | | ||
rustup toolchain install --profile minimal --component rustfmt --no-self-update ${{ env.RUST_CHANNEL }} | ||
rustup default ${{ env.RUST_CHANNEL }} | ||
- name: Run cargo format | ||
run: cargo +nightly fmt --all --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,74 @@ | ||
name: Rust | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches: ["develop"] | ||
branches: | ||
- "develop" | ||
pull_request: | ||
branches: ["develop"] | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_CHANNEL: stable | ||
# Lets us format with unstable rustfmt options | ||
RUST_FMT_CHANNEL: nightly | ||
RUST_CHANNEL: "stable" | ||
RUST_COV_CHANNEL: "nightly" | ||
|
||
jobs: | ||
test-covereage: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install Rust toolchain | ||
uses: moonrepo/setup-rust@v0 | ||
with: | ||
cache: false | ||
channel: ${{ env.RUST_COV_CHANNEL }} | ||
- name: Install grcov | ||
uses: SierraSoftworks/setup-grcov@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- 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 | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
os: [windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- 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/sccache-action@v0.0.5 | ||
- name: Run cargo test | ||
run: cargo test --features splr,cadical,kissat,intel-sat,ipasir-up | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: moonrepo/setup-rust@v0 | ||
with: | ||
cache: false | ||
channel: ${{ env.RUST_COV_CHANNEL }} | ||
- name: Run cargo test | ||
run: cargo test -p pindakaas --features splr,cadical,ipasir-up | ||
run: cargo test -p pindakaas --features splr,cadical,ipasir-up,trace | ||
if: matrix.os == 'windows-latest' | ||
- name: Run cargo test | ||
run: cargo test --all-features | ||
if: matrix.os != 'windows-latest' | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain and clippy | ||
uses: moonrepo/setup-rust@v0 | ||
with: | ||
submodules: true | ||
- 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/sccache-action@v0.0.5 | ||
channel: ${{ env.RUST_CHANNEL }} | ||
components: clippy | ||
- name: Run clippy | ||
run: cargo clippy --tests --features splr,cadical,kissat,intel-sat,ipasir-up -- -D warnings | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install Rust toolchain | ||
run: | | ||
rustup toolchain install --profile minimal --component rustfmt --no-self-update ${{ env.RUST_FMT_CHANNEL }} | ||
rustup default ${{ env.RUST_CHANNEL }} | ||
- name: Run cargo format | ||
run: cargo +nightly fmt --all --check | ||
run: cargo clippy --tests -- -D warnings | ||
- name: Run clippy with all features | ||
run: cargo clippy --tests --all-features -- -D warnings |