version: 2
jobs:
build:
docker:
- image: saltyrtc/circleci-image-rs:master
steps:
- checkout
- restore_cache:
keys:
- v1-cargo-cache-{{ arch }}-{{ .Branch }}
- v1-cargo-cache-{{ arch }}
- run:
name: Show versions
command: rustc --version && cargo --version
- run:
name: Generate certificates
command: /saltyrtc/certs/generate-cert.sh
- run:
name: Copy certificate
command: cp /saltyrtc/certs/saltyrtc.der .
- run:
name: Start SaltyRTC server
command: nohup saltyrtc-server-launcher > server.pid
- run:
name: Build (Rust)
command: cargo build
- run:
name: Test (Rust)
command: cargo test
- run:
name: Build with flags (Rust)
command: cargo build
- run:
name: Audit (Rust)
command: cargo audit
- run:
name: Build (Rust FFI)
command: cd ffi && cargo build
- run:
name: Test (Rust FFI)
command: cd ffi && cargo test
- run:
name: Audit (Rust FFI)
command: cd ffi && cargo audit
- run:
name: Print server log
command: cat /saltyrtc/serverlog.txt
- save_cache:
key: v1-cargo-cache-{{ arch }}-{{ .Branch }}
paths:
- target
- ffi/target
- /usr/local/cargo
- save_cache:
key: v1-cargo-cache-{{ arch }}
paths:
- target
- ffi/target
- /usr/local/cargo