Import my shared audits #226
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: cargo fmt --check | |
- run: cargo clippy --all-targets | |
- uses: EmbarkStudios/cargo-deny-action@v2 | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker://asciidoctor/docker-asciidoctor | |
with: | |
args: asciidoctor -b manpage -a reproducible git-gone.1.adoc | |
# See https://mozilla.github.io/cargo-vet/configuring-ci.html | |
cargo-vet: | |
name: Vet Dependencies | |
runs-on: ubuntu-latest | |
env: | |
CARGO_VET_VERSION: "0.10.0" | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: rustup update stable && rustup default stable | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ runner.tool_cache }}/cargo-vet | |
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} | |
- name: Add the tool cache directory to the search path | |
run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH | |
- name: Ensure that the tool cache is populated with the cargo-vet binary | |
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet | |
- name: Invoke cargo-vet | |
run: cargo vet --locked | |
test: | |
strategy: | |
matrix: | |
target: | |
# Linux default | |
- x86_64-unknown-linux-gnu | |
# For statically linked release builds | |
- x86_64-unknown-linux-musl | |
# macOS | |
- x86_64-apple-darwin | |
# Windows | |
- x86_64-pc-windows-msvc | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
flags: --no-default-features | |
- target: x86_64-apple-darwin | |
os: macOS-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Install musl tools for musl target | |
- name: Install musl tools | |
run: sudo apt-get install musl-tools | |
if: contains(matrix.target, 'musl') | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- run: cargo build --all-targets --target ${{ matrix.target }} | |
- run: cargo test --target ${{ matrix.target }} |