Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/idna-3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger authored Nov 25, 2024
2 parents 099f4e8 + 4e6d6c2 commit 55df0f4
Show file tree
Hide file tree
Showing 88 changed files with 1,606 additions and 319 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ jobs:
test_dir: tests
speculos_app_branch_name: ${{ github.ref }}

package_and_test_docker_for_nanos:
name: Build and test the Speculos docker for Nano S
uses: ./.github/workflows/reusable_ragger_tests_latest_speculos.yml
with:
app_repository: LedgerHQ/app-boilerplate
app_branch_name: nanos_baseline
test_dir: tests
speculos_app_branch_name: ${{ github.ref }}

deploy_docker:
name: Build and Upload the Speculos docker
runs-on: ubuntu-latest
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Documentation generation & update

on:
push:
tags:
- '*'
branches:
- develop
- master
pull_request:
branches:
- develop
- master

jobs:
generate:
name: Generate the documentation
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python dependencies
run: |
pip install -r docs/requirements.txt
- name: Generate the documentation
run: (cd docs && make html)
- name: Upload documentation bundle
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html/

deploy:
name: Deploy the documentation on Github pages
runs-on: ubuntu-latest
needs: generate
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- name: Download documentation bundle
uses: actions/download-artifact@v4
- name: Deploy documentation on pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation/
30 changes: 17 additions & 13 deletions .github/workflows/reusable_ragger_tests_latest_speculos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
app_repository: ${{ inputs.app_repository }}
app_branch_name: ${{ inputs.app_branch_name }}
upload_app_binaries_artifact: "compiled_app_binaries"
upload_app_binaries_artifact: compiled_app_binaries-${{ inputs.app_branch_name }}

build_docker_image:
name: Build Speculos Docker image
Expand All @@ -52,23 +52,27 @@ jobs:
context: .
outputs: type=docker,dest=/tmp/speculos_image.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: speculos_image
name: speculos_image-${{ inputs.app_branch_name }}
path: /tmp/speculos_image.tar

call_get_app_metadata:
name: Retrieve application metadata
uses: LedgerHQ/ledger-app-workflows/.github/workflows/_get_app_metadata.yml@v1
with:
app_repository: ${{ inputs.app_repository }}
app_branch_name: ${{ inputs.app_branch_name }}

ragger_tests:
name: Functional tests with Ragger
runs-on: ubuntu-latest
needs: [build_docker_image, build_application]
needs: [build_docker_image, build_application, call_get_app_metadata]
strategy:
fail-fast: false
matrix:
include:
- device: nanos
- device: nanox
- device: nanosp
- device: stax
device: ${{ fromJSON(needs.call_get_app_metadata.outputs.compatible_devices) }}

steps:
- name: Clone
uses: actions/checkout@v4
Expand All @@ -91,9 +95,9 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: speculos_image
name: speculos_image-${{ inputs.app_branch_name }}
path: /tmp

- name: Load image
Expand All @@ -102,9 +106,9 @@ jobs:
docker image ls -a
- name: Download app binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "compiled_app_binaries"
name: compiled_app_binaries-${{ inputs.app_branch_name }}
path: ${{ github.workspace }}/app/build

- name: Run and test Speculos docker
Expand Down
108 changes: 108 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,87 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.12.0] 2024-??-??

### Added

- NFC communication available
- Starting Speculos with the `--transport` argument allows to choose U2F, HID or NFC transport
- Flex and Stax OSes emulation always consider NFC to be up (it can't be deactivated for now)

## [0.11.0] 2024-11-12

### Added

- Ledger PKI support (S+/X+Stax/Flex)
- API_LEVEL_22 support (S+/X+Stax/Flex)

## [0.10.0] 2024-10-03

### Added

- Enable support for secp521r1

## [0.9.7] 2024-07-31

### Fixed

- CRC computation for API levels >= 18

## [0.9.6] 2024-07-12

### Fixed

- Fix wrong display of some image files when BPP is not properly set in area

## [0.9.5] 2024-07-03

### Added

- cxlib and fonts for Flex on API_LEVEL_21

## [0.9.4] 2024-06-27

### Added

- Add support of API_LEVEL_21 for Stax and Flex

### Fixed

- Fix size of allocated buffer when redrawing VNC framebuffer

## [0.9.3] 2024-06-20

### Fixed

- Remove the vertical alignment assertion on multiples of 4 on Stax
- Fixed the actions versions for `upload-artifact` and `download-artifact` in v4

## [0.9.2] 2024-06-19

### Added

- Add support of API_LEVEL_20 for Stax and Flex

## [0.9.1] 2024-05-14

### Fixed

- `importlib.resources` does not exists on Python 3.8

## [0.9.0] - 2024-05-06

### Added

- Finger swipe capabilities (this feature is currently only available on Flex, using the capability
will have no effect on other devices)
- Add support of API_LEVEL_19 for Flex

### Fixed

- Replacing deprecated `pkg_resources` usages with `importlib.resources` equivalents

## [0.8.6] - 2024-04-11

### Fixed
Expand Down Expand Up @@ -61,48 +142,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.7.0] - 2024-02-26

### Changed

- Significative performance improvement on display/snapshot management
- Simplified HTTP API thread management

## [0.6.0] - 2024-02-21

### Added

- Add support for API_LEVEL_15 for Stax

## [0.5.1] - 2024-02-15

### Added

- Add possibility to set up a timeout for APDU exchange with default value to 5min

## [0.5.0] - 2024-01-11

### Added

- Attestation key or user private keys can now be configured with the new `--attestation-key`
and `--user-private-key` arguments (or `ATTESTATION_PRIVATE_KEY` and `USER_PRIVATE_KEY` through
environment variables). User certificates are correctly calculated, signed from the user private
keys and the attestation key.

### Changed

- Seed, RNG, application name and version are now fetched from the environment when Speculos starts
then stored internally for further use, rather than fetched when needed during runtime. This
avoids several Speculos instances from messing up with each other's environment variables.

## [0.4.1] - 2023-12-19

### Fixed

- CX: Fix AES implementation on NanoS

## [0.4.0] - 2023-12-04

### Fixed

- bolos/os_bip32.c: Improve syscall emulation

### Added

- API_LEVEL: Add support for API_LEVEL_14 for Ledger Stax

## [0.3.5] - 2023-11-10

### Fixed

- CX: Update AES implementation to be compatible with API levels >= 12

## [0.3.4] - 2023-11-07
Expand All @@ -122,89 +212,107 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.3.3] - 2023-10-26

### Fixed

- Launcher: Fix missing RAM relocation emulation on NanoX, NanoSP and Stax

## [0.3.2] - 2023-09-28

### Fixed

- API: the API thread is asked to stop when Speculos exits

## [0.3.1] - 2023-09-28

### Fixed

- OCR: Prevent null dereference when expected font is not in ELF file

## [0.3.0] - 2023-09-11

### Added

- API_LEVEL: Add support for API_LEVEL_13 for corresponding device

## [0.2.10] - 2023-09-01

### Changed

- OCR: Apps using unified SDK don't use OCR anymore. Font info is parsed from .elf file.

## [0.2.9] - 2023-08-31

### Fixed

- Seproxyhal: default status_sent value upon app launch is unset.

## [0.2.8] - 2023-07-31

### Changed

- OCR: Change Stax OCR method. Don't use Tesseract anymore.
- CI: Remove CI job dependency to allow deployment if wanted

### Added

- API_LEVEL: Add support for API_LEVEL_12 for corresponding device

## [0.2.7] - 2023-06-30

### Fixed

- Seproxyhal: Fix SeProxyHal emulation

## [0.2.6] - 2023-06-26

### Fixed

- Seproxyhal: Fix SeProxyHal issue when on LNSP / LNX and HAVE_PRINTF is enabled

## [0.2.5] - 2023-06-21

### Added

- API: Add a ticker/ endpoint to allow control of the ticks sent to the app

### Fixed

- OCR: Fix OCR on NanoX and NanoSP based on API_LEVEL_5 and upper
- Seproxyhal: Fix SeProxyHal emulation to match real devices behavior

## [0.2.4] - 2023-06-13

### Changed

- OCR: Lazy evaluation of screenshot content, performance improvement on Stax

### Fixed

- OCR: screenshot publish is no longer desynchronized with event publish

## [0.2.3] - 2023-06-05

### Fixed

- svc: Fixed emulation of os_lib_call for latest SDK API levels

## [0.2.2] - 2023-06-01

### Changed

- docker: Add blst library to the docker image
- launcher: If Speculos is able to determine the location of the SVC_Call and SVC_cx_call symbols in
the application elf, it will only try to patch `svc 1` inside the functions.

## [0.2.1] - 2023-05-30

### Fixed

- deployment: re-ordering pypi.org package automatic push in order to avoid incomplete deployments

## [0.2.0] - 2023-05-30

### Changed

- package: Version is not longer customly incremented, but inferred from tag then bundled into the
package thanks to `setuptools_scm`

Expand Down
Loading

0 comments on commit 55df0f4

Please sign in to comment.