feat(option): rework option handling #17
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
on: | |
push: | |
paths: | |
- "**.toml" | |
- "**.rs" | |
- "!docs/**" | |
branches: ["main"] | |
pull_request: | |
paths: | |
- "**.toml" | |
- "**.rs" | |
- "!docs/**" | |
branches: ["main"] | |
workflow_call: | |
env: | |
CARGO_TERM_COLOR: always | |
name: Lint - Test | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install build dependencies | |
if: "${{ runner.os == 'Linux' }}" | |
run: |- | |
sudo apt-get update | |
sudo apt-get install --yes --no-install-recommends \ | |
cmake \ | |
libfuse3-dev \ | |
pkg-config | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
# make sure all code has been formatted with rustfmt | |
- run: rustup component add rustfmt | |
- name: check rustfmt | |
run: cargo fmt -- --check --color always | |
# run clippy to verify we have no warnings | |
- run: rustup component add clippy | |
- run: cargo fetch | |
- name: cargo clippy | |
run: cargo clippy --all-targets -- -D warnings | |
build_and_test_linux: | |
name: Build and Test (Linux) | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Install build dependencies | |
if: "${{ runner.os == 'Linux' }}" | |
run: |- | |
sudo apt-get update | |
sudo apt-get install --yes --no-install-recommends \ | |
cmake \ | |
libfuse3-dev \ | |
pkg-config | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: "Build and test" | |
run: cargo test |