|
1 | | -name: build_master |
| 1 | +name: Release |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: [ master ] |
6 | 6 | pull_request: |
7 | 7 | branches: [ master ] |
8 | 8 |
|
| 9 | +# Cancel any in-flight jobs for the same PR/branch so there's only one active |
| 10 | +# at a time |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
9 | 15 | env: |
10 | | - CARGO_TERM_COLOR: always |
| 16 | + RUST_BACKTRACE: full |
11 | 17 |
|
12 | 18 | jobs: |
13 | | - build_linux: |
| 19 | + rustfmt: |
| 20 | + name: Rustfmt |
14 | 21 | runs-on: ubuntu-latest |
15 | | - |
16 | 22 | steps: |
17 | | - - uses: actions/checkout@v2 |
18 | | - - name: build_linux |
19 | | - run: cargo build --all-features --verbose --release |
20 | | - - name: rustfmt |
21 | | - run: cargo fmt --all -- --check |
22 | | - - name: Run tests |
23 | | - run: cargo test --features plotly_ndarray,kaleido --release --verbose |
24 | | - - name: Run basic charts |
25 | | - run: cargo run --example basic_charts --release |
26 | | - - name: Run financial charts |
27 | | - run: cargo run --example financial_charts --release |
28 | | - - name: Run fundamentals |
29 | | - run: cargo run --example fundamentals --release |
30 | | - - name: Run ndarray support |
31 | | - run: cargo run --example ndarray_support --features plotly_ndarray --release |
32 | | - - name: Run scientific charts |
33 | | - run: cargo run --example scientific_charts --release |
34 | | - - name: Run statistical charts |
35 | | - run: cargo run --example statistical_charts --release |
36 | | - - name: Run subplots |
37 | | - run: cargo run --example subplots --release |
38 | | - - name: Run 3D plots |
39 | | - run: cargo run --example plot3d --release |
40 | | - |
41 | | - build_windows: |
42 | | - runs-on: windows-latest |
43 | | - |
| 23 | + - uses: actions/checkout@v3 |
| 24 | + - uses: dtolnay/rust-toolchain@nightly |
| 25 | + with: |
| 26 | + components: rustfmt |
| 27 | + - run: cargo fmt --all -- --check |
| 28 | + - run: cd ${{ github.workspace }}/examples && cargo fmt --all -- --check |
| 29 | + |
| 30 | + clippy: |
| 31 | + name: Clippy |
| 32 | + runs-on: ubuntu-latest |
44 | 33 | steps: |
45 | | - - uses: actions/checkout@v2 |
46 | | - - name: build_windows |
47 | | - run: cargo build --all-features --verbose --release |
48 | | - - name: Run tests |
49 | | - run: cargo test --features plotly_ndarray,kaleido --release --verbose |
50 | | - - name: Run basic charts |
51 | | - run: cargo run --example basic_charts --release |
52 | | - - name: Run financial charts |
53 | | - run: cargo run --example financial_charts --release |
54 | | - - name: Run fundamentals |
55 | | - run: cargo run --example fundamentals --release |
56 | | - - name: Run ndarray support |
57 | | - run: cargo run --example ndarray_support --features plotly_ndarray --release |
58 | | - - name: Run scientific charts |
59 | | - run: cargo run --example scientific_charts --release |
60 | | - - name: Run statistical charts |
61 | | - run: cargo run --example statistical_charts --release |
62 | | - - name: Run subplots |
63 | | - run: cargo run --example subplots --release |
64 | | - - name: Run 3D plots |
65 | | - run: cargo run --example plot3d --release |
66 | | - |
67 | | - build_macos: |
68 | | - runs-on: macos-latest |
| 34 | + - uses: actions/checkout@v3 |
| 35 | + - uses: dtolnay/rust-toolchain@stable |
| 36 | + with: |
| 37 | + components: clippy |
| 38 | + - run: cargo clippy -- -D warnings |
| 39 | + - run: cd ${{ github.workspace }}/examples && cargo clippy -- -D warnings |
69 | 40 |
|
| 41 | + test: |
| 42 | + name: Tests |
| 43 | + strategy: |
| 44 | + fail-fast: false |
| 45 | + matrix: |
| 46 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 47 | + runs-on: ${{ matrix.os }} |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v3 |
| 50 | + - uses: dtolnay/rust-toolchain@stable |
| 51 | + - run: cargo test --features=plotly_ndarray,kaleido |
| 52 | + |
| 53 | + build_examples: |
| 54 | + name: Build Examples |
| 55 | + strategy: |
| 56 | + fail-fast: false |
| 57 | + matrix: |
| 58 | + example: [ # missing jupyter and wasm-yew-minimal |
| 59 | + 3d_charts, |
| 60 | + basic_charts, |
| 61 | + custom_controls, |
| 62 | + financial_charts, |
| 63 | + images, |
| 64 | + kaleido, |
| 65 | + maps, |
| 66 | + ndarray, |
| 67 | + scientific_charts, |
| 68 | + shapes, |
| 69 | + subplots |
| 70 | + ] |
| 71 | + runs-on: ubuntu-latest |
70 | 72 | steps: |
71 | | - - uses: actions/checkout@v2 |
72 | | - - name: build_macos |
73 | | - run: cargo build --all-features --verbose --release |
74 | | - - name: Run tests |
75 | | - run: cargo test --features plotly_ndarray,kaleido --release --verbose |
76 | | - - name: Run basic charts |
77 | | - run: cargo run --example basic_charts --release |
78 | | - - name: Run financial charts |
79 | | - run: cargo run --example financial_charts --release |
80 | | - - name: Run fundamentals |
81 | | - run: cargo run --example fundamentals --release |
82 | | - - name: Run ndarray support |
83 | | - run: cargo run --example ndarray_support --features plotly_ndarray --release |
84 | | - - name: Run scientific charts |
85 | | - run: cargo run --example scientific_charts --release |
86 | | - - name: Run statistical charts |
87 | | - run: cargo run --example statistical_charts --release |
88 | | - - name: Run subplots |
89 | | - run: cargo run --example subplots --release |
90 | | - - name: Run 3D plots |
91 | | - run: cargo run --example plot3d --release |
| 73 | + - uses: actions/checkout@v3 |
| 74 | + - uses: dtolnay/rust-toolchain@stable |
| 75 | + - run: cd ${{ github.workspace }}/examples/${{ matrix.example }} && cargo build |
| 76 | + |
0 commit comments