File tree 2 files changed +38
-2
lines changed
2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 90
90
- name : Run unit tests
91
91
run : cargo test --all
92
92
93
-
94
93
test_benchmarks :
95
94
strategy :
96
95
matrix :
@@ -149,6 +148,40 @@ jobs:
149
148
PROFILES : ${{ matrix.PROFILES }}
150
149
SHELL : " /bin/bash"
151
150
151
+ test_backends :
152
+ name : Test codegen backend benchmarks
153
+ runs-on : ubuntu-latest
154
+ steps :
155
+ - name : Checkout the source code
156
+ uses : actions/checkout@v2
157
+ with :
158
+ fetch-depth : 1
159
+
160
+ - name : Install latest beta
161
+ uses : actions-rs/toolchain@v1
162
+ with :
163
+ toolchain : beta
164
+ override : true
165
+
166
+ - name : Configure environment
167
+ run : |
168
+ sudo apt-get update
169
+ sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
170
+ echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
171
+
172
+ - uses : Swatinem/rust-cache@v2
173
+
174
+ - name : Build collector
175
+ run : cargo build -p collector
176
+
177
+ - name : Check compile benchmarks
178
+ run : sh -x -c "ci/check-compile-benchmarks.sh"
179
+ env :
180
+ BENCH_INCLUDE_EXCLUDE_OPTS : " --include helloworld"
181
+ PROFILES : Debug,Opt
182
+ BACKENDS : Cranelift
183
+ SHELL : " /bin/bash"
184
+
152
185
test_runtime_benchmarks :
153
186
name : Test runtime benchmarks
154
187
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ bash -c "while true; do sleep 30; echo \$(date) - running ...; done" &
6
6
PING_LOOP_PID=$!
7
7
trap ' kill $PING_LOOP_PID' ERR 1 2 3 6
8
8
9
+ BACKENDS=${BACKENDS:- Llvm}
10
+
9
11
# Install a toolchain.
10
12
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
11
- bindir=` cargo run -p collector --bin collector install_next`
13
+ bindir=` cargo run -p collector --bin collector install_next --backends ${BACKENDS} `
12
14
13
15
# Do some benchmarking.
14
16
RUST_BACKTRACE=1 \
@@ -21,6 +23,7 @@ RUST_BACKTRACE=1 \
21
23
--profiles $PROFILES \
22
24
--cargo $bindir /cargo \
23
25
--scenarios All \
26
+ --backends $BACKENDS \
24
27
--rustdoc $bindir /rustdoc \
25
28
$BENCH_INCLUDE_EXCLUDE_OPTS
26
29
You can’t perform that action at this time.
0 commit comments