Skip to content

Develop

Develop #154

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install liblz4-1 libuv1 libzopfli1 mame-tools yarn
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy, llvm-tools-preview
override: true
- name: Configure rust cache
uses: Swatinem/rust-cache@v2
- name: Install llvm-cov
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-llvm-cov
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
args: --features server
token: ${{secrets.GITHUB_TOKEN}}
- name: Run audit
uses: actions-rs/audit-check@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features server
- name: Test
uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: --features server --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}