Skip to content

Bump version to v0.3.4 #78

Bump version to v0.3.4

Bump version to v0.3.4 #78

Workflow file for this run

# We use `actions-rs` for most of our actions
#
# This file is for the main tests. clippy & rustfmt are separate workflows
on: [push, pull_request]
name: Cargo Test
env:
CARGO_TERM_COLOR: always
# has a history of occasional bugs (especially on old versions)
#
# the ci is free so we might as well use it ;)
CARGO_INCREMENTAL: 0
jobs:
test:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # Even if one job fails we still want to see the other ones
matrix:
rust:
# Minimum Supported Rust Version
#
# This is hardcoded and needs to be in sync with Cargo.toml and the README
#
# If one of the features does not support this MSRV,
# you need to remove this from the main list and manually add the desired
# feature/version combinations to 'include'
# This hack is not currently needed because serde-erased v0.3 supports our MSRV.
- 1.65
# Intermediate Releases (between MSRV and latest stable)
# Be careful not to add these needlessly; they hold up CI
- 1.80 # BinaryHeap::new becomes const
- 1.81 # core::error::Error
# The most recent version of stable rust (automatically updated)
- stable
- nightly
feature_flags:
- "--feature-powerset --exclude-features nightly"
include:
- rust: nightly
feature_flags: "--feature-powerset --features nightly --ignore-unknown-features"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache Cargo Registry
id: cache-index
uses: actions/cache@v4
with:
path:
# Before the sparse index, updating the registry took forever
~/.cargo/registry/index/
key: ${{ runner.os }}-cargo-${{ matrix.rust }}
restore-keys: |
${{ runner.os }}-cargo-
continue-on-error: false
- name: Pin MSRV-compatible versions
if: ${{ contains(matrix.rust, '1.') }}
env:
# this option is where the magic happens
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
run: |
rm -f Cargo.lock
cargo +stable update
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-nextest
- name: Test (${{ matrix.rust }}, ${{ matrix.feature_flags }}})
run: |
cargo hack ${{ matrix.feature_flags }} nextest run --no-tests=pass
clippy:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
# in hardcoded versions, warnings will fail the build
- 1.90
# in auto-updated versions, warnings will not fail the build
- stable
- nightly
feature_flags:
- "--feature-powerset --exclude-features nightly"
include:
- rust: nightly
feature_flags: "--feature-powerset --features nightly --ignore-unknown-features"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: Clippy (${{ matrix.rust }}, ${{ matrix.feature_flags }})
run: |
cargo hack ${{ matrix.feature_flags }} test
# When using hardcoded/pinned versions, warnings are forbidden.
#
# On automatically updated versions of rust (both stable & nightly) we allow clippy to fail.
# This is because automatic updates can introduce new lints or change existing lints.
#
# TODO: Instead do a conversion from clippy errors -> github actions errors
continue-on-error: ${{ !contains(matrix.rust, '1.') }}
docs:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
name: rustdoc (nightly)
env:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
- name: Docs
run: |
cargo doc --all-features