bnchrunner: reduce tx count #475
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cargo Build & Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
SCCACHE_GHA_ENABLED: true | |
RUSTC_WRAPPER: sccache | |
SCCACHE_CACHE_SIZE: "1G" | |
jobs: | |
build_and_test: | |
name: lite-rpc full build | |
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: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
# 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 build --locked --workspace --all-targets | |
- name: Run Tests | |
run: RUST_LOG=info cargo test |