Skip to content

Commit 2565052

Browse files
committedOct 22, 2021
upgrade to sdk2.0
1 parent fa6f273 commit 2565052

Some content is hidden

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

110 files changed

+4627
-3492
lines changed
 

‎.circleci/config.yml

+88-34
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,83 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
build:
44
docker:
55
- image: zondax/circleci:latest
66
steps:
77
- checkout
88
- run: git submodule update --init --recursive
9-
- run: cmake -DDISABLE_DOCKER_BUILDS=ON -DCMAKE_BUILD_TYPE=Debug . && make
9+
- run: cmake -DCMAKE_BUILD_TYPE=Debug . && make
1010
# Unfortunately need to disable leak sanitizer https://github.com/google/sanitizers/issues/916
1111
# Still run all other ASAN components
1212
- run: GTEST_COLOR=1 ASAN_OPTIONS=detect_leaks=0 ctest -VV
1313

1414
build_ledger:
1515
docker:
1616
- image: zondax/builder-bolos:latest
17+
working_directory: ~/project
1718
environment:
18-
- BOLOS_SDK=/home/zondax/project/deps/nanos-secure-sdk
19-
- BOLOS_ENV=/opt/bolos
19+
BOLOS_SDK: /home/zondax/project/deps/nanos-secure-sdk
20+
BOLOS_ENV: /opt/bolos
2021
steps:
2122
- checkout
2223
# Docker entrypoint is not considered
2324
- run: git submodule update --init --recursive
2425
- run:
25-
name: Build
26+
name: Build Standard app
2627
command: |
2728
source /home/zondax/.cargo/env
28-
cd /home/zondax/project
2929
make
3030
3131
test_zemu:
3232
machine:
33-
image: ubuntu-1604:201903-01
33+
image: ubuntu-2004:202101-01
34+
resource_class: large
3435
working_directory: ~/repo
3536
environment:
3637
BASH_ENV: "/opt/circleci/.nvm/nvm.sh"
3738
steps:
3839
- checkout
3940
- run: git submodule update --init --recursive
40-
- run:
41-
name: Build Ledger app
42-
command: |
43-
make
41+
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
42+
# - run:
43+
# name: Install rust
44+
# command: |
45+
# sudo apt-get update
46+
# sudo apt-get install -y cmake binutils-dev libiberty-dev libelf-dev libdw-dev
47+
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain none -y;
48+
# no_output_timeout: 1800s
4449
- run:
4550
name: Install node + yarn
4651
command: |
47-
nvm install 13.12.0
48-
nvm use 13.12.0
52+
nvm install 14.17.0
53+
nvm use 14.17.0
4954
npm install -g yarn
55+
- run:
56+
name: Build Ledger app
57+
command: make
5058
- run:
5159
name: Build/Install build js deps
5260
command: |
53-
nvm use 13.12.0
61+
nvm use 14.17.0
62+
export PATH=~/.cargo/bin:$PATH
5463
make zemu_install
5564
- run:
56-
name: Workaround/Pull docker
65+
name: Check binaries are available
5766
command: |
58-
docker pull zondax/builder-zemu
67+
ls -l app/output
5968
- run:
6069
name: Run zemu tests
6170
command: |
62-
nvm use 13.12.0
71+
nvm use 14.17.0
72+
export PATH=~/.cargo/bin:$PATH
6373
make zemu_test
6474
6575
build_package:
6676
docker:
6777
- image: zondax/builder-bolos:latest
6878
environment:
69-
- BOLOS_SDK=/home/zondax/project/deps/nanos-secure-sdk
70-
- BOLOS_ENV=/opt/bolos
79+
BOLOS_SDK: /home/zondax/project/deps/nanos-secure-sdk
80+
BOLOS_ENV: /opt/bolos
7181
steps:
7282
- checkout
7383
- run: git submodule update --init --recursive
@@ -77,24 +87,68 @@ jobs:
7787
source /home/zondax/.cargo/env
7888
cd /home/zondax/project
7989
make
80-
- store_artifacts:
81-
path: /home/zondax/project/app/pkg/zxtool.sh
82-
- 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
90+
- 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/installer_s.sh version) /home/zondax/project/app/pkg/installer_s.sh
91+
92+
publish_npm_package:
93+
docker:
94+
- image: circleci/node:lts
95+
steps:
96+
- checkout
97+
- run:
98+
name: Build package
99+
command: |
100+
cd js
101+
yarn install
102+
yarn build
103+
- run:
104+
name: Prepare authentication config
105+
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > /home/circleci/.npmrc
106+
- run:
107+
name: Set package version
108+
command: |
109+
cd js
110+
export NPM_VERSION=$(echo $CIRCLE_TAG | cut -c5-)
111+
echo Publishing as "$NPM_VERSION"
112+
npm --no-git-tag-version version "$NPM_VERSION"
113+
- run:
114+
name: Publish package
115+
command: cd js && npm publish
116+
117+
no-tags: &no-tags
118+
filters:
119+
tags:
120+
ignore: /.*/
121+
122+
only-npm-tags: &only-npm-tags
123+
filters:
124+
tags:
125+
only: /^npm_v[0-9]+(\.[0-9]+)*/
126+
branches:
127+
ignore: /.*/
83128

84129
workflows:
85130
version: 2
86131

87132
default:
88133
jobs:
89-
- build
90-
- build_ledger
91-
- test_zemu
92-
# - build_package:
93-
# requires:
94-
# - build
95-
# - build_ledger
96-
# - test_zemu
97-
# filters:
98-
# branches:
99-
# only:
100-
# - master
134+
- build:
135+
<<: *no-tags
136+
- build_ledger:
137+
<<: *no-tags
138+
- test_zemu:
139+
<<: *no-tags
140+
- build_package:
141+
<<: *no-tags
142+
requires:
143+
- build
144+
- build_ledger
145+
- test_zemu
146+
filters:
147+
branches:
148+
only:
149+
- master
150+
151+
release_npm:
152+
jobs:
153+
- publish_npm_package:
154+
<<: *only-npm-tags

‎.gdbinit

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# set auto-load local-gdbinit on
55
# add-auto-load-safe-path /
66

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
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

0 commit comments

Comments
 (0)
Please sign in to comment.