forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.94 KB
/
build-test.yaml
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
name: Build and test rust
on:
pull_request:
paths:
- 'polars/**'
jobs:
test-rust:
name: Build and test Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-01
override: true
components: rustfmt, clippy, miri
- name: Cache Cargo
uses: actions/cache@v2
with:
# these represent dependencies downloaded by cargo
# and thus do not depend on the OS, arch nor rust version.
path: /github/home/.cargo
key: cargo-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
with:
# these represent compiled steps of both dependencies and arrow
# and thus are specific for a particular OS, arch and rust version.
path: /github/home/target
key: ubuntu-x86-64-target-cache-nightly
- name: Install dependencies
run: |
cargo install cargo-hack
rm -f dprint-x86_64-unknown-linux-gnu.zip
- name: Run formatting checks
run: |
cargo fmt --all -- --check
- name: Run linting checks
run : |
# do not produce debug symbols to keep memory usage down
export RUSTFLAGS="-C debuginfo=0"
cd polars && cargo clippy -Z unstable-options --all-features \
-p polars-core \
-p polars-io \
-p polars-lazy \
-- -D warnings
cargo clippy -Z unstable-options -- -D warnings
- name: Feature test
run: |
cd polars && cargo hack check --each-feature --no-dev-deps --features private
- name: Run tests
run: |
export RUSTFLAGS="-C debuginfo=0"
cd polars && make test
- name: Run miri
run: |
cd polars
cargo miri setup
cargo clean
make miri