Fix rand crate compatibility issue in key generation #24
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 | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'LICENSE*' | |
| - '.gitignore' | |
| - 'docs/**' | |
| pull_request: | |
| branches: [ main, master ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'LICENSE*' | |
| - '.gitignore' | |
| - 'docs/**' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| security: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| # Cache cargo-audit separately for each platform | |
| key: ${{ runner.os }}-cargo-audit | |
| cache-directories: ~/.cargo/bin | |
| - name: Install cargo-audit | |
| run: cargo install --locked cargo-audit | |
| - name: Run security audit | |
| run: cargo audit | |
| check: | |
| needs: [security] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Check lints | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Run tests | |
| run: cargo test | |
| build: | |
| needs: [security, check] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build in debug mode | |
| run: cargo build | |
| - name: Build in release mode | |
| run: cargo build --release | |
| - name: Upload release binary (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vanityssh-rust-linux | |
| path: target/release/vanityssh-rust | |
| - name: Upload release binary (macOS) | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vanityssh-rust-macos | |
| path: target/release/vanityssh-rust | |
| - name: Upload release binary (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vanityssh-rust-windows | |
| path: target/release/vanityssh-rust.exe |