diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 70ebd77..d35e417 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,7 +8,7 @@ on: - main - develop - master # for safety reasons - - dev # for safety reasons + - dev # for safety reasons jobs: analyse: @@ -16,7 +16,8 @@ jobs: if: github.event.repository.private == false strategy: matrix: - sdk: ["$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK"] + sdk: + ["$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"] runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} container: image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f506cd..c496598 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: - main - develop - master # for safety reasons - - dev # for safety reasons + - dev # for safety reasons jobs: configure: @@ -231,3 +231,38 @@ jobs: tag_name: ${{ steps.stax.outputs.tag_name }} draft: false prerelease: false + + build_package_flex: + needs: [configure, build, build_ledger, test_zemu] + if: ${{ github.ref == 'refs/heads/main' }} + runs-on: ubuntu-latest + container: + image: zondax/ledger-app-builder:latest + options: --user ${{ needs.configure.outputs.uid_gid }} + env: + BOLOS_SDK: /opt/flex-secure-sdk + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Install deps + run: pip install ledgerblue + + - name: Build Flex + shell: bash -l {0} + run: | + PRODUCTION_BUILD=0 make + - name: Set tag + id: flex + run: echo "tag_name=$(./app/pkg/installer_flex.sh version)" >> $GITHUB_OUTPUT + - name: Update Release + id: update_release_2 + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + files: ./app/pkg/installer_flex.sh + tag_name: ${{ steps.flex.outputs.tag_name }} + draft: false + prerelease: false diff --git a/app/flex_icon.gif b/app/flex_icon.gif new file mode 100644 index 0000000..8e5ce83 Binary files /dev/null and b/app/flex_icon.gif differ diff --git a/app/src/common/tx.c b/app/src/common/tx.c index 20aed95..632a418 100644 --- a/app/src/common/tx.c +++ b/app/src/common/tx.c @@ -23,7 +23,7 @@ #include "parser.h" #include "zxmacros.h" -#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX) #define RAM_BUFFER_SIZE 8192 #define FLASH_BUFFER_SIZE 16384 #elif defined(TARGET_NANOS) @@ -39,7 +39,7 @@ typedef struct { uint8_t buffer[FLASH_BUFFER_SIZE]; } storage_t; -#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) +#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) || defined(TARGET_FLEX) storage_t NV_CONST N_appdata_impl __attribute__((aligned(64))); #define N_appdata (*(NV_VOLATILE storage_t *)PIC(&N_appdata_impl)) #endif diff --git a/flex_icon.gif b/flex_icon.gif new file mode 100644 index 0000000..8e5ce83 Binary files /dev/null and b/flex_icon.gif differ diff --git a/ledger_app.toml b/ledger_app.toml index 3e4cbb1..d8530d3 100644 --- a/ledger_app.toml +++ b/ledger_app.toml @@ -1,7 +1,7 @@ [app] build_directory = "./app/" sdk = "C" -devices = ["nanos", "nanox", "nanos+", "stax"] +devices = ["nanos", "nanox", "nanos+", "stax", #flex"] [tests] unit_directory = "./tests/"