Skip to content

Fix build warnings #288

Fix build warnings

Fix build warnings #288

name: Build, test and format
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
RUST_FMT: nightly-2023-04-01-x86_64-unknown-linux-gnu
RUST_CLIPPY: 1.68
jobs:
rustfmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Format Rust Project
run: |
rustup default ${{ env.RUST_FMT }}
rustup component add rustfmt
cargo fmt --manifest-path=./rust-bindings/Cargo.toml --all --check
rustclippy-build-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Rust
run: |
rustup default ${{ env.RUST_CLIPPY }}
rustup component add clippy
- name: Clippy Rust Project
run: cargo clippy --manifest-path=./rust-bindings/Cargo.toml --tests --release -- --no-deps
- name: Build Rust Project
run: cargo build --manifest-path=./rust-bindings/Cargo.toml --release
- name: Test Rust Project
run: cargo test --manifest-path=./rust-bindings/Cargo.toml --release
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --filter FullyQualifiedName!~IntegrationTests --no-build --verbosity normal
- name: Check formatting
run: dotnet format --verify-no-changes