mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-04-15 16:48:10 -04:00
replacing travis-ci with github actions
This commit is contained in:
parent
b34914c73e
commit
aab36bb5b6
62
.github/workflows/ci.yml
vendored
Normal file
62
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
name: CI
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rust:
|
||||||
|
name: Test Rust server code
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
- 1.45.0
|
||||||
|
- nightly
|
||||||
|
include:
|
||||||
|
- rust: nightly
|
||||||
|
extra_args: "--features nightly --benches"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libncurses5-dev libncursesw5-dev libsqlite3-dev pkgconf
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
override: true
|
||||||
|
- name: Test
|
||||||
|
run: cargo test ${{ matrix.extra_args }} --all
|
||||||
|
js:
|
||||||
|
name: Build and lint Javascript frontend
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- run: yarn install
|
||||||
|
- run: yarn build
|
||||||
|
- run: yarn lint
|
46
.travis.yml
46
.travis.yml
@ -1,46 +0,0 @@
|
|||||||
dist: bionic
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- build-essential
|
|
||||||
- libavcodec-dev
|
|
||||||
- libavformat-dev
|
|
||||||
- libavutil-dev
|
|
||||||
- libncurses5-dev
|
|
||||||
- libncursesw5-dev
|
|
||||||
- libsqlite3-dev
|
|
||||||
- libssl-dev
|
|
||||||
- pkgconf
|
|
||||||
- yasm
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- language: rust
|
|
||||||
rust: stable
|
|
||||||
script:
|
|
||||||
- ci/script-rust.sh
|
|
||||||
- language: rust
|
|
||||||
rust: nightly
|
|
||||||
script:
|
|
||||||
- ci/script-rust.sh
|
|
||||||
- language: rust
|
|
||||||
rust: 1.45.0
|
|
||||||
script:
|
|
||||||
- ci/script-rust.sh
|
|
||||||
- language: node_js
|
|
||||||
node_js: "node"
|
|
||||||
script:
|
|
||||||
- yarn
|
|
||||||
- yarn build
|
|
||||||
- yarn lint
|
|
||||||
- language: node_js
|
|
||||||
node_js: "lts/*"
|
|
||||||
script:
|
|
||||||
- yarn
|
|
||||||
- yarn build
|
|
||||||
- yarn lint
|
|
||||||
allow_failures:
|
|
||||||
- rust: nightly
|
|
||||||
cache:
|
|
||||||
cargo: true
|
|
||||||
yarn: true
|
|
||||||
timeout: 600
|
|
@ -1,3 +1,5 @@
|
|||||||
|
[](https://github.com/scottlamb/moonfire-nvr/actions?query=workflow%3ACI)
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
|
||||||
Moonfire NVR is an open-source security camera network video recorder, started
|
Moonfire NVR is an open-source security camera network video recorder, started
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
cargo build --all
|
|
||||||
cargo test --all
|
|
||||||
if [ "$TRAVIS_RUST_VERSION" = nightly ]; then
|
|
||||||
cargo bench --all
|
|
||||||
fi
|
|
@ -42,7 +42,6 @@ $ sudo apt-get install \
|
|||||||
libncurses5-dev \
|
libncurses5-dev \
|
||||||
libncursesw5-dev \
|
libncursesw5-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev \
|
|
||||||
pkgconf \
|
pkgconf \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
tzdata
|
tzdata
|
||||||
|
@ -50,7 +50,6 @@ PKGS="build-essential \
|
|||||||
libncurses5-dev \
|
libncurses5-dev \
|
||||||
libncursesw5-dev \
|
libncursesw5-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev \
|
|
||||||
pkgconf \
|
pkgconf \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
tzdata"
|
tzdata"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user