name: rust-next
permissions:
contents: read
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }}, ${{ matrix.rust }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, beta]
include:
- os: ubuntu-latest
rust: nightly
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
env:
CARGO_PROFILE_DEV_DEBUG: line-tables-only
steps:
- uses: actions/checkout@v6
- name: Install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Build
run: cargo test --workspace --no-run
- name: Test each feature combination
run: cargo hack test --each-feature --workspace
latest:
name: Check latest dependencies
runs-on: ubuntu-latest
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: allow
CARGO_PROFILE_DEV_DEBUG: line-tables-only
steps:
- uses: actions/checkout@v6
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Update dependencies to latest versions
run: cargo update
- name: Build
run: cargo test --workspace --no-run
- name: Test each feature combination
run: cargo hack test --each-feature --workspace