forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (96 loc) · 2.69 KB
/
build-test-rust.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
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
name: Build and test Rust
on:
pull_request:
paths:
- 'polars/**'
- '.github/workflows/build-test-rust.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Run cargo check
working-directory: examples
run: cargo check
features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-12-20
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: cargo install cargo-hack
- name: Run cargo hack
working-directory: polars
run: cargo hack check --each-feature --no-dev-deps --features private
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: polars
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-12-20
components: rustfmt, clippy, miri
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: polars
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run clippy
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run : |
cargo clippy --all-features \
-p polars-core \
-p polars-io \
-p polars-lazy \
-- -D warnings
cargo clippy -- -D warnings
- name: Run miri
run: |
cargo miri setup
cargo clean
make miri
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
defaults:
run:
working-directory: polars
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-12-20
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: polars
- name: Run tests
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: make test
- name: Run integration tests
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: make integration-tests