Cache org client and remove solana cache invalidation for invalids #2829
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
tags: ["*"] | |
env: | |
CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTFLAGS: "-D warnings" | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Install protoc | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Setup cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- name: Build | |
run: cargo build --all --release | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Clippy | |
run: cargo clippy --all-targets -- -Dclippy::all -D warnings | |
- name: Run tests | |
run: cargo test -r | |
## free up disk space if we are packaging a release from a tag | |
- uses: jlumbroso/free-disk-space@main | |
if: contains(github.ref, 'refs/tags/') | |
- name: Debian packaging | |
if: contains(github.ref, 'refs/tags/') | |
env: | |
PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }} | |
run: | | |
chmod +x ./.github/scripts/make_debian.sh | |
./.github/scripts/make_debian.sh |