Skip to content

PR Test for CI

PR Test for CI #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
nightly: nightly-2024-12-01
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@protoc
- run: ci/free-device-space.sh
- run: ci/ubuntu-setup-lld.sh
if: startsWith(matrix.os, 'ubuntu')
- run: ci/ubuntu-install-dependencies.sh
if: startsWith(matrix.os, 'ubuntu')
- run: cargo build
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@protoc
- run: ci/free-device-space.sh
- run: ci/ubuntu-setup-lld.sh
if: startsWith(matrix.os, 'ubuntu')
- run: ci/ubuntu-install-dependencies.sh
if: startsWith(matrix.os, 'ubuntu')
- run: cargo test --all-features
fmt:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.nightly }}
components: rustfmt
- run: cargo fmt --all --check
- name: Format YAML
run: npx -y prettier -c $(git ls-files '*.yml') || (echo "::warning::Please run \`prettier -l -w \$(git ls-files '*.yml')\` to fix format" && exit 1)
if: always()
clippy:
name: Clippy
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@protoc
- run: ci/ubuntu-install-dependencies.sh
- name: Run clippy
run: cargo clippy --all-features --all-targets