-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (50 loc) · 1.53 KB
/
build-test-format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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.73
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: Check formatting
run: dotnet format --verify-no-changes
- name: Build
run: dotnet build --no-restore -warnaserror
- name: Test
run: dotnet test --filter FullyQualifiedName!~IntegrationTests --no-build --verbosity normal