ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/.github/workflows/build.yml
dependabot[bot] ddcd502676 github: bump the github-dependencies group with 1 update
Bumps the github-dependencies group with 1 update: [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry).


Updates `abatilo/actions-poetry` from 2 to 3
- [Release notes](https://github.com/abatilo/actions-poetry/releases)
- [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc)
- [Commits](https://github.com/abatilo/actions-poetry/compare/v2...v3)

---
updated-dependencies:
- dependency-name: abatilo/actions-poetry
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 08:38:38 -08:00

134 lines
4 KiB
YAML

name: build
on:
push:
branches:
- main
pull_request:
permissions: read-all
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
cargo_flags: [""]
include:
- os: ubuntu-latest
cargo_flags: "--all-features"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Rust
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
with:
toolchain: 1.71
- 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@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
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@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
with:
toolchain: nightly
components: rustfmt
- run: cargo +nightly fmt --all -- --check
mkdocs:
name: Check that MkDocs can build the docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: latest
- name: Install dependencies
run: poetry install --no-root
- name: Check that `mkdocs` can build the docs
run: poetry run -- mkdocs build --strict
mkdocs-old-poetry:
name: Check that MkDocs can build the docs with Poetry 1.3.2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
# Test with the version of Poetry in Debian stable. If this starts
# failing, we should increase this version and document the minimum
# necessary version of Poetry in contributing.md.
#
# One way to install old `poetry` is using `pipx`:
# pipx install 'poetry<1.4' --suffix -1.3
poetry-version: 1.3.2
- name: Install dependencies
run: poetry install --no-root
- name: Check that `mkdocs` can build the docs
run: poetry run -- mkdocs build --strict
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@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: EmbarkStudios/cargo-deny-action@1e59595bed8fc55c969333d08d7817b36888f0c5
with:
command: check ${{ matrix.checks }}
clippy-check:
name: Clippy check
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
with:
toolchain: stable
components: clippy
- run: cargo +stable clippy --all-features --workspace --all-targets -- -D warnings