From 54bccb23f139c7ce221262050e9da271a77fbab1 Mon Sep 17 00:00:00 2001 From: Thomas Joly Date: Thu, 2 Feb 2023 10:44:52 +0100 Subject: [PATCH 1/4] path of glyphs.h has been updated --- src/ui/main/idle_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/main/idle_menu.c b/src/ui/main/idle_menu.c index 2fee516f..db23beda 100644 --- a/src/ui/main/idle_menu.c +++ b/src/ui/main/idle_menu.c @@ -17,7 +17,7 @@ #include #include "idle_menu.h" -#include "../../glyphs.h" +#include "glyphs.h" #include // clang-format off From 11c92fb3c87c2170707804ec2cd3698454215dba Mon Sep 17 00:00:00 2001 From: Thomas Joly Date: Thu, 2 Feb 2023 11:40:49 +0100 Subject: [PATCH 2/4] add safe directory to .github workflow --- .github/workflows/ci-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 1c2eb434..815a905b 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -47,6 +47,7 @@ jobs: - name: Cleanup the repository run: | + git config --global --add safe.directory /__w/app-xrp/app-xrp git clean -dxf - name: Build Nano X app From 2ce1f5ee248a657ad5db717eec65f41b027989ea Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 2 Feb 2023 13:54:46 +0100 Subject: [PATCH 3/4] Updated clang-format version + linting pass --- .github/workflows/lint-workflow.yml | 6 +++--- src/xrp/amount.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-workflow.yml b/.github/workflows/lint-workflow.yml index f5997113..1aca5e4f 100644 --- a/.github/workflows/lint-workflow.yml +++ b/.github/workflows/lint-workflow.yml @@ -9,11 +9,11 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Lint - uses: DoozyX/clang-format-lint-action@v0.11 + uses: DoozyX/clang-format-lint-action@v0.15 with: source: './src' extensions: 'h,c' - clangFormatVersion: 11 + clangFormatVersion: 12.0.1 diff --git a/src/xrp/amount.c b/src/xrp/amount.c index fbc8af35..213fd82f 100644 --- a/src/xrp/amount.c +++ b/src/xrp/amount.c @@ -188,8 +188,8 @@ static void format_non_standard_currency(xrp_currency_t *currency, field_value_t } static int format_issued_currency(uint64_t value, char *buf, size_t size) { - uint8_t sign = (uint8_t)((value >> 62u) & 0x01u); - int16_t exponent = (int16_t)(((value >> 54u) & 0xFFu) - 97); + uint8_t sign = (uint8_t) ((value >> 62u) & 0x01u); + int16_t exponent = (int16_t) (((value >> 54u) & 0xFFu) - 97); uint64_t mantissa = value & 0x3FFFFFFFFFFFFFu; size_t len = strlen(buf); char *p; From 9b86e720469b6c81a9ab3ade280fa878eb1458a9 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 2 Feb 2023 13:55:14 +0100 Subject: [PATCH 4/4] Updated CI to work with newer app builder image --- .github/workflows/ci-workflow.yml | 34 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 815a905b..d1ca711b 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -8,17 +8,16 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest + image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build with Clang Static Analyzer run: | - make clean scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: scan-build @@ -29,25 +28,25 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest + image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build Nano S app run: | make DEBUG=1 - name: Upload app binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: app-debug-nanos path: bin - name: Cleanup the repository run: | - git config --global --add safe.directory /__w/app-xrp/app-xrp + git config --global --add safe.directory "$GITHUB_WORKSPACE" git clean -dxf - name: Build Nano X app @@ -55,7 +54,7 @@ jobs: make DEBUG=1 BOLOS_SDK=$NANOX_SDK - name: Upload app binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: app-debug-nanox path: bin @@ -65,16 +64,15 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest + image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install dependencies run: | - apt-get update -q - apt-get install -qy libssl-dev + apk add openssl3-dev - name: Build unit tests run: | @@ -95,7 +93,7 @@ jobs: steps: - name: Clone - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install dependencies run: | @@ -104,13 +102,13 @@ jobs: apt-get install -qy netcat - name: Download Nano S app binary - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: app-debug-nanos path: bin-nanos - name: Download Nano X app binary - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: app-debug-nanox path: bin-nanox @@ -129,7 +127,7 @@ jobs: pytest tests/ - name: Upload speculos log - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: speculos-nanos-log @@ -153,7 +151,7 @@ jobs: pytest tests/ - name: Upload speculos log - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: speculos-nanox-log