ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/.github/workflows/build.yml
dependabot[bot] 1a490cc170 github: bump actions/checkout from 3.5.1 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](83b7061638...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 16:11:24 +00:00

95 lines
2.7 KiB
YAML

name: build
on:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust_version: [stable]
cargo_flags: [""]
include:
- os: ubuntu-latest
rust_version: "1.64"
cargo_flags: ""
- os: ubuntu-latest
rust_version: stable
cargo_flags: "--all-features"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install Rust (${{ matrix.rust_version }})
uses: dtolnay/rust-toolchain@52e69531e6f69a396bc9d1226284493a5db969ff
with:
toolchain: ${{ matrix.rust_version }}
- name: Build
run: cargo build --workspace --all-targets --verbose ${{ matrix.cargo_flags }}
- name: Test
run: cargo test --workspace --all-targets --verbose ${{ matrix.cargo_flags }}
env:
RUST_BACKTRACE: 1
check-protos:
name: Check protos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dtolnay/rust-toolchain@52e69531e6f69a396bc9d1226284493a5db969ff
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dtolnay/rust-toolchain@52e69531e6f69a396bc9d1226284493a5db969ff
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: EmbarkStudios/cargo-deny-action@e0a440755b184aa50374330fa75cca0f84fcb59a
with:
command: check ${{ matrix.checks }}
clippy-check:
name: Clippy check
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dtolnay/rust-toolchain@52e69531e6f69a396bc9d1226284493a5db969ff
with:
toolchain: stable
components: clippy
- run: cargo clippy --all-features --workspace --all-targets -- -D warnings