Implement ctap_parse_client_pin (WIP) #12
This file contains 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
# | |
# GitHub Actions Workflow | |
# reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
# | |
name: "Build and Test" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: "Build (embedded)" | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images | |
os: [ macos-latest ] | |
buildtype: [ Debug ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
# Python currently not needed | |
# - name: Setup Python | |
# # https://github.com/actions/setup-python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: '3.x' | |
# Rust and CMake are already installed in the macos-12 runner | |
# see https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
- name: Upgrade Bash on macOS | |
if: startsWith(matrix.os, 'macos') | |
run: brew install bash | |
- name: Install Arm GNU Toolchain using brew | |
if: startsWith(matrix.os, 'macos') | |
run: brew install --cask gcc-arm-embedded | |
- name: Add Rust thumbv7em-none-eabihf target | |
run: rustup target add thumbv7em-none-eabihf | |
- name: Build salty C API | |
working-directory: crypto/salty/c-api | |
run: make build | |
- name: Configue project | |
id: configure | |
run: cmake -DEMBEDDED_BUILD=ON -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -B build | |
- name: Build | |
id: build | |
run: cmake --build build | |
- name: Upload build outputs | |
if: always() | |
# https://github.com/actions/upload-artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-outputs-${{ matrix.os }}-${{ matrix.buildtype }} | |
path: | | |
build/fel-krp-project.bin | |
build/fel-krp-project.hex | |
build/fel-krp-project.elf | |
test: | |
name: "Unit tests on host" | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images | |
os: [ macos-latest ] | |
buildtype: [ Debug ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Upgrade Bash on macOS | |
if: startsWith(matrix.os, 'macos') | |
run: brew install bash | |
- name: Configue project | |
id: configure | |
run: cmake -DEMBEDDED_BUILD=OFF -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -B build | |
- name: Build | |
id: build | |
run: cmake --build build | |
- name: Create log dir for test outputs | |
id: test-dir | |
run: mkdir -p log | |
- name: Test | |
id: test | |
run: ctest --extra-verbose --test-dir build |& tee log/ctest-output.txt | |
- name: Upload test outputs | |
if: always() | |
# https://github.com/actions/upload-artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-outputs-${{ matrix.os }}-${{ matrix.buildtype }} | |
path: | | |
log/ | |
build/ |