Skip to content

changelog

changelog #976

Workflow file for this run

on: [push, pull_request]
name: ci
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- run: cargo fmt -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: system dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- run: cargo clippy --locked --all-features
build-gnu:
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: system dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler gcc-aarch64-linux-gnu
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}
- run: cargo test
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
- run: cargo xtask --help
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
build-musl:
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
runs-on: ubuntu-latest
container:
image: rust:alpine
volumes:
- /usr/local/cargo/registry
steps:
- name: system dependencies
run: apk add --no-cache tar musl-dev lld protoc bash clang llvm make perl
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }}
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
- run: cargo run -p xtask --target ${{ matrix.target }} -- --help
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
build-apple:
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
runs-on: macos-latest
env:
SELECT_XCODE: /Applications/Xcode_15.3.app
steps:
- name: xcode
run: sudo xcode-select -s "${SELECT_XCODE}"
- name: protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}
- run: cargo test
if: ${{ matrix.target == 'x86_64-apple-darwin' }}
- run: cargo xtask --help
if: ${{ matrix.target == 'x86_64-apple-darwin' }}