-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (75 loc) · 2.43 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
check-rs:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "check-linux"
- name: Check cargo fmt compliance
run: cargo fmt --all -- --check
- name: Check no rustc warnings
run: |
cd avenger && cargo check --tests && cd ..
cd avenger-vega && cargo check --tests && cd ..
cd avenger-wgpu && cargo check --tests && cd ..
cd avenger-vega-test-data && cargo check --tests && cd ..
- name: Check for clippy warnings
run: |
cd avenger && cargo clippy && cd ..
cd avenger-vega && cargo clippy && cd ..
cd avenger-wgpu && cargo clippy && cd ..
cd avenger-vega-test-data && cargo clippy && cd ..
- name: Build
run: |
cd avenger && cargo build && cd ..
cd avenger-vega && cargo build && cd ..
cd avenger-wgpu && cargo build && cd ..
cd avenger-vega-test-data && cargo build && cd ..
pushd examples/scatter-panning && cargo build && popd
pushd examples/wgpu-winit && cargo build && popd
# # Tests currently fail with `MakeWgpuAdapterError`
# - name: Run tests
# run: cargo test --verbose
# # Cleanup fails with: [__NSCFString bytes]: unrecognized selector sent to instance 0x600002fc62c0
# test-rs-macos:
# runs-on: macos-latest
# env:
# RUSTFLAGS: "-D warnings"
# steps:
# - name: Install Protoc
# uses: arduino/setup-protoc@v2
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/checkout@v3
# - name: Install latest stable toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - uses: Swatinem/rust-cache@v2
# with:
# prefix-key: "test-macos"
# - name: version
# run: rustc --version
# - name: test
# run: cd avenger-wgpu/ && cargo test -- --nocapture
# - name: Update images
# uses: actions/upload-artifact@v4
# with:
# name: images-macos
# path: avenger-wgpu/tests/output