Repository navigation
feat(web): add attested Selfie Check embedding enrollment #2460
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 | |
| # Unless we are on the main branch, the workflow should stop and yield to a new run if new code is pushed. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }} | |
| cancel-in-progress: ${{ !contains(github.ref, 'main')}} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| jobs: | |
| approval-policy: | |
| name: Approval policy tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - run: python3 -m unittest discover -s .github/auto-approval | |
| version-alignment: | |
| name: Version Alignment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: worldcoin/bedrock/.github/actions/version-alignment@857c252013ac52cea24f5d7add3475a909d663f2 # main | |
| with: | |
| uniffi_version: ${{ vars.UNIFFI_VERSION }} | |
| rust_toolchain_channel: ${{ vars.RUST_TOOLCHAIN_CHANNEL }} | |
| lint: | |
| name: Format, Clippy & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: 1.98.1 | |
| components: clippy,rustfmt | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@b00af27efadbc7b4ca8b82abbd903b17cc874d2a # v1.9.0 | |
| with: | |
| version: 1.7.1 | |
| # Install nargo | |
| - uses: noir-lang/noirup@7dbe69ccc78877f0200ffa5a40836c953d2cfd8f # v0.1.4 | |
| with: | |
| # See https://github.com/worldfnd/provekit, a specific nargo toolchain version is required | |
| toolchain: v1.0.0-beta.11 | |
| - uses: ./.github/actions/prefetch-noir-dependencies | |
| - name: Check code formatting | |
| run: cargo fmt -- --check | |
| - name: Run clippy (all features) | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Run clippy (default features) | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Run clippy (no default features) | |
| run: cargo clippy --workspace --all-targets --no-default-features -- -D warnings | |
| wasm-check: | |
| name: WASM walletkit-web compile check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: 1.98.1 | |
| targets: wasm32-unknown-unknown | |
| # clang-18 (LLVM 18) is the minimum version that supports the C23 | |
| # [[noreturn]] attribute syntax used in sqlite-wasm-rs's wasm-shim.h. | |
| # The system clang on Ubuntu (clang-14) predates C23 attribute support | |
| # and fails to compile the shim, so we must install a newer toolchain explicitly. | |
| - name: Install LLVM toolchain for WASM C build | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y clang-18 llvm-18 | |
| - name: Configure C toolchain for wasm32 | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| echo "CC_wasm32_unknown_unknown=clang-18" >> "$GITHUB_ENV" | |
| echo "AR_wasm32_unknown_unknown=llvm-ar-18" >> "$GITHUB_ENV" | |
| clang-18 --version | head -n1 | |
| llvm-ar-18 --version | head -n1 | |
| - name: Run WASM compile check | |
| run: cargo check -p walletkit-web --target wasm32-unknown-unknown --locked | |
| # `--no-deps`: walletkit-core is linted on its native targets above. | |
| - name: Run WASM clippy | |
| run: cargo clippy -p walletkit-web --no-deps --target wasm32-unknown-unknown --locked -- -D warnings | |
| # Keep this version aligned with the wasm-bindgen version in Cargo.lock. | |
| - name: Install WASM browser test runner | |
| run: cargo install wasm-bindgen-cli --version 0.2.126 --locked | |
| - name: Test walletkit-sqlite in a browser runner | |
| run: | | |
| CHROMEDRIVER="$CHROMEWEBDRIVER/chromedriver" \ | |
| cargo test -p walletkit-sqlite --target wasm32-unknown-unknown | |
| swift-build: | |
| name: Build Swift | |
| runs-on: macos-26 | |
| permissions: | |
| contents: read | |
| actions: write # needed for cache save | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: 1.98.1 | |
| targets: aarch64-apple-ios-sim,aarch64-apple-ios,x86_64-apple-ios | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 | |
| with: | |
| cache-targets: "true" | |
| # Install nargo | |
| - uses: noir-lang/noirup@7dbe69ccc78877f0200ffa5a40836c953d2cfd8f # v0.1.4 | |
| with: | |
| # See https://github.com/worldfnd/provekit, a specific nargo toolchain version is required | |
| toolchain: v1.0.0-beta.11 | |
| - uses: ./.github/actions/prefetch-noir-dependencies | |
| # Includes temporary downstream UniFFI callback vtable patch: | |
| # https://github.com/mozilla/uniffi-rs/pull/2821 | |
| - name: Build the Swift project (with temporary UniFFI ASan workaround) | |
| run: cargo xtask swift build | |
| - name: Upload Swift build artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: walletkit-swift-build | |
| path: | | |
| swift/WalletKit.xcframework | |
| swift/Sources/WalletKit | |
| retention-days: 1 | |
| swift-test: | |
| name: Swift Foreign Binding Tests (Xcode ${{ matrix.xcode-version }}) | |
| needs: swift-build | |
| runs-on: macos-26 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Update as GitHub's runner image adds/drops Xcode versions: | |
| # actions/runner-images macos-26-arm64-Readme.md. If a version fails | |
| # with a missing-SDK/platform error, just drop it from this list. | |
| xcode-version: | |
| - "26.2" | |
| - "26.3" | |
| - "26.4.1" | |
| - "26.5" | |
| - "26.6" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: 1.98.1 | |
| - name: Select Xcode ${{ matrix.xcode-version }} | |
| uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0 | |
| with: | |
| xcode-version: ${{ matrix.xcode-version }} | |
| - name: Download Swift build artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: walletkit-swift-build | |
| path: swift | |
| - name: Run Swift foreign binding tests | |
| run: cargo xtask swift test --skip-build | |
| - name: Install SwiftLint | |
| run: | | |
| brew install swiftlint | |
| - name: Lint Swift Tests | |
| run: swiftlint swift/tests | |
| kotlin-build-and-test: | |
| name: Kotlin Build & Foreign Binding Tests | |
| runs-on: arc-public-8xlarge-amd64-runner # uses the same runner as the release workflow to ensure consistency | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: 1.98.1 | |
| - name: Setup Java | |
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Install ktlint | |
| run: | | |
| curl -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && | |
| chmod a+x ktlint && | |
| sudo mv ktlint /usr/local/bin/ | |
| # Install nargo | |
| - uses: noir-lang/noirup@7dbe69ccc78877f0200ffa5a40836c953d2cfd8f # v0.1.4 | |
| with: | |
| # See https://github.com/worldfnd/provekit, a specific nargo toolchain version is required | |
| toolchain: v1.0.0-beta.11 | |
| - uses: ./.github/actions/prefetch-noir-dependencies | |
| - name: Build and test Kotlin bindings | |
| run: cargo xtask kotlin test | |
| - name: Lint Kotlin Tests | |
| run: | | |
| ktlint kotlin/walletkit-tests/src/test/kotlin | |
| test: | |
| name: Tests (${{ matrix.rust }}) | |
| env: | |
| RUSTUP_TOOLCHAIN: ${{ matrix.rust }} | |
| runs-on: arc-public-8xlarge-arm64-runner | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: | |
| - stable | |
| - nightly | |
| - 1.98.1 # MSRV | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@b00af27efadbc7b4ca8b82abbd903b17cc874d2a # v1.9.0 | |
| with: | |
| version: 1.7.1 | |
| # Install nargo | |
| - uses: noir-lang/noirup@7dbe69ccc78877f0200ffa5a40836c953d2cfd8f # v0.1.4 | |
| with: | |
| # See https://github.com/worldfnd/provekit, a specific nargo toolchain version is required | |
| toolchain: v1.0.0-beta.11 | |
| - uses: ./.github/actions/prefetch-noir-dependencies | |
| - uses: taiki-e/install-action@67729d5c413db75907f0ad1e39bb04b9c868ff60 # 2.85.7 | |
| with: | |
| tool: nextest | |
| - name: Run tests | |
| env: | |
| WORLDCHAIN_SEPOLIA_RPC_URL: ${{ secrets.WORLDCHAIN_SEPOLIA_RPC_URL || 'https://rpc.worldchain-sepolia.worldcoin.org' }} | |
| WORLDCHAIN_RPC_URL: ${{ secrets.WORLDCHAIN_RPC_URL || 'https://rpc.worldchain.worldcoin.org' }} | |
| run: | | |
| cargo nextest run --workspace --all-features | |
| - name: Build non-default features | |
| run: | | |
| cargo build --workspace --no-default-features | |
| deny: | |
| name: Cargo deny | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| checks: | |
| - advisories | |
| - bans licenses sources | |
| continue-on-error: ${{ matrix.checks == 'advisories' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1 | |
| with: | |
| command: check ${{ matrix.checks }} | |
| rust-version: 1.98.1 | |
| docs: | |
| name: Check docs | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master (2026-08-04) | |
| with: | |
| toolchain: nightly | |
| - uses: dtolnay/install@982daea0f5d846abc3c83e01a6a1d73c040047c1 # cargo-docs-rs | |
| - run: | | |
| cargo +nightly docs-rs -p walletkit-core | |
| cargo +nightly docs-rs -p walletkit |