-
Notifications
You must be signed in to change notification settings - Fork 214
118 lines (113 loc) · 4.3 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
env:
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: v20220409
PROTOC_NO_VENDOR: 1
jobs:
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- uses: taiki-e/install-action@nextest
- name: Test
run: cargo nextest run --workspace --no-fail-fast --all-features --locked
- name: Doctest
run: cargo test --doc --workspace --no-fail-fast --all-features --locked
tpch-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- name: Generate TPC-H 1GB dataset
run: |
rm -rf risinglight.db
make tpch
- name: Build RisingLight (in release mode)
run: |
cargo build --release
- name: Run TPC-H Test
run: |
./target/release/risinglight -f tests/sql/tpch/create.sql
./target/release/risinglight -f tests/sql/tpch/import.sql
./target/release/risinglight -f tests/sql/tpch-full/_q1.slt
./target/release/risinglight -f tests/sql/tpch-full/_q2.slt
./target/release/risinglight -f tests/sql/tpch-full/_q3.slt
./target/release/risinglight -f tests/sql/tpch-full/_q4.slt
./target/release/risinglight -f tests/sql/tpch-full/_q5.slt
./target/release/risinglight -f tests/sql/tpch-full/_q6.slt
./target/release/risinglight -f tests/sql/tpch-full/_q7.slt
./target/release/risinglight -f tests/sql/tpch-full/_q8.slt
./target/release/risinglight -f tests/sql/tpch-full/_q9.slt
./target/release/risinglight -f tests/sql/tpch-full/_q10.slt
./target/release/risinglight -f tests/sql/tpch-full/_q11.slt
./target/release/risinglight -f tests/sql/tpch-full/_q12.slt
./target/release/risinglight -f tests/sql/tpch-full/_q13.slt
./target/release/risinglight -f tests/sql/tpch-full/_q14.slt
./target/release/risinglight -f tests/sql/tpch-full/_q15.slt
./target/release/risinglight -f tests/sql/tpch-full/_q16.slt
./target/release/risinglight -f tests/sql/tpch-full/_q17.slt
./target/release/risinglight -f tests/sql/tpch-full/_q18.slt
./target/release/risinglight -f tests/sql/tpch-full/_q19.slt
# FIXME: sqllogictest says the query result is mismatch, but it is actually correct
# ./target/release/risinglight -f tests/sql/tpch-full/_q20.slt
# FIXME: q21 runs out of memory
# ./target/release/risinglight -f tests/sql/tpch-full/_q21.slt
./target/release/risinglight -f tests/sql/tpch-full/_q22.slt