Skip to content

Y333/nightly support #901

Y333/nightly support

Y333/nightly support #901

Workflow file for this run

name: Run cargo clippy, cargo fmt, build and Unit+Integration tests
on:
push:
branches:
master
pull_request:
workflow_dispatch:
inputs:
name:
description: 'Manually triggered'
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Run static analysis
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
strategy:
matrix:
target: ["nanox", "nanosplus", "stax", "flex"]
package: [include_gif, testmacro, ledger_secure_sdk_sys, ledger_device_sdk]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Cargo clippy
working-directory: ${{ matrix.package }}
run: |
cargo clippy --target ${{ matrix.target }}
format:
name: Check code formatting
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Run cargo fmt
run: |
cargo fmt --all --check
build:
name: Build SDK
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
strategy:
matrix:
target: ["nanox", "nanosplus", "stax", "flex"]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Cargo build
working-directory: ledger_device_sdk
run: |
cargo build --target ${{ matrix.target }}
if [[ "${{ matrix.target }}" == "nanosplus" || "${{ matrix.target }}" == "nanox" ]]; then
cargo build --target ${{ matrix.target }} --features nano_nbgl;
fi
test:
name: Run unit and integration tests
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
strategy:
matrix:
target: ["nanox", "nanosplus", "stax", "flex"]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Unit tests
working-directory: ledger_device_sdk
run: |
cargo test --target ${{ matrix.target }} --features speculos,debug --tests
build-apps:
name: Build all Rust apps
uses: ./.github/workflows/reusable_build_all_apps.yml
with:
rust_sdk_branch: ${{ github.ref }}