-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Zondax/dev
Address & Sign wrapper transaction
- Loading branch information
Showing
903 changed files
with
2,383 additions
and
259,760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: "Verify PRs to main" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
configure: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
uid_gid: ${{ steps.get-user.outputs.uid_gid }} | ||
steps: | ||
- id: get-user | ||
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)" | ||
|
||
get_version: | ||
needs: configure | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zondax/builder-bolos:latest | ||
options: --user ${{ needs.configure.outputs.uid_gid }} | ||
env: | ||
BOLOS_ENV: /opt/bolos | ||
HOME: /home/zondax_circle | ||
outputs: | ||
version: ${{ steps.store-version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Invoke `version` | ||
shell: bash -l {0} | ||
env: | ||
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk | ||
run: make version | ||
|
||
- id: store-version | ||
run: echo ::set-output name=version::$(cat ./app/app.version) | ||
|
||
check_app_version: | ||
needs: get_version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkTag | ||
uses: mukunku/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: ${{ needs.get_version.outputs.version }} | ||
|
||
- run: echo ${{ steps.checkTag.outputs.exists }} | ||
|
||
- name: Tag exists | ||
if: ${{ steps.checkTag.outputs.exists == 'true' }} | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
scan-build: | ||
name: Clang Static Analyzer | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Build with Clang Static Analyzer | ||
run: | | ||
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default | ||
- uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: scan-build | ||
path: scan-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
name: Build | ||
on: [ push ] | ||
|
||
jobs: | ||
configure: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
uid_gid: ${{ steps.get-user.outputs.uid_gid }} | ||
steps: | ||
- id: get-user | ||
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)" | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Install deps | ||
run: | | ||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | ||
make deps | ||
- run: cmake -DCMAKE_BUILD_TYPE=Debug . && make | ||
- run: GTEST_COLOR=1 ASAN_OPTIONS=detect_leaks=0 ctest -VV | ||
|
||
build_ledger: | ||
needs: configure | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zondax/builder-bolos:latest | ||
options: --user ${{ needs.configure.outputs.uid_gid }} | ||
env: | ||
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk | ||
BOLOS_ENV: /opt/bolos | ||
HOME: /home/zondax_circle | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build Standard app | ||
shell: bash -l {0} | ||
run: | | ||
source $HOME/.cargo/env | ||
make | ||
test_zemu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Test | ||
run: | | ||
id | ||
echo $HOME | ||
echo $DISPLAY | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev | ||
- name: Install rust | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y cmake binutils-dev libcurl4-openssl-dev libiberty-dev libelf-dev libdw-dev | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain none -y; | ||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.17.0' | ||
- name: Install yarn | ||
run: | | ||
npm install -g yarn | ||
- name: Build Ledger app | ||
run: | | ||
make SUBSTRATE_PARSER_FULL=1 | ||
- name: Build/Install build js deps | ||
run: | | ||
export PATH=~/.cargo/bin:$PATH | ||
make zemu_install | ||
- name: Run zemu tests | ||
run: | | ||
export PATH=~/.cargo/bin:$PATH | ||
make zemu_test | ||
build_package_0: | ||
needs: [ configure, build, build_ledger, test_zemu] | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zondax/builder-bolos:latest | ||
options: --user ${{ needs.configure.outputs.uid_gid }} | ||
env: | ||
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk | ||
BOLOS_ENV: /opt/bolos | ||
HOME: /home/zondax_circle | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Install deps | ||
run: pip install ledgerblue | ||
|
||
- name: Build NanoS | ||
shell: bash -l {0} | ||
run: | | ||
source $HOME/.cargo/env | ||
make | ||
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos.sh | ||
- name: Set tag | ||
id: nanos | ||
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos.sh version) | ||
- name: Create or Update Release (1) | ||
id: create_release_0 | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
files: ./app/pkg/installer_nanos.sh | ||
tag_name: ${{ steps.nanos.outputs.tag_name }} | ||
draft: false | ||
prerelease: false | ||
|
||
build_package_1: | ||
needs: [ configure, build, build_ledger, test_zemu ] | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zondax/builder-bolos:latest | ||
options: --user ${{ needs.configure.outputs.uid_gid }} | ||
env: | ||
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk | ||
BOLOS_ENV: /opt/bolos | ||
HOME: /home/zondax_circle | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Install deps | ||
run: pip install ledgerblue | ||
|
||
- name: Build NanoSP | ||
shell: bash -l {0} | ||
run: | | ||
source $HOME/.cargo/env | ||
make | ||
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanos_plus.sh | ||
- name: Set tag | ||
id: nanosp | ||
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_plus.sh version) | ||
- name: Update Release | ||
id: update_release_2 | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
files: ./app/pkg/installer_nanos_plus.sh | ||
tag_name: ${{ steps.nanosp.outputs.tag_name }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "deps/ledger-zxlib"] | ||
path = deps/ledger-zxlib | ||
url = https://github.com/Zondax/ledger-zxlib.git | ||
[submodule "deps/nanox-secure-sdk"] | ||
path = deps/nanox-secure-sdk | ||
url = https://github.com/LedgerHQ/nanox-secure-sdk | ||
[submodule "deps/nanosplus-secure-sdk"] | ||
path = deps/nanosplus-secure-sdk | ||
url = https://github.com/LedgerHQ/nanosplus-secure-sdk | ||
[submodule "deps/nanos-secure-sdk"] | ||
path = deps/nanos-secure-sdk | ||
url = https://github.com/LedgerHQ/nanos-secure-sdk |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.