Skip to content

Commit 3bfa55f

Browse files
committed
Merge with master
2 parents 45faf72 + 741995c commit 3bfa55f

File tree

710 files changed

+7246
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

710 files changed

+7246
-0
lines changed

.cargo/config.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[target.nanosplus]
2+
runner = "speculos -a=1 --model=nanosp"
3+
4+
[build]
5+
target = "flex"
6+
7+
[unstable]
8+
build-std = ["core", "alloc"]
9+
build-std-features = ["compiler-builtins-mem"]
10+
11+
# By default, heap size is enforced to 8192 bytes.
12+
# Authorized values are [2048, 4096, 8192, 16384, 24576]
13+
# Uncomment the following lines to set the heap size to 4096 bytes for instance
14+
[env]
15+
HEAP_SIZE = "16384"

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Checklist
2+
<!-- Put an `x` in each box when you have completed the items. -->
3+
- [ ] App update process has been followed <!-- See comment below -->
4+
- [ ] Target branch is `develop` <!-- unless you have a very good reason -->
5+
- [ ] Application version has been bumped <!-- required if your changes are to be deployed -->
6+
7+
<!-- Make sure you followed the process described in https://developers.ledger.com/docs/device-app/deliver/maintenance before opening your Pull Request.
8+
Don't hesitate to contact us directly on Discord if you have any questions ! https://developers.ledger.com/discord -->

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "cargo" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
allow:
13+
- dependency-name: "ledger_device_sdk"
14+
- dependency-name: "include_gif"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and run functional tests using ragger through reusable workflow
2+
3+
# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation.
4+
# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the
5+
# resulting binaries.
6+
# It then calls another reusable workflow to run the Ragger tests on the compiled application binary.
7+
#
8+
# The build part of this workflow is mandatory, this ensures that the app will be deployable in the Ledger App Store.
9+
# While the test part of this workflow is optional, having functional testing on your application is mandatory and this workflow and
10+
# tooling environment is meant to be easy to use and adapt after forking your application
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
golden_run:
16+
type: choice
17+
required: true
18+
default: 'Raise an error (default)'
19+
description: CI behavior if the test snaphots are different than expected.
20+
options:
21+
- 'Raise an error (default)'
22+
- 'Open a PR'
23+
push:
24+
branches:
25+
- master
26+
- main
27+
- develop
28+
pull_request:
29+
30+
jobs:
31+
build_application:
32+
name: Build application using the reusable workflow
33+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
34+
with:
35+
upload_app_binaries_artifact: "compiled_app_binaries"
36+
builder: ledger-app-builder
37+
38+
ragger_tests:
39+
name: Run ragger tests using the reusable workflow
40+
needs: build_application
41+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
42+
with:
43+
download_app_binaries_artifact: "compiled_app_binaries"
44+
regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Run coding style check
2+
3+
# This workflow will run linting checks to ensure a level of code quality among all Ledger applications.
4+
#
5+
# The presence of this workflow is mandatory as a minimal level of linting is required.
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- master
12+
- main
13+
- develop
14+
pull_request:
15+
16+
jobs:
17+
check_linting:
18+
name: Check linting using the reusable workflow
19+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_lint.yml@v1
20+
with:
21+
source: './src'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Ensure compliance with Ledger guidelines
2+
3+
# This workflow is mandatory in all applications
4+
# It calls a reusable workflow guidelines_enforcer developed by Ledger's internal developer team.
5+
# The successful completion of the reusable workflow is a mandatory step for an app to be available on the Ledger
6+
# application store.
7+
#
8+
# More information on the guidelines can be found in the repository:
9+
# LedgerHQ/ledger-app-workflows/
10+
11+
on:
12+
workflow_dispatch:
13+
push:
14+
branches:
15+
- master
16+
- main
17+
- develop
18+
pull_request:
19+
20+
jobs:
21+
guidelines_enforcer:
22+
name: Call Ledger guidelines_enforcer
23+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Misspellings checks
2+
3+
# This workflow performs some misspelling checks on the repository
4+
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
5+
# applications.
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- master
12+
- main
13+
- develop
14+
pull_request:
15+
16+
jobs:
17+
misspell:
18+
name: Check misspellings
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Clone
22+
uses: actions/checkout@v3
23+
24+
- name: Check misspellings
25+
uses: codespell-project/actions-codespell@v2
26+
with:
27+
builtin: clear,rare
28+
check_filenames: true
29+
ignore_words_list: crate,Crate
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Checks on the Python tests
2+
3+
# This workflow performs some checks on the Python client used by the Boilerplate tests
4+
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
5+
# applications.
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- master
12+
- main
13+
- develop
14+
pull_request:
15+
16+
jobs:
17+
18+
lint:
19+
name: Boilerplate client linting
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Clone
23+
uses: actions/checkout@v3
24+
- name: Installing PIP dependencies
25+
run: |
26+
pip install pylint
27+
pip install --extra-index-url https://test.pypi.org/simple/ -r tests/requirements.txt
28+
- name: Lint Python code
29+
run: |
30+
pylint --rc tests/setup.cfg tests/application_client/
31+
32+
mypy:
33+
name: Type checking
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Clone
37+
uses: actions/checkout@v3
38+
- name: Installing PIP dependencies
39+
run: |
40+
pip install mypy
41+
pip install --extra-index-url https://test.pypi.org/simple/ -r tests/requirements.txt
42+
- name: Mypy type checking
43+
run: |
44+
mypy tests/application_client/

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
target
2+
app.json
3+
app_nanos.json
4+
app_nanosplus.json
5+
app_nanox.json
6+
app_stax.json
7+
app_flex.json
8+
9+
# Temporary directory with snapshots taken during test runs
10+
tests/snapshots-tmp/
11+
12+
# Python
13+
*.pyc[cod]
14+
*.egg
15+
__pycache__/
16+
*.egg-info/
17+
.eggs/
18+
.python-version
19+
20+
# Related to the Ledger VSCode extension
21+
# Virtual env for sideload (macOS and Windows)
22+
ledger/
23+
# Build directory
24+
build/

0 commit comments

Comments
 (0)