Skip to content

Commit 58edc5a

Browse files
committed
CI: Move tests to GH Actions, only perform needed releases test with the needed codegen options
1 parent 31cbdb3 commit 58edc5a

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

.github/workflows/weekly.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Weekly tests
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0' # Midnight of each sunday
5+
6+
jobs:
7+
tests:
8+
strategy:
9+
matrix:
10+
rust:
11+
- stable
12+
- nightly
13+
os:
14+
- ubuntu-latest
15+
- macos-latest
16+
- windows-latest
17+
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Checkout sources
21+
uses: actions/checkout@v2
22+
- name: Install toolchain
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
profile: minimal
26+
toolchain: ${{ matrix.rust }}
27+
override: true
28+
29+
- name: -C opt-level = 1
30+
- run: sh run_benches_release.sh opt-level=1
31+
32+
- name: -C opt-level = 2
33+
- run: sh run_benches_release.sh opt-level=2
34+
35+
- name: -C opt-level = 3
36+
- run: sh run_benches_release.sh opt-level=3
File renamed without changes.
File renamed without changes.

run_benches_release.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# stable
22
cargo clean;
33
mkdir bench-results;
4-
RUSTFLAGS="-C $1" cargo run --release --bin ct_benches --target $2 > bench-results/ct_benches.txt;
4+
RUSTFLAGS="-C $1" cargo run --release --bin ct_benches > bench-results/ct_benches.txt;
55
cargo test -- --nocapture;
66

77
# nightly
88
cargo clean;
99
mkdir bench-results;
10-
RUSTFLAGS="-C $1" cargo +nightly run --release --bin ct_benches --target $2 > bench-results/ct_benches.txt;
10+
RUSTFLAGS="-C $1" cargo +nightly run --release --bin ct_benches > bench-results/ct_benches.txt;
1111
cargo test -- --nocapture;

0 commit comments

Comments
 (0)