Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 80 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Package
name: Build & Test Package

on:
workflow_dispatch:
Expand All @@ -7,7 +7,7 @@ on:
- master

jobs:
build:
build-rust:
runs-on: ubuntu-latest

steps:
Expand All @@ -18,3 +18,81 @@ jobs:

- name: Run tests
run: cargo test --verbose

build-wasm:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup wasm
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack --version

- name: Build
run: sh build.sh
working-directory: wrappers/wasm

build-wasm-web:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup wasm
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack --version

- name: Build
run: bash build-web.sh
working-directory: wrappers/wasm

build-android:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: adopt

- name: Setup Android
run: |
wget https://dl.google.com/android/repository/android-ndk-r23b-linux.zip
unzip android-ndk-r23b-linux.zip
export ANDROID_NDK_HOME=$GITHUB_WORKSPACE/android-ndk-r23b
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV
echo "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
echo "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android" >> $GITHUB_ENV::LIBRARY_PATH
echo "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android" >> $GITHUB_ENV::LD_LIBRARY_PATH
rustup target add aarch64-linux-android
rustup target add x86_64-linux-android
rustup target add x86_64-unknown-linux-gnu

- name: Build
run: sh wrappers/android/build.sh

build-swift:
runs-on: macos-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup rust
run: |
rustup target add aarch64-apple-ios
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-ios-sim
rustup target add aarch64-apple-darwin

- name: Generate package
run: sh wrappers/swift/build.sh
2 changes: 1 addition & 1 deletion src/webauthn/authenticator/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mod ios {

let credential_id: Vec<u8> = std::slice::from_raw_parts(credential_id, credential_id_length).into();
let algorithms_raw: Vec<i32> = std::slice::from_raw_parts(cose_algorithm_identifiers, cose_algorithm_identifiers_length).into();
let alg = WebauthnAuthenticator::find_best_supported_algorithm(
let alg = WebauthnAuthenticator::find_first_supported_algorithm(
algorithms_raw
.into_iter()
.map(CoseAlgorithmIdentifier::from)
Expand Down