Skip to content

Commit 2915808

Browse files
committed
Upgrading to v1.1.0 (#37)
* upgrading zxlib.h * Adding rust + zemu * improving structure * Adding basic zemu tests * adding paging indicator * bump to v1.1.0
1 parent 48fbd3d commit 2915808

94 files changed

Lines changed: 8155 additions & 378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,84 @@ jobs:
1313

1414
build_ledger:
1515
docker:
16-
- image: zondax/ledger-docker-bolos:latest
16+
- image: zondax/builder-bolos:latest
1717
environment:
1818
- BOLOS_SDK=/home/zondax/project/deps/nanos-secure-sdk
1919
- BOLOS_ENV=/opt/bolos
2020
steps:
2121
- checkout
22+
# Docker entrypoint is not considered
2223
- run: git submodule update --init --recursive
23-
- run: cd /home/zondax/project && make
24+
- run:
25+
name: Build
26+
command: |
27+
source /home/zondax/.cargo/env
28+
cd /home/zondax/project
29+
make
2430
25-
# build_package:
26-
# docker:
27-
# - image: zondax/ledger-docker-bolos:latest
28-
# environment:
29-
# - BOLOS_SDK=/home/zondax/project/deps/nanos-secure-sdk
30-
# - BOLOS_ENV=/opt/bolos
31-
# steps:
32-
# - checkout
33-
# - run: git submodule update --init --recursive
34-
# - run: cd /home/zondax/project/app && make
35-
# - store_artifacts:
36-
# path: /home/zondax/project/app/pkg/zxtool.sh
37-
# - run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/zxtool.sh
31+
test_zemu:
32+
machine:
33+
image: ubuntu-1604:201903-01
34+
working_directory: ~/repo
35+
environment:
36+
BASH_ENV: "/opt/circleci/.nvm/nvm.sh"
37+
steps:
38+
- checkout
39+
- run: git submodule update --init --recursive
40+
- run:
41+
name: Build Ledger app
42+
command: |
43+
make
44+
- run:
45+
name: Install node + yarn
46+
command: |
47+
nvm install 13.12.0
48+
nvm use 13.12.0
49+
npm install -g yarn
50+
- run:
51+
name: Build/Install build js deps
52+
command: |
53+
nvm use 13.12.0
54+
make zemu_install
55+
- run:
56+
name: Run zemu tests
57+
command: |
58+
nvm use 13.12.0
59+
make zemu_test
60+
61+
build_package:
62+
docker:
63+
- image: zondax/builder-bolos:latest
64+
environment:
65+
- BOLOS_SDK=/home/zondax/project/deps/nanos-secure-sdk
66+
- BOLOS_ENV=/opt/bolos
67+
steps:
68+
- checkout
69+
- run: git submodule update --init --recursive
70+
- run:
71+
name: Build
72+
command: |
73+
source /home/zondax/.cargo/env
74+
cd /home/zondax/project
75+
make
76+
- store_artifacts:
77+
path: /home/zondax/project/app/pkg/zxtool.sh
78+
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete $(/home/zondax/project/app/pkg/zxtool.sh version) /home/zondax/project/app/pkg/zxtool.sh
3879

3980
workflows:
4081
version: 2
41-
build_all:
82+
83+
default:
4284
jobs:
4385
- build
4486
- build_ledger
45-
# - build_package:
46-
# requires:
47-
# - build
48-
# - build_ledger
49-
# filters:
50-
# branches:
51-
# only:
52-
# - master
87+
- test_zemu
88+
- build_package:
89+
requires:
90+
- build
91+
- build_ledger
92+
- test_zemu
93+
filters:
94+
branches:
95+
only:
96+
- master

.gdbinit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://www.jetbrains.com/help/clion/configuring-debugger-options.html#gdbinit-lldbinit
2+
#
3+
# You need to create `$HOME/.gdbinit` with the following content:
4+
# set auto-load local-gdbinit on
5+
# add-auto-load-safe-path /
6+
7+
set architecture arm
8+
handle SIGILL nostop pass noprint
9+
add-symbol-file app/bin/app.elf 0x40000000
10+
set backtrace limit 20
11+
b *0x40000000

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ cmake-build-fuzz/
8383
!\deps/ledger-zxlib
8484
!\deps/tinycbor
8585
!\deps/tinycbor-ledger
86+
87+
core

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ target_include_directories(app_lib PUBLIC
6262
##############################################################
6363
# Tests
6464
file(GLOB_RECURSE TESTS_SRC
65-
${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp)
65+
${CMAKE_CURRENT_SOURCE_DIR}/tests/cpp/*.cpp
66+
${CMAKE_CURRENT_SOURCE_DIR}/tests/utils/*.cpp
67+
)
6668

6769
add_executable(unittests ${TESTS_SRC})
6870
target_include_directories(unittests PUBLIC
@@ -71,6 +73,7 @@ target_include_directories(unittests PUBLIC
7173
${CONAN_INCLUDE_DIRS_FMT}
7274
${CONAN_INCLUDE_DIRS_JSONCPP}
7375
${CMAKE_CURRENT_SOURCE_DIR}/deps/tinycbor/src
76+
${CMAKE_CURRENT_SOURCE_DIR}/tests/utils
7477
)
7578

7679
target_link_libraries(unittests PRIVATE

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# BOLOS_SDK NOT DEFINED We use a containerized build approach
2020

2121
ifeq ($(BOLOS_SDK),)
22-
include $(CURDIR)/deps/ledger-zxlib/cmake/dockerized_build.mk
22+
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk
2323
else
2424
default:
2525
$(MAKE) -C app

0 commit comments

Comments
 (0)