mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-03 18:24:19 +00:00
bd5cbbdbaa
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from ce8f65846d7180d2ce63b1e74483d981800b9e22 to c758e63728211bd4acda6501cfa2a16c5c751fc4.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](ce8f65846d...c758e63728
)
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
98 lines
2.7 KiB
YAML
98 lines
2.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build: [linux, linux-msrv, macos, win]
|
|
include:
|
|
- build: linux
|
|
os: ubuntu-latest
|
|
rust_version: stable
|
|
- build: linux-msrv
|
|
os: ubuntu-latest
|
|
rust_version: "1.61"
|
|
- build: macos
|
|
os: macos-latest
|
|
rust_version: stable
|
|
- build: win
|
|
os: windows-latest
|
|
rust_version: stable
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- name: Install Rust (${{ matrix.rust_version }})
|
|
uses: dtolnay/rust-toolchain@c758e63728211bd4acda6501cfa2a16c5c751fc4
|
|
with:
|
|
toolchain: ${{ matrix.rust_version }}
|
|
- name: Build
|
|
run: cargo build --workspace --all-targets --verbose
|
|
- name: Test
|
|
run: cargo test --workspace --all-targets --verbose
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
check-protos:
|
|
name: Check protos
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- uses: dtolnay/rust-toolchain@c758e63728211bd4acda6501cfa2a16c5c751fc4
|
|
with:
|
|
toolchain: stable
|
|
- run: sudo apt update && sudo apt-get -y install protobuf-compiler
|
|
- name: Generate Rust code from .proto files
|
|
run: cargo run -p gen-protos
|
|
- name: Check for uncommitted changes
|
|
run: git diff --exit-code
|
|
|
|
rustfmt:
|
|
name: Check formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- uses: dtolnay/rust-toolchain@c758e63728211bd4acda6501cfa2a16c5c751fc4
|
|
with:
|
|
toolchain: nightly
|
|
components: rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
|
|
cargo-deny:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- advisories
|
|
- bans licenses sources
|
|
|
|
# Prevent sudden announcement of a new advisory from failing ci:
|
|
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- uses: EmbarkStudios/cargo-deny-action@8a8607bd8e2b3a514d5a40174cc7c55b229d9ba7
|
|
with:
|
|
command: check ${{ matrix.checks }}
|
|
|
|
clippy-check:
|
|
name: Clippy check
|
|
permissions:
|
|
checks: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- uses: dtolnay/rust-toolchain@c758e63728211bd4acda6501cfa2a16c5c751fc4
|
|
with:
|
|
toolchain: stable
|
|
components: clippy
|
|
- run: cargo clippy --all-features --workspace --all-targets -- -D warnings
|