-
Notifications
You must be signed in to change notification settings - Fork 8
153 lines (141 loc) · 4.39 KB
/
ci.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: congee
on:
push:
branches:
- main
- tiered
pull_request:
branches: [ main ]
schedule:
- cron: '0 10 * * 3'
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
name: Check
with:
command: clippy
args: --all-features -- -D warnings
fmt:
needs: check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
name: Format check
test_sans:
needs: fmt
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: nightly
override: true
components: rust-src
- run: sudo apt install llvm-dev
- run: cargo test
- run: >
env ASAN_OPTIONS="detect_odr_violation=0" RUSTFLAGS="-Z sanitizer=address"
cargo test -Zbuild-std --target x86_64-unknown-linux-gnu --tests
- run: >
env RUSTFLAGS="-Z sanitizer=memory"
cargo test -Zbuild-std --target x86_64-unknown-linux-gnu --tests
shuttle:
needs: test_sans
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: nightly
override: true
components: rust-src
- run: cargo test --features "shuttle" shuttle_concurrent_insert_read --release -- --nocapture
- run: cargo test --features "shuttle" shuttle_insert_only --release -- --nocapture
benchmark:
needs: shuttle
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: stable
override: true
components: rust-src
- run: env SHUMAI_FILTER="basic-basic-.*-ART" SHUMAI_THREAD=4 cargo bench --bench basic
- uses: actions/upload-artifact@v3
with:
name: shumai-results
path: target/benchmark/**/*.json
- run: python3 .github/workflows/shumai_converter.py
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'Congee basic op performance'
# What benchmark tool the output.txt came from
tool: 'customBiggerIsBetter'
# Where the output from the benchmark tool is stored
output-file-path: output.json
# Workflow will fail when an alert happens
fail-on-alert: true
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
fuzzing:
needs: fmt
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
name: Setup toolchain
with:
toolchain: nightly
override: true
components: rust-src, llvm-tools-preview
- run: cargo install cargo-fuzz
- run: cargo install cargo-binutils
- run: |
cd fuzz
git clone --depth 1 https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/XiangpengHao/congee-fuzzing.git
mv congee-fuzzing/* .
- run: |
cd fuzz
cargo fuzz run btree_check --release --debug-assertions -s address -- -max_len=655350 -runs=0
# Seems to be a bug from cargo-fuzz: https://github.com/rust-fuzz/cargo-fuzz/issues/320
# - run: |
# cd fuzz
# cargo fuzz coverage btree_check corpus/btree_check
# cargo cov -- export target/x86_64-unknown-linux-gnu/release/btree_check --instr-profile=coverage/btree_check/coverage.profdata -ignore-filename-regex=".cargo" -format="lcov" > coverage.txt
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v2
# with:
# files: ./fuzz/coverage.txt
# flags: fuzzing