Skip to content

ci: enable rust and global lint builds on PRs (#43) #20

ci: enable rust and global lint builds on PRs (#43)

ci: enable rust and global lint builds on PRs (#43) #20

Workflow file for this run

name: Rust SDK
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
rust-version: [ '1.81', '1.70' ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust ${{ matrix.rust-version }}
run: rustup toolchain install ${{ matrix.rust-version }}
- name: Display Cargo version
run: cargo version
- name: Display rustc version
run: rustc --version
- run: cargo test
lint:
runs-on: ubuntu-24.04
strategy:
matrix:
rust-version: [ '1.81' ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust ${{ matrix.rust-version }}
run: rustup toolchain install ${{ matrix.rust-version }}
- name: Display Cargo version
run: cargo version
- name: Display rustc version
run: rustc --version
- run: cargo fmt
- run: git diff --exit-code