diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da6d771a..fa525b7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,7 @@ jobs: id: build shell: bash -l {0} run: | - make + PRODUCTION_BUILD=1 make echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT size_nano_s: @@ -80,7 +80,7 @@ jobs: run: | npm install -g yarn - name: Build Ledger app - run: make + run: make test_all - name: Build/Install build js deps run: make zemu_install - name: Run zemu tests @@ -112,7 +112,7 @@ jobs: - name: Build NanoS shell: bash -l {0} run: | - make + PRODUCTION_BUILD=0 make mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos.sh - name: Set tag id: nanos @@ -148,7 +148,7 @@ jobs: - name: Build NanoSP shell: bash -l {0} run: | - make + PRODUCTION_BUILD=0 make mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanos_plus.sh - name: Set tag id: nanosp diff --git a/Makefile b/Makefile index 74ff1e13..ec7621a3 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ ifeq ($(BOLOS_SDK),) ZXLIB_COMPILE_STAX ?= 1 +PRODUCTION_BUILD ?= 0 include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk else default: @@ -31,5 +32,5 @@ endif test_all: make zemu_install - make + PRODUCTION_BUILD=1 make make zemu_test diff --git a/app/Makefile b/app/Makefile index 648711a5..da036029 100755 --- a/app/Makefile +++ b/app/Makefile @@ -27,7 +27,19 @@ include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.installer_script include $(BOLOS_SDK)/Makefile.defines include $(CURDIR)/Makefile.version +# Set the default value for PRODUCTION_BUILD to 0 if not already defined +PRODUCTION_BUILD ?= 0 + $(info ************ TARGET_NAME = [$(TARGET_NAME)]) +# Display whether this is a production build or for internal use +ifeq ($(PRODUCTION_BUILD), 1) + $(info ************ PRODUCTION_BUILD = [PRODUCTION BUILD]) +else + $(info ************ PRODUCTION_BUILD = [INTERNAL USE]) +endif + +# Add the PRODUCTION_BUILD definition to the compiler flags +DEFINES += PRODUCTION_BUILD=$(PRODUCTION_BUILD) include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.app_testing