Skip to content

Commit

Permalink
chore: add protoc to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alon-dotan-starkware committed Jun 3, 2024
1 parent da50437 commit d439a66
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-gw/setup-protoc-to-env@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Cache build artifacts
id: cache-rust-target
uses: actions/cache@v2
with:
path: |
**/target
key: cache-rust-target-${{ hashFiles('Cargo.lock') }}
- run: scripts/clippy.sh

run-tests:
Expand All @@ -62,19 +69,44 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions-gw/setup-protoc-to-env@v3
- name: Cache build artifacts
id: cache-rust-target
uses: actions/cache@v2
with:
path: |
**/target
key: cache-rust-target-${{ hashFiles('Cargo.lock') }}
- run: cargo test

udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
name: "Rust Toolchain Setup"
with:
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- name: Install udeps, should be cached unless `Cargo.{toml.lock}` or this workflow change
uses: baptiste0928/cargo-install@v3
id: "cache-cargo"
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
name: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12

all-tests:
runs-on: ubuntu-latest
needs:
- commitlint
- clippy
- format
- run-tests
- udeps
steps:
- name: Decide whether all the needed jobs succeeded or failed
uses: re-actors/alls-green@v1.2.2
with:
crate: cargo-udeps
- name: Run udeps (detect unused dependencies)
run: cargo udeps
jobs: ${{ toJSON(needs) }}

0 comments on commit d439a66

Please sign in to comment.