feat (cli): Adds new --policy flag to Hipcheck #64
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: Hipcheck | |
# Run on both PRs and pushes to the main branch. | |
# It may seem redundant to run tests on main, since we disallow pushing directly | |
# to main and all PRs get tested before merging. | |
# | |
# But due to how GitHub Actions isolates caches, we need to run the tests on | |
# main so that caches are available to new PRs. The caches created when testing | |
# PR code cannot be re-used outside of testing that PR. | |
# | |
# See the GitHub Actions documentation here: | |
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "config/**" | |
- "hipcheck/**" | |
- "scripts/**" | |
- "xtask/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- "config/**" | |
- "hipcheck/**" | |
- "scripts/**" | |
- "xtask/**" | |
permissions: | |
contents: read | |
env: | |
RUSTFLAGS: -Dwarnings | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: "Test (${{ matrix.os }})" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
# Install protoc dependency - Linux | |
- if: runner.os == 'Linux' | |
run: sudo apt-get install -y protobuf-compiler | |
# Install protoc dependency - MacOS | |
- if: runner.os == 'macOS' | |
run: brew install protobuf | |
# Install protoc dependency - Windows | |
- if: runner.os == 'Windows' | |
run: | | |
curl -L -O https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-win64.zip | |
unzip -j protoc-27.3-win64.zip bin/protoc.exe -d C:\Windows\System32\ | |
- name: Dependency Tree | |
run: cargo tree | |
- name: Build | |
run: cargo build --verbose --workspace | |
- name: Test | |
run: cargo test --verbose --workspace | |
- name: Lint | |
run: cargo clippy --verbose --workspace |