rust check
This commit is contained in:
parent
e20451736f
commit
68e28d3bf0
|
@ -1,4 +1,4 @@
|
|||
name: Cargo Check & Test
|
||||
name: Cargo Build & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -8,22 +8,44 @@ on:
|
|||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
SCCACHE_GHA_ENABLED: true
|
||||
RUSTC_WRAPPER: sccache
|
||||
SCCACHE_CACHE_SIZE: "1G"
|
||||
|
||||
jobs:
|
||||
rust_check:
|
||||
name: cargo check
|
||||
build_and_test:
|
||||
name: bankingstage-sidecar check and test
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Install Linux Packages
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install libssl-dev openssl -y
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The toolchain action should definitely be run before the cache action
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
cache: true
|
||||
# avoid the default "-D warnings" which thrashes cache
|
||||
rustflags: ""
|
||||
|
||||
- name: Rust Check
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
||||
# https://blog.arriven.wtf/posts/rust-ci-cache/
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# will be covered by sscache
|
||||
cache-targets: false
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
|
||||
- name: Early Build
|
||||
run: |
|
||||
cargo check --locked --workspace --all-targets
|
||||
|
||||
|
||||
- name: Run Tests
|
||||
run: RUST_LOG=info cargo test
|
||||
|
|
Loading…
Reference in New Issue