Skip to content

bump clap 3 -> 4

bump clap 3 -> 4 #165

Workflow file for this run

name: Rust
on:
push:
branches:
- master
- stable
pull_request:
branches:
- master
- stable
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
rust: [ stable, beta, nightly ]
include:
- rust: nightly
check_cfg: '-Zcheck-cfg'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust toolchain
run: |
rustup toolchain install --no-self-update --profile minimal ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
# Add a big endian target so we can check that everything at least
# compiles on big endian.
rustup target add --toolchain ${{ matrix.rust }} powerpc64-unknown-linux-gnu
- name: Build
run: cargo build --verbose --all ${{ matrix.check_cfg }}
- name: Run tests
run: cargo test --verbose --all ${{ matrix.check_cfg }}
- name: Docs
run: cargo doc --verbose --no-deps
- name: Check big endian
run: cargo check --target powerpc64-unknown-linux-gnu --verbose --all
success:
needs:
- build
runs-on: ubuntu-latest
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'