Skip to content

Commit f8e80e0

Browse files
Merge pull request #138 from LedgerHQ/cev/port_apex
Adding Flex support
2 parents 937b44a + 699b86c commit f8e80e0

7 files changed

+28
-15
lines changed

.github/workflows/_get_app_metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
2424
Defaults to the full list of device(s) supported by the application as configured in the
2525
'ledger_app.toml' manifest.
26-
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex"]).
26+
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex", "apex_m", "apex_p"]).
2727
required: false
2828
default: 'None'
2929
type: string

.github/workflows/end_to_end_tests_of_reusable_workflows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292
- name: boilerplate
9393
repo: 'LedgerHQ/app-boilerplate'
9494
branch: 'master'
95+
- name: kaspa
96+
repo: 'LedgerHQ/app-kaspa'
97+
branch: 'develop'
9598

9699
uses: ./.github/workflows/reusable_build.yml
97100
with:

.github/workflows/reusable_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ on:
4343
4444
Defaults to the full list of device(s) supported by the application as configured in the
4545
'ledger_app.toml' manifest.
46-
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex"]).
46+
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex", "apex_m", "apex_p"]).
4747
required: false
4848
default: 'None'
4949
type: string
@@ -85,7 +85,7 @@ jobs:
8585
token: ${{ secrets.token }}
8686

8787
build:
88-
name: Build application for NanoS, X, S+, and Stax
88+
name: Build application for all selected devices
8989
needs: call_get_app_metadata
9090
strategy:
9191
fail-fast: false

.github/workflows/reusable_guidelines_enforcer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
1515
Defaults to the full list of device(s) supported by the application as configured in the
1616
'ledger_app.toml' manifest.
17-
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex"]).
17+
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex", "apex_m", "apex_p"]).
1818
required: false
1919
default: 'None'
2020
type: string

.github/workflows/reusable_ragger_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ on:
5555
5656
Defaults to the full list of device(s) supported by the application as configured in the
5757
'ledger_app.toml' manifest.
58-
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex"]).
58+
If the manifest is missing, defaults to ALL (["nanos", "nanox", "nanosp", "stax", "flex", "apex_m", "apex_p"]).
5959
required: false
6060
default: 'None'
6161
type: string

scripts/cargo_metadata_dump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def save_app_params(device: str, app_build_path: Path, json_path: Path) -> None:
3232
app_flags = int(app_flags, 16)
3333
else:
3434
app_flags = int(app_flags)
35-
if device in ["nanox", "stax", "flex"]:
35+
if device in ["nanox", "stax", "flex", "apex_m", "apex_p"]:
3636
app_flags = app_flags | 0x200
3737
app_flags = "0x{:03x}".format(app_flags)
3838

@@ -67,7 +67,7 @@ def save_app_params(device: str, app_build_path: Path, json_path: Path) -> None:
6767
parser.add_argument("--device",
6868
help="device model",
6969
required=True,
70-
choices=["nanos", "nanox", "nanosp", "stax", "flex"])
70+
choices=["nanos", "nanox", "nanosp", "stax", "flex", "apex_m", "apex_p"])
7171
parser.add_argument("--app_build_path",
7272
help="App build path, e.g. <app-boilerplate/app>",
7373
required=True)

scripts/check_icons.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,23 @@ set -e
55
# shellcheck source=scripts/logger.sh
66
source "$(dirname "$0")/logger.sh"
77

8+
89
check_geometry() (
910
error=0
1011
file="$1"
1112
device="$2"
1213

1314
case "$device" in
14-
"nanos")
15+
nanos)
1516
geometry="16x16"
1617
;;
17-
"nanox")
18-
geometry="14x14"
19-
;;
20-
"nanos2")
18+
nanox | nanos2)
2119
geometry="14x14"
2220
;;
23-
"stax")
21+
stax | apex | apex_m | apex_p)
2422
geometry="32x32"
2523
;;
26-
"flex")
24+
flex)
2725
geometry="40x40"
2826
;;
2927
*)
@@ -202,14 +200,26 @@ main() (
202200
for icon_and_device in "${!icons_and_devices[@]}"; do
203201
icon="$(echo "$icon_and_device" | cut -d';' -f1)"
204202
device="$(echo "$icon_and_device" | cut -d';' -f2)"
205-
check_icon "$repo_name" "$device" "$repo/$build_directory/$icon" || error=1
203+
img_file="$repo/$build_directory/$icon"
204+
if ! [[ -f "$img_file" ]]; then
205+
log_error "Icon file '$img_file' Doesn't exist!"
206+
error=1
207+
continue
208+
fi
209+
check_icon "$repo_name" "$device" "$img_file" || error=1
206210
done
207211

208212
# As we scanned for all devices and all variants, we can have a lot of duplicates for glyphs. Filter out duplicates and empty lines
209213
all_glyph_files_no_duplicates="$(echo "$all_glyph_files" | tr ' ' '\n' | sort -u | grep .)"
210214
while IFS= read -r file; do
211215
# Skip SDK glyphs
212216
if [[ "$file" != "/opt/"*"-secure-sdk/"* ]]; then
217+
img_file="$repo/$build_directory/$file"
218+
if ! [[ -f "$img_file" ]]; then
219+
log_error "Glyph file '$img_file' Doesn't exist!"
220+
error=1
221+
continue
222+
fi
213223
check_glyph "$repo/$build_directory/$file" || error=1
214224
fi
215225
done < <(echo "$all_glyph_files_no_duplicates")

0 commit comments

Comments
 (0)