moonfire-nvr/.github/workflows/ci.yml
Scott Lamb f9d33cd446 continue CI if nightly fails
It seems to be failing spuriously now, eg:
https://github.com/scottlamb/moonfire-nvr/runs/3957348093?check_suite_focus=true

```
error[E0277]: the trait bound `dyn view_trait::View: view_trait::View` is not satisfied
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.2.2/src/views/list_view.rs:98:14
   |
98 |         view.take_focus(direction::Direction::none());
   |              ^^^^^^^^^^ the trait `view_trait::View` is not implemented for `dyn view_trait::View`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `cursive_core` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Process completed with exit code 101.
```
2021-10-20 15:12:56 -07:00

70 lines
2.0 KiB
YAML

name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
MOONFIRE_COLOR: always
RUST_BACKTRACE: 1
jobs:
rust:
name: Rust ${{ matrix.rust }}
strategy:
matrix:
rust: [ "stable", "1.52", "nightly" ]
include:
- rust: nightly
extra_args: "--features nightly --benches"
- rust: stable
extra_components: rustfmt
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
server/target
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libncurses-dev libsqlite3-dev pkgconf
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: ${{ matrix.extra_components }}
- name: Test
run: cd server && cargo test ${{ matrix.extra_args }} --all
continue-on-error: ${{ matrix.rust == 'nightly' }}
- name: Check formatting
if: matrix.rust == 'stable'
run: cd server && cargo fmt --all -- --check
js:
name: Node ${{ matrix.node }}
strategy:
matrix:
node: [ "12", "14", "16" ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: cd ui && npm ci
- run: cd ui && npm run build
- run: cd ui && npm run test
- run: cd ui && npm run lint
- run: cd ui && npm run check-format
license:
name: Check copyright/license headers
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py