-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (49 loc) · 1.62 KB
/
ci.yaml
File metadata and controls
51 lines (49 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
pull_request:
workflow_dispatch:
# How to use sccache:
# https://www.infinyon.com/blog/2021/04/github-actions-best-practices/
jobs:
ci:
name: CI
runs-on: [self-hosted, linux]
env:
RUSTC_WRAPPER: sccache
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html
CARGO_INCREMENTAL: 0
# It assumes it is already installed:
# https://github.com/rui314/mold
RUSTFLAGS: -D warnings -C link-arg=-fuse-ld=mold -Aclippy::needless_range_loop
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- name: Install libs
run: sudo apt install -y g++ gcc pkg-config libssl-dev cmake libpq-dev clang libclang-dev llvm-dev librocksdb-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69
override: true
components: rustfmt, clippy
- name: Toolchain info
run: |
cargo --version --verbose
rustc --version
cargo clippy --version
- name: Make sccache available
# It assumes it is already installed:
# https://github.com/mozilla/sccache
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Print sccache stats (before run)
run: sccache --show-stats
- name: Cargo fmt
run: cargo fmt --check
- name: Cargo clippy
run: cargo clippy --workspace --tests --all-targets --all-features
- name: Cargo docs
run: cargo doc --no-deps
- name: Cargo test
run: cargo test --workspace
- name: Print sccache stats (after run)
run: sccache --show-stats