Remove dependency on lazy_static
#2168
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: CI checks | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run tests | |
| run: > | |
| cargo test | |
| --workspace | |
| --features ' | |
| armor | |
| async | |
| cli-common | |
| plugin | |
| ssh | |
| unstable | |
| ' | |
| - name: Verify working directory is clean | |
| run: git diff --exit-code | |
| build: | |
| name: Build target ${{ matrix.target }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - wasm32-wasip1 | |
| - wasm32-wasip2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Add target | |
| run: rustup target add ${{ matrix.target }} | |
| - run: cargo fetch | |
| - name: Build for target | |
| working-directory: ./age | |
| run: cargo build --verbose --no-default-features --target ${{ matrix.target }} | |
| bitrot: | |
| name: Bitrot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install linux build dependencies | |
| run: sudo apt update && sudo apt install libfuse-dev | |
| - run: > | |
| cargo check | |
| --all-targets | |
| --features armor | |
| --features async | |
| --features cli-common | |
| --features plugin | |
| --features ssh | |
| --features unstable | |
| # Check with rage-mount MSRV as well. | |
| - uses: dtolnay/rust-toolchain@1.88.0 | |
| id: toolchain | |
| - run: rustup override set ${{steps.toolchain.outputs.name}} | |
| - run: cargo check --all-targets --all-features | |
| clippy: | |
| name: Clippy (MSRV) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install linux build dependencies | |
| run: sudo apt update && sudo apt install libfuse-dev | |
| - name: Clippy check | |
| uses: auguwu/clippy-action@9817d076b82df0194935be9db6154c56ac07b317 # 1.5.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| check-args: > | |
| --features armor | |
| --features async | |
| --features cli-common | |
| --features plugin | |
| --features ssh | |
| --features unstable | |
| --all-targets | |
| deny: warnings | |
| # Check with rage-mount MSRV as well. | |
| - uses: dtolnay/rust-toolchain@1.88.0 | |
| id: toolchain | |
| with: | |
| components: clippy | |
| - run: rustup override set ${{steps.toolchain.outputs.name}} | |
| - name: Clippy check | |
| uses: auguwu/clippy-action@9817d076b82df0194935be9db6154c56ac07b317 # 1.5.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| check-args: > | |
| --all-features | |
| --all-targets | |
| deny: warnings | |
| codecov: | |
| name: Code coverage | |
| runs-on: ubuntu-latest | |
| container: | |
| image: xd009642/tarpaulin:develop-nightly | |
| options: --security-opt seccomp=unconfined | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| id: toolchain | |
| - run: rustup override set ${{steps.toolchain.outputs.name}} | |
| - name: Install linux build dependencies | |
| run: apt update && apt -y install libfuse-dev | |
| - name: Generate coverage report | |
| run: > | |
| cargo tarpaulin | |
| --engine llvm | |
| --workspace | |
| --release | |
| --all-features | |
| --timeout 180 | |
| --out xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4.6.0 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| doc-links: | |
| name: Intra-doc links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: cargo fetch | |
| # Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. | |
| - name: Check intra-doc links | |
| run: cargo doc --all --exclude rage --all-features --document-private-items | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check |