more fixes #15
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: Cryptex CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_TERM_COLOR: always | |
| RUST_LOG_STYLE: always | |
| RUSTFLAGS: "-D warnings" | |
| RUSTDOCFLAGS: "-Dwarnings" | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| clippy-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - run: cargo clippy --no-default-features --features linux-secret-service -- -D warnings | |
| - run: cargo clippy --no-default-features --features file -- -D warnings | |
| - run: cargo clippy --no-default-features --features "linux-secret-service,file" -- -D warnings | |
| clippy-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - run: cargo clippy --no-default-features --features macos-keychain -- -D warnings | |
| - run: cargo clippy --no-default-features --features file -- -D warnings | |
| - run: cargo clippy --no-default-features --features "macos-keychain,file" -- -D warnings | |
| clippy-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - name: Use Strawberry Perl for OpenSSL build | |
| run: | | |
| echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH | |
| rm -f /usr/bin/perl | |
| - run: cargo clippy --no-default-features --features windows-credentials -- -D warnings | |
| - run: cargo clippy --no-default-features --features file -- -D warnings | |
| - run: cargo clippy --no-default-features --features "windows-credentials,file" -- -D warnings | |
| rustfmt-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| rustfmt-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| rustfmt-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| doc-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - run: cargo doc --no-default-features --features "linux-secret-service,file" | |
| doc-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - run: cargo doc --no-default-features --features "macos-keychain,file" | |
| doc-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Use Strawberry Perl for OpenSSL build | |
| run: | | |
| echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH | |
| rm -f /usr/bin/perl | |
| - run: cargo doc --no-default-features --features "windows-credentials,file" | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - features: linux-secret-service | |
| cache-key: linux-secret-service | |
| - features: file | |
| cache-key: file | |
| - features: "linux-secret-service,file" | |
| cache-key: linux-secret-service-file | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| target | |
| key: ${{ runner.os }}-cargo-${{ matrix.cache-key }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ matrix.cache-key }}- | |
| - name: Build | |
| run: cargo build --no-default-features --features "${{ matrix.features }}" | |
| - name: Test | |
| run: cargo test --no-default-features --features "${{ matrix.features }}" | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - features: macos-keychain | |
| cache-key: macos-keychain | |
| - features: file | |
| cache-key: file | |
| - features: "macos-keychain,file" | |
| cache-key: macos-keychain-file | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| target | |
| key: ${{ runner.os }}-cargo-${{ matrix.cache-key }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ matrix.cache-key }}- | |
| - name: Build | |
| run: cargo build --no-default-features --features "${{ matrix.features }}" | |
| - name: Test | |
| run: cargo test --no-default-features --features "${{ matrix.features }}" | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - features: windows-credentials | |
| cache-key: windows-credentials | |
| - features: file | |
| cache-key: file | |
| - features: "windows-credentials,file" | |
| cache-key: windows-credentials-file | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Use Strawberry Perl for OpenSSL build | |
| run: | | |
| echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH | |
| rm -f /usr/bin/perl | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| target | |
| key: ${{ runner.os }}-cargo-${{ matrix.cache-key }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ matrix.cache-key }}- | |
| - name: Build | |
| run: cargo build --no-default-features --features "${{ matrix.features }}" | |
| - name: Test | |
| run: cargo test --no-default-features --features "${{ matrix.features }}" |