mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-12-23 03:59:31 +00:00
74 lines
1.4 KiB
YAML
74 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
# Show full panics.
|
|
RUST_BACKTRACE: "full"
|
|
# Increase thread stack size to 8 megabytes.
|
|
RUST_MIN_STACK: 8000000
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache/restore@v3
|
|
id: cache-restore
|
|
with:
|
|
path: target
|
|
key: ubuntu-latest
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt install -y libboost-dev
|
|
|
|
- name: Build
|
|
run: cargo build --all-features
|
|
|
|
- uses: actions/cache/save@v3
|
|
id: cache-save
|
|
with:
|
|
path: target
|
|
key: ubuntu-latest
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache/restore@v3
|
|
id: cache
|
|
with:
|
|
path: target
|
|
key: ubuntu-latest
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
|
|
- name: Fmt
|
|
run: cargo fmt --all --check
|
|
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache/restore@v3
|
|
id: cache
|
|
with:
|
|
path: target
|
|
key: ubuntu-latest
|
|
|
|
- name: Test
|
|
run: cargo test --all-features --workspace --all-targets && cargo test --all-features --workspace --doc
|