-
Notifications
You must be signed in to change notification settings - Fork 146
153 lines (131 loc) · 4.41 KB
/
tpcds-reusable.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: TPC-DS Reusable
on:
workflow_call:
inputs:
sparkver:
required: true
type: string
sparkurl:
required: true
type: string
jobs:
build-validator:
name: Build Validator
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v4
id: cache-tpcds-validator
with:
key: tpcds-validator
path: target/tpcds-validator_2.12-0.1.0-SNAPSHOT-with-dependencies.jar
- uses: actions/checkout@v4
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
with:
repository: blaze-init/tpcds-validator
- uses: actions/setup-java@v4
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
with:
distribution: 'adopt-hotspot'
java-version: '8'
cache: 'maven'
- name: Build
if: steps.cache-tpcds-validator.outputs.cache-hit != 'true'
run: mvn package -DskipTests
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: tpcds-validator-${{ inputs.sparkver }}
path: target/tpcds-validator_2.12-0.1.0-SNAPSHOT-with-dependencies.jar
overwrite: true
build-blaze-jar:
name: Build Blaze JAR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt-hotspot'
java-version: '8'
cache: 'maven'
- uses: arduino/setup-protoc@v2
with: {version: "21.7"}
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
rustflags: --allow warnings -C target-feature=+aes
components:
cargo
rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- name: Cargo test
run: cargo +nightly test --workspace --all-features
- name: Build ${{ inputs.sparkver }}
run: mvn package -Ppre -P${{ inputs.sparkver }}
- name: Upload ${{ inputs.sparkver }}
uses: actions/upload-artifact@v4
with:
name: blaze-engine-${{ inputs.sparkver }}
path: target/blaze-engine-${{ inputs.sparkver }}-pre-*-SNAPSHOT.jar
overwrite: true
run-tpcds-test:
name: Run TPC-DS test ${{ matrix.query }}
needs: [build-validator, build-blaze-jar]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
query: [
q1,q2,q3,q4,q5,q6,q7,q8,q9,
q10,q11,q12,q13,q14a,q14b,q15,q16,q17,q18,q19,
q20,q21,q22,q23a,q23b,q24a,q24b,q25,q26,q27,q28,q29,
q31,q33,q34,q35,q36,q37,q38,q39a,q39b,
q40,q41,q42,q43,q44,q45,q46,q47,q48,q49,
q50,q51,q52,q53,q54,q55,q56,q57,q58,q59,
q60,q61,q62,q63,q64,q65,q66,q67,q68,q69,
q70,q71,q72,q73,q74,q75,q76,q77,q78,q79,
q80,q81,q82,q83,q84,q85,q86,q87,q88,q89,
q90,q91,q92,q93,q94,q95,q96,q97,q98,q99
]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-spark-bin
with:
path: spark-bin-${{ inputs.sparkver }}
key: spark-bin-${{ inputs.sparkver }}
- name: Setup ${{ inputs.sparkver }}
id: setup-spark-bin
if: steps.cache-spark-bin.outputs.cache-hit != 'true'
run: |
wget -c ${{ inputs.sparkurl }}
mkdir -p spark-bin-${{ inputs.sparkver }}
cd spark-bin-${{ inputs.sparkver }} && tar -xf ../spark-*.tgz --strip-component=1
- uses: actions/download-artifact@v4
with:
name: blaze-engine-${{ inputs.sparkver }}
- uses: actions/download-artifact@v4
with:
name: tpcds-validator-${{ inputs.sparkver }}
- name: Checkout TPC-DS Data
uses: actions/checkout@v4
with:
repository: blaze-init/tpcds_1g
path: dev/tpcds_1g
- name: Install Blaze JAR
run: |
ls -la
cp blaze-engine-*${{ inputs.sparkver }}*.jar spark-bin-${{ inputs.sparkver }}/jars/
- uses: actions/setup-java@v4
with:
distribution: 'adopt-hotspot'
java-version: '8'
cache: 'maven'
- name: Run
run: |
ls -la
export RUST_LOG=ERROR
export RUST_BACKTRACE=1
SPARK_HOME=spark-bin-${{ inputs.sparkver }} dev/run-tpcds-test \
--data-location dev/tpcds_1g \
--query-filter ${{ matrix.query }}