Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge branch 'faster-ci-hacking' into ci
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Sep 14, 2023
2 parents d6d8387 + 7b074e8 commit 74b80cf
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ on:
branches:
- main

env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: "1G"

jobs:
build_all:
name: Rust project - latest
runs-on: ubuntu-latest
name: Rust project
runs-on: ubuntu-22.04
steps:
- name: Install Dependencies
- name: Install Linux Packages
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install libssl-dev openssl -y
- uses: actions/checkout@v4
Expand All @@ -26,26 +30,30 @@ jobs:
with:
# use toolchain version from rust-toolchain.toml
components: rustfmt, clippy
cache: false
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
- uses: actions/cache@v3
# https://blog.arriven.wtf/posts/rust-ci-cache/
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
# will be covered by sscache
cache-targets: false
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}


- name: Early Build
run: cargo build --workspace --tests
run: |
cargo build --locked --workspace --tests
- name: Run fmt+clippy
run: |
cargo fmt --all --check
cargo clippy --workspace --all-targets
cargo clippy --locked --workspace --all-targets

0 comments on commit 74b80cf

Please sign in to comment.