-
Notifications
You must be signed in to change notification settings - Fork 57
68 lines (54 loc) · 1.78 KB
/
pull_request.yml
File metadata and controls
68 lines (54 loc) · 1.78 KB
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: Validate
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
Build:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
CLIPPY_LINTS: >-
-D warnings
-D clippy::cast-lossless
-D clippy::cast-possible-truncation
-D clippy::cast-possible-wrap
-D clippy::cast-precision-loss
-D clippy::cast-sign-loss
-D clippy::checked-conversions
-A non_local_definitions
-A clippy::upper-case-acronyms
-A clippy::uninlined-format-args
ROCKSDB_INCLUDE_DIR: /usr/local/include
ROCKSDB_LIB_DIR: /usr/local/lib
LD_LIBRARY_PATH: /usr/local/lib
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show Rust toolchain
run: rustup show
- name: Install Just command runner
uses: taiki-e/install-action@just
- name: Formatter
run: just fmt
- name: Install compilation system dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y g++-9 cmake libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev protobuf-compiler
- name: Compile and install RocksDB
run: |
git clone https://github.com/facebook/rocksdb.git
cd rocksdb
git checkout v10.2.1
make shared_lib
sudo make install-shared
- name: Clippy
run: just clippy
# Run cargo tests single threaded as concurrent tests could fail due to changes in the global ProtocolVersion
- name: Test
run: cargo test --all --verbose -- --test-threads=1
# This is used to ensure that Cargo.lock is up to date
- name: Check for unstaged files
run: git diff --exit-code