Skip to content

feat(occara): Implement Rust bindings for creating the OpenCASCADE bottle example #11

feat(occara): Implement Rust bindings for creating the OpenCASCADE bottle example

feat(occara): Implement Rust bindings for creating the OpenCASCADE bottle example #11

Workflow file for this run

name: Lint Rust Source
permissions:
contents: read
pull-requests: write
checks: write
on:
pull_request:
push:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
name: Check Rust Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run rustfmt
run: cargo fmt --all --check
lint:
name: Run Clippy
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache OpenCASCADE
uses: actions/cache@v4
with:
path: |
crates/opencascade-sys/occt_build
crates/opencascade-sys/occt_source
key: opencascade-${{ runner.os }}-${{ hashFiles('**/occt_commit_hash.lock') }}
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ runner.os }}-stable-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: "github-pr-review"
clippy_flags: "--workspace"
github_token: ${{ secrets.GITHUB_TOKEN }}