Update Rust crate globset to 0.4.13 #298
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- name: Lint (clippy) | |
run: cargo clippy --all-features --all-targets | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: Clippy feature powerset for target-spec | |
run: cargo hack --feature-powerset --package target-spec clippy | |
- name: Lint (rustfmt) | |
run: cargo xfmt --check | |
- name: Install cargo readme | |
uses: baptiste0928/cargo-install@2cfb0024938d23011106cbf127b393bc83fddba1 # v1 | |
with: | |
crate: cargo-readme | |
- name: Run cargo readme | |
run: ./scripts/regenerate-readmes.sh | |
- name: Check for differences | |
run: git diff --exit-code | |
build: | |
name: Build and test core crates | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
rust-version: [ 1.66, stable ] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
# Build all packages we care about one by one to ensure feature unification | |
# doesn't happen. | |
# Build all targets to ensure examples are built as well. | |
- name: Build target-spec | |
run: cargo build --all-targets --package target-spec | |
- name: Build guppy-summaries | |
run: cargo build --all-targets --package guppy-summaries | |
- name: Build guppy | |
run: cargo build --all-targets --package guppy | |
- name: Build determinator | |
run: cargo build --all-targets --package determinator | |
- name: Build hakari | |
run: cargo build --all-targets --package hakari | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Run tests for core crates | |
run: cargo nextest run --package target-spec --package guppy-summaries --package guppy --package determinator --package hakari | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: Check feature powerset for target-spec | |
run: cargo hack --feature-powerset --package target-spec nextest run | |
build-all-features: | |
name: Build and test (all features) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
rust-version: [ 1.66, stable ] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- name: Build | |
# Build all targets to ensure examples are built as well. | |
# Exclude cargo-compare so that it only runs on the cfg-expr version below. | |
run: cargo test --no-run --all-targets --all-features --workspace --exclude cargo-compare | |
- name: Run doctests | |
run: cargo test --doc --all-features --workspace --exclude cargo-compare | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Run all other tests | |
run: cargo nextest run --all-targets --all-features --workspace --exclude cargo-compare | |
build-rustdoc: | |
name: Build documentation | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
fail-fast: false | |
env: | |
RUSTDOCFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: dtolnay/rust-toolchain@stable | |
# Note: caching doesn't appear to work for rustdoc as of 2022-12-04, and we're exceeding cache | |
# sizes anyway | |
- name: Build rustdoc | |
# cargo-compare currently pulls in cargo which bloats build times massively | |
run: cargo doc --all-features --workspace --exclude cargo-compare | |
test-extended: | |
name: cargo-compare extended tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Don't run cargo-compare tests on Windows for now. See | |
# https://github.com/facebookincubator/cargo-guppy/issues/265. | |
os: [ ubuntu-latest, macos-latest ] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
PROPTEST_MULTIPLIER: 64 | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
# This matches the cfg-expr version. | |
- uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- name: Build and test | |
run: cargo test --package cargo-compare --release | |
aarch64-build: | |
runs-on: ubuntu-latest | |
name: Cross-compile to aarch64 | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-unknown-linux-gnu | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | |
- name: Build | |
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 | |
with: | |
use-cross: true | |
command: build | |
# * Exclude cargo-compare because it depends on cargo, which in turn | |
# depends on openssl, and getting *that* to cross-compile is a | |
# headache. | |
# * Build all targets to ensure examples are built as well. | |
args: --target aarch64-unknown-linux-gnu --workspace --exclude cargo-compare --all-targets | |
# TODO: run tests somehow? possibly through cross/qemu |