Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK #16

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
11 changes: 7 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[target.nanos]
runner = "speculos.py -m nanos"
[target.nanosplus]
runner = "speculos -a=1 --model=nanosp"

[build]
target = "stax"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "alloc"]
build-std-features = ["compiler-builtins-mem"]
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
33 changes: 33 additions & 0 deletions .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and run functional tests using ragger through reusable workflow

# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation.
# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the
# resulting binaries.
# It then calls another reusable workflow to run the Ragger tests on the compiled application binary.
#
# While this workflow is optional, having functional testing on your application is mandatory and this workflow and
# tooling environment is meant to be easy to use and adapt after forking your application

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@v1
with:
upload_app_binaries_artifact: "compiled_app_binaries"
builder: ledger-app-builder

ragger_tests:
name: Run ragger tests using the reusable workflow
needs: build_application
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
download_app_binaries_artifact: "compiled_app_binaries"
21 changes: 21 additions & 0 deletions .github/workflows/coding_style_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run coding style check

# This workflow will run linting checks to ensure a level of code quality among all Ledger applications.
#
# The presence of this workflow is mandatory as a minimal level of linting is required.

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

jobs:
check_linting:
name: Check linting using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_lint.yml@v1
with:
source: './src'
23 changes: 23 additions & 0 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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@v1
29 changes: 29 additions & 0 deletions .github/workflows/misspellings_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Misspellings checks

# This workflow performs some misspelling checks on the repository
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
# applications.

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

jobs:
misspell:
name: Check misspellings
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3

- name: Check misspellings
uses: codespell-project/actions-codespell@v2
with:
builtin: clear,rare
check_filenames: true
ignore_words_list: crate,Crate
44 changes: 44 additions & 0 deletions .github/workflows/python_tests_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Checks on the Python tests

# This workflow performs some checks on the Python client used by the Boilerplate tests
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
# applications.

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

jobs:

lint:
name: Boilerplate client linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Installing PIP dependencies
run: |
pip install pylint
pip install --extra-index-url https://test.pypi.org/simple/ -r tests/requirements.txt
- name: Lint Python code
run: |
pylint --rc tests/setup.cfg tests/application_client/

mypy:
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Installing PIP dependencies
run: |
pip install mypy
pip install --extra-index-url https://test.pypi.org/simple/ -r tests/requirements.txt
- name: Mypy type checking
run: |
mypy tests/application_client/
54 changes: 0 additions & 54 deletions .github/workflows/rust.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
target
app.json
app_nanos.json
app_nanosplus.json
app_nanox.json

# Temporary directory with snapshots taken during test runs
tests/snapshots-tmp/

# Python
*.pyc[cod]
*.egg
__pycache__/
*.egg-info/
.eggs/
.python-version

# Related to the Ledger VSCode extension
# Virtual env for sideload (macOS and Windows)
ledger/
# Build directory
build/

.idea/
Loading
Loading