-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 940 Bytes
/
server.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
name: server CI
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- '.github/workflows/*'
- 'server/**'
- 'proto/**'
env:
PROTOC_VERSION: '29.3'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
workspaces: 'server -> target'
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: |
PROTOC_ZIP="protoc-$PROTOC_VERSION-linux-x86_64.zip"
curl -fvLO \
"https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP"
sudo unzip -o "$PROTOC_ZIP" -d /usr/local bin/protoc
sudo unzip -o "$PROTOC_ZIP" -d /usr/local 'include/*'
rm "$PROTOC_ZIP"
- run: |
cd server
cargo build
cargo fmt --all -- --check
cargo clippy -- -D warnings