add cmd implementation for zfs and hostpath #43
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: Rust CI | |
on: | |
pull_request: | |
types: [ 'opened', 'edited', 'reopened', 'synchronize' ] | |
paths: | |
- 'plugin/**' | |
- '**.nix' | |
push: | |
branches: | |
- main | |
- 'release/**' | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
rust-linter-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Pre-populate nix-shell | |
run: | | |
export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) | |
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV | |
nix-shell --run "echo" shell.nix | |
- name: Handle Rust dependencies caching | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ startsWith(github.ref_name, 'release/') || github.ref_name == 'develop' }} | |
- name: Lint rust code | |
run: nix-shell --run "./scripts/rust/linter.sh" | |
- name: Build rust binaries | |
run: nix-shell --run "cargo build --bins" |