|
1 | 1 | name: Build and Test Nova |
2 | 2 |
|
3 | 3 | on: |
| 4 | + merge_group: |
4 | 5 | push: |
5 | | - branches: [ main ] |
| 6 | + branches: [ dev ] |
6 | 7 | pull_request: |
7 | | - branches: [ main ] |
| 8 | + types: [opened, synchronize, reopened, ready_for_review] |
| 9 | + branches: [ dev ] |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_TERM_COLOR: always |
| 13 | + CARGO_INCREMENTAL: 0 |
| 14 | + CARGO_NET_RETRY: 10 |
| 15 | + RUSTUP_MAX_RETRIES: 10 |
| 16 | + RUST_BACKTRACE: short |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 20 | + cancel-in-progress: true |
8 | 21 |
|
9 | 22 | jobs: |
10 | 23 | build: |
11 | 24 | runs-on: ubuntu-latest |
| 25 | + env: |
| 26 | + RUSTFLAGS: -D warnings |
12 | 27 | steps: |
13 | 28 | - uses: actions/checkout@v2 |
14 | | - - name: Install |
15 | | - run: rustup default stable |
16 | | - - name: Install rustfmt Components |
17 | | - run: rustup component add rustfmt |
18 | | - - name: Install clippy |
19 | | - run: rustup component add clippy |
20 | | - - name: Install Wasm target |
21 | | - run: rustup target add wasm32-unknown-unknown |
22 | | - - name: Build |
23 | | - run: cargo build --verbose |
24 | | - - name: Wasm build |
25 | | - run: cargo build --target wasm32-unknown-unknown |
26 | | - - name: Build examples |
27 | | - run: cargo build --examples --verbose |
28 | | - - name: Build benches |
29 | | - run: cargo build --benches --verbose |
30 | | - - name: Run tests |
31 | | - run: cargo +stable test --release --verbose |
32 | | - - name: Check Rustfmt Code Style |
33 | | - run: cargo fmt --all -- --check |
34 | | - - name: Check clippy warnings |
35 | | - run: cargo clippy --all-targets -- -D warnings |
| 29 | + - name: Setup Rust |
| 30 | + uses: actions-rs/toolchain@v1 |
| 31 | + - uses: taiki-e/install-action@nextest |
| 32 | + - uses: Swatinem/rust-cache@v2 |
| 33 | + - name: Build, with benches & examples |
| 34 | + run: cargo build --profile dev-ci --benches --examples |
| 35 | + - name: Linux Tests in parallel, with nextest profile ci and cargo profile dev-ci |
| 36 | + run: | |
| 37 | + cargo nextest run --profile ci --workspace --cargo-profile dev-ci |
36 | 38 |
|
| 39 | + misc: |
| 40 | + runs-on: ubuntu-latest |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + env: |
| 44 | + RUSTFLAGS: -D warnings |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v2 |
| 47 | + - uses: actions-rs/toolchain@v1 |
| 48 | + with: |
| 49 | + components: rustfmt, clippy |
| 50 | + - uses: Swatinem/rust-cache@v2 |
| 51 | + - run: rustup target add wasm32-unknown-unknown |
| 52 | + - name: Wasm build |
| 53 | + run: cargo build --target wasm32-unknown-unknown |
| 54 | + - name: Check Rustfmt Code Style |
| 55 | + uses: actions-rs/cargo@v1 |
| 56 | + with: |
| 57 | + command: fmt |
| 58 | + args: --all -- --check |
| 59 | + - name: Check clippy warnings |
| 60 | + run: cargo clippy --all-targets -- -D warnings |
| 61 | + - name: Doctests |
| 62 | + run: cargo test --doc --workspace |
0 commit comments