-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (63 loc) · 1.74 KB
/
pr.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
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Rust
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
schedule:
- cron: '0 3 * * 0' # Every sunday at 3am UTC.
env:
CARGO_TERM_COLOR: always
jobs:
build:
continue-on-error: true
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
# - macos-latest -- Disable as LSM tests are failing on macOS ARM64, due to unsigned 64bits integer overflow.
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download and configure dependencies
id: configure
shell: pwsh
run: .github/scripts/setup.ps1 -Runner ${{ matrix.os }}
- name: Update system path
shell: pwsh
run: |
"${{ steps.configure.outputs.protoc_bin }}" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Build
run: cargo check --all-targets
- name: Run tests
run: cargo test --all-targets
linting:
needs: build
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download and configure dependencies
id: configure
shell: pwsh
run: .github/scripts/setup.ps1 -Runner ${{ matrix.os }}
- name: Update system path
shell: pwsh
run: |
"${{ steps.configure.outputs.protoc_bin }}" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Install tools
run: |
rustup component add clippy
rustup component add rustfmt
- name: Lint
run: cargo clippy --all-features -- -D warnings
- name: Format
run: cargo fmt -- --check