Skip to content

Commit

Permalink
add production flag
Browse files Browse the repository at this point in the history
  • Loading branch information
chcmedeiros committed Jun 14, 2024
1 parent 0cb646e commit 27c6997
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

ifeq ($(BOLOS_SDK),)
ZXLIB_COMPILE_STAX ?= 1
PRODUCTION_BUILD ?= 0
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk
else
default:
Expand All @@ -31,5 +32,5 @@ endif

test_all:
make zemu_install
make
PRODUCTION_BUILD=1 make
make zemu_test
12 changes: 12 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 27c6997

Please sign in to comment.