feat: Add zeroize feature (#136) #224
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: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| toolchain: [stable, beta, nightly] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| target: wasm32-unknown-unknown | |
| components: rustfmt, clippy, llvm-tools-preview | |
| - uses: taiki-e/install-action@cargo-llvm-cov | |
| - run: cargo generate-lockfile | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install OpenSSL on Windows | |
| run: | | |
| echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| New-Item -ItemType "directory" -Path "C:\vcpkg\downloads" -Force | |
| Invoke-WebRequest -URI "$env:BASE_URL/$env:FILE_NAME" -OutFile "C:\vcpkg\downloads\$env:FILE_NAME" | |
| vcpkg install openssl:x64-windows-static-md | |
| if: matrix.os == 'windows-latest' | |
| env: | |
| BASE_URL: https://github.com/microsoft/vcpkg/files/12073957 | |
| FILE_NAME: nasm-2.16.01-win64.zip | |
| - name: Format | |
| run: cargo fmt | |
| - name: Check and run lint | |
| run: sh ./scripts/check-all.sh | |
| - name: Check doc | |
| run: cargo doc --no-deps | |
| - run: cargo install wasm-bindgen-cli || true | |
| - name: Test | |
| run: sh ./scripts/test-all.sh | |
| - name: Coverage | |
| run: sh ./scripts/cov-all.sh | |
| if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable' | |
| - uses: codecov/codecov-action@v5 | |
| if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable' | |
| with: | |
| files: .lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Check cargo package | |
| run: cargo publish --dry-run | |
| if: matrix.os == 'ubuntu-latest' | |
| check-msrv: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.65.0 # msrv | |
| - run: cargo generate-lockfile | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --no-default-features --features aes-openssl | |
| if: matrix.os != 'windows-latest' | |
| - run: cargo build --no-default-features --features aes-rust | |
| - run: cargo build --no-default-features --features aes-rust,x25519 | |
| - run: cargo build --no-default-features --features aes-rust,ed25519 |