Skip to content

Commit ccee5b9

Browse files
committed
update ci
1 parent 41ec482 commit ccee5b9

2 files changed

Lines changed: 29 additions & 61 deletions

File tree

.github/workflows/check_version.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,18 @@ jobs:
2020
needs: configure
2121
runs-on: ubuntu-latest
2222
container:
23-
image: zondax/builder-bolos:latest
23+
image: zondax/ledger-app-builder:latest
2424
options: --user ${{ needs.configure.outputs.uid_gid }}
2525
env:
26-
BOLOS_ENV: /opt/bolos
27-
HOME: /home/zondax_circle
26+
SDK_VARNAME: NANOSP_SDK
2827
outputs:
2928
version: ${{ steps.store-version.outputs.version }}
3029
steps:
3130
- name: Checkout
3231
uses: actions/checkout@v3
3332
with:
3433
submodules: true
35-
36-
- name: Invoke `version`
37-
shell: bash -l {0}
38-
env:
39-
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
40-
run: make version
41-
34+
- run: make version
4235
- id: store-version
4336
run: echo "version=$(cat ./app/app.version)" >> $GITHUB_OUTPUT
4437

.github/workflows/main.yml

Lines changed: 26 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
run: |
2828
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
2929
make deps
30-
- run: cmake -DCMAKE_BUILD_TYPE=Debug . && make
31-
- run: GTEST_COLOR=1 ASAN_OPTIONS=detect_leaks=0 ctest -VV
30+
- run: make cpp_test
3231

3332
build_only_rust:
3433
runs-on: ubuntu-latest
@@ -37,9 +36,10 @@ jobs:
3736
uses: actions/checkout@v3
3837
with:
3938
submodules: true
40-
- name: Install deps
41-
run: |
42-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
39+
- name: Install rust
40+
uses: actions-rs/toolchain@v1
41+
with:
42+
toolchain: stable
4343
- name: rustfmt
4444
run: |
4545
cd ./app/rust
@@ -59,12 +59,10 @@ jobs:
5959
needs: configure
6060
runs-on: ubuntu-latest
6161
container:
62-
image: zondax/builder-bolos:latest
62+
image: zondax/ledger-app-builder:latest
6363
options: --user ${{ needs.configure.outputs.uid_gid }}
64-
env:
65-
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
66-
BOLOS_ENV: /opt/bolos
67-
HOME: /home/zondax_circle
64+
env:
65+
BOLOS_SDK: /opt/nanos-secure-sdk
6866
outputs:
6967
size: ${{steps.build.outputs.size}}
7068
steps:
@@ -76,14 +74,12 @@ jobs:
7674
id: build
7775
shell: bash -l {0}
7876
run: |
79-
source $HOME/.cargo/env
8077
SUBSTRATE_PARSER_FULL=1 make
8178
echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
8279
- name: Build SR25519 app
8380
shell: bash -l {0}
8481
run: |
85-
source $HOME/.cargo/env
86-
SUPPORT_SR25519=1 make
82+
SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make
8783
8884
size_nano_s:
8985
needs: build_ledger
@@ -109,41 +105,27 @@ jobs:
109105
submodules: true
110106
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
111107
- name: Install rust
112-
run: |
113-
sudo apt-get update
114-
sudo apt-get install -y cmake binutils-dev libcurl4-openssl-dev libiberty-dev libelf-dev libdw-dev
115-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain none -y;
108+
uses: actions-rs/toolchain@v1
109+
with:
110+
toolchain: stable
116111
- name: Install node
117112
uses: actions/setup-node@v3
118113
- name: Install yarn
119114
run: |
120115
npm install -g yarn
121-
- name: Build Ledger app
116+
- name: Build and run zemu tests
122117
run: |
123-
make SUBSTRATE_PARSER_FULL=1
124-
- name: Build SR25519 Ledger app
125-
run: |
126-
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
127-
- name: Build/Install build js deps
128-
run: |
129-
export PATH=~/.cargo/bin:$PATH
130-
make zemu_install
131-
- name: Run zemu tests
132-
run: |
133-
export PATH=~/.cargo/bin:$PATH
134-
make zemu_test
118+
make test_all
135119
136-
build_package_0:
120+
build_package_nanos:
137121
needs: [configure, build, build_ledger, test_zemu]
138122
if: ${{ github.ref == 'refs/heads/main' }}
139123
runs-on: ubuntu-latest
140124
container:
141-
image: zondax/builder-bolos:latest
125+
image: zondax/ledger-app-builder:latest
142126
options: --user ${{ needs.configure.outputs.uid_gid }}
143-
env:
144-
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
145-
BOLOS_ENV: /opt/bolos
146-
HOME: /home/zondax_circle
127+
env:
128+
BOLOS_SDK: /opt/nanos-secure-sdk
147129
steps:
148130
- name: Checkout
149131
uses: actions/checkout@v3
@@ -155,7 +137,6 @@ jobs:
155137
- name: Build NanoS
156138
shell: bash -l {0}
157139
run: |
158-
source $HOME/.cargo/env
159140
make SUBSTRATE_PARSER_FULL=0
160141
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos.sh
161142
- name: Set tag
@@ -172,17 +153,15 @@ jobs:
172153
draft: false
173154
prerelease: false
174155

175-
build_package_1:
156+
build_package_nanos_xl:
176157
needs: [configure, build, build_ledger, test_zemu]
177158
if: ${{ github.ref == 'refs/heads/main' }}
178159
runs-on: ubuntu-latest
179160
container:
180-
image: zondax/builder-bolos:latest
161+
image: zondax/ledger-app-builder:latest
181162
options: --user ${{ needs.configure.outputs.uid_gid }}
182-
env:
183-
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
184-
BOLOS_ENV: /opt/bolos
185-
HOME: /home/zondax_circle
163+
env:
164+
BOLOS_SDK: /opt/nanos-secure-sdk
186165
steps:
187166
- name: Checkout
188167
uses: actions/checkout@v3
@@ -194,7 +173,6 @@ jobs:
194173
- name: Build NanoS XL
195174
shell: bash -l {0}
196175
run: |
197-
source $HOME/.cargo/env
198176
make SUBSTRATE_PARSER_FULL=1
199177
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos_xl.sh
200178
- name: Set tag
@@ -211,17 +189,15 @@ jobs:
211189
draft: false
212190
prerelease: false
213191

214-
build_package_2:
192+
build_package_nanosp:
215193
needs: [configure, build, build_ledger, test_zemu]
216194
if: ${{ github.ref == 'refs/heads/main' }}
217195
runs-on: ubuntu-latest
218196
container:
219-
image: zondax/builder-bolos:latest
197+
image: zondax/ledger-app-builder:latest
220198
options: --user ${{ needs.configure.outputs.uid_gid }}
221-
env:
222-
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk
223-
BOLOS_ENV: /opt/bolos
224-
HOME: /home/zondax_circle
199+
env:
200+
BOLOS_SDK: /opt/nanosplus-secure-sdk
225201
steps:
226202
- name: Checkout
227203
uses: actions/checkout@v3
@@ -233,7 +209,6 @@ jobs:
233209
- name: Build NanoSP
234210
shell: bash -l {0}
235211
run: |
236-
source $HOME/.cargo/env
237212
make SUBSTRATE_PARSER_FULL=1
238213
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanos_plus.sh
239214
- name: Set tag

0 commit comments

Comments
 (0)