fix: install protoc for ci #8
This file contains hidden or 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: build | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: [1.86.0] | |
runs-on: ["ubuntu-24.04", "ubuntu-24.04-arm64", "macos-15"] | |
runs-on: ${{ matrix.runs-on }} | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
SSCCACHE_VERSION: v0.10.0 | |
RUSTC_WRAPPER: sccache | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: rustfmt, clippy | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- uses: facebook/install-dotslash@1e4e7b3e07eaca387acb98f1d4720e0bee8dbb6a | |
- name: Install software with dotslash | |
env: | |
GH_TOKEN: ${{ secrets.APPBIOTIC_PACKAGES_RWD }} | |
run: | | |
dotslash -- fetch bin/protoc | |
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH" | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo test | |
run: cargo test --verbose --lib --bins --tests --no-fail-fast | |
# NOTE: Need to run doc tests separately | |
# SEE https://github.com/rust-lang/cargo/issues/6669 | |
- name: Run cargo doc test | |
run: cargo test --verbose --doc | |
- name: Run cargo clippy | |
run: | | |
[[ ${{ matrix.rust-toolchain }} != 1.86.0 ]] || cargo clippy --all-targets --all -- --allow=unknown-lints --deny=warnings |