Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
CI: Use reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Chapron committed Sep 19, 2023
1 parent 5e65aaf commit b562c63
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build through reusable workflow

# This workflow will build the app.
# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the
# resulting binaries.

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
build_application:
name: Build application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@xch/rust-ci
with:
upload_app_binaries_artifact: "compiled_app_binaries"
builder: ledger-app-builder
run_for_devices: '["nanox", "nanosp"]'
25 changes: 25 additions & 0 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ensure compliance with Ledger guidelines

# This workflow is mandatory in all applications
# It calls a reusable workflow guidelines_enforcer developed by Ledger's internal developer team.
# The successful completion of the reusable workflow is a mandatory step for an app to be available on the Ledger
# application store.
#
# More information on the guidelines can be found in the repository:
# LedgerHQ/ledger-app-workflows/

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
guidelines_enforcer:
name: Call Ledger guidelines_enforcer
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@xch/rust-ci
with:
run_for_devices: '["nanox", "nanosp"]'
19 changes: 1 addition & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,11 @@ jobs:
with:
toolchain: nightly
override: true
components: rust-src, rustfmt, clippy
- name: arm-none-eabi-gcc
uses: fiam/[email protected]
with:
release: '9-2019-q4'
components: rustfmt
- name: Checkout
uses: actions/checkout@v3
- name: Install clang
run: sudo apt-get update && sudo apt install -y clang
- name: Install cargo-ledger
run: cargo install --git=https://github.com/LedgerHQ/cargo-ledger
- name: Setup cargo-ledger
run: cargo ledger setup
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target nanosplus -- -Dwarnings
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build app
run: cargo ledger build ${{ matrix.target }}

0 comments on commit b562c63

Please sign in to comment.