Skip to content

Rust - CI

Rust - CI #5

Workflow file for this run

name: Rust - CI
on:
push:
paths:
- 'runtime/rust/**'
- '!**/*.md'
branches:
- 'develop'
- 'main'
- 'release/**'
pull_request:
paths:
- 'runtime/rust/**'
- '!**/*.md'
branches:
- 'develop'
- 'main'
- 'release/**'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Initialize rust
run: |
rustup --version
- name: Initialize cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: |
cd runtime/rust
cargo build --release --all-features
- name: Test
run: |
cd runtime/rust
cargo test --all-features
- name: Lint and format
run: |
cd runtime/rust
cargo clippy --all-features -- -D warnings
cargo fmt --all -- --check