forked from LedgerHQ/app-plugin-paraswap
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #15 from LedgerHQ/master
Feat: Sync Back Repo
- Loading branch information
Showing
8 changed files
with
152 additions
and
69 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 |
---|---|---|
@@ -1,95 +1,141 @@ | ||
name: Compilation & tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
job_build_debug_nano_s: | ||
name: Build debug Nano S | ||
runs-on: ubuntu-latest | ||
job_build_release_plugin: | ||
name: Build release plugin | ||
strategy: | ||
matrix: | ||
include: | ||
- sdk: "$NANOS_SDK" | ||
name: "nanos" | ||
- sdk: "$NANOX_SDK" | ||
name: "nanox" | ||
- sdk: "$NANOSP_SDK" | ||
name: "nanosp" | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build plugin for Nano S | ||
- name: Build | ||
run: | | ||
make clean | ||
make DEBUG=1 BOLOS_SDK=$NANOS_SDK | ||
mv bin/app.elf plugin_nanos.elf | ||
make BOLOS_SDK=${{ matrix.sdk }} -j | ||
- name: Upload plugin artifact for Nano S | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: plugin-artifacts | ||
path: ./plugin_nanos.elf | ||
job_build_debug_plugin: | ||
name: Build debug plugin | ||
strategy: | ||
matrix: | ||
include: | ||
- sdk: "$NANOS_SDK" | ||
name: "nanos" | ||
- sdk: "$NANOX_SDK" | ||
name: "nanox" | ||
- sdk: "$NANOSP_SDK" | ||
name: "nanosp" | ||
|
||
job_build_debug_nano_x: | ||
name: Build debug Nano X | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build plugin for Nano X | ||
- name: Build | ||
run: | | ||
make DEBUG=1 BOLOS_SDK=${{ matrix.sdk }} -j | ||
- name: Rename binary | ||
run: | | ||
make clean | ||
make DEBUG=1 BOLOS_SDK=$NANOX_SDK | ||
mv bin/app.elf plugin_nanox.elf | ||
mv bin/app.elf plugin_${{ matrix.name }}.elf | ||
- name: Upload plugin artifact for Nano x | ||
uses: actions/upload-artifact@v2 | ||
- name: Upload binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: plugin-artifacts | ||
path: ./plugin_nanox.elf | ||
name: binaries | ||
path: plugin_${{ matrix.name }}.elf | ||
|
||
job_build_debug_app: | ||
name: Build debug Ethereum app | ||
strategy: | ||
matrix: | ||
include: | ||
- sdk: "$NANOS_SDK" | ||
name: "nanos" | ||
- sdk: "$NANOX_SDK" | ||
name: "nanox" | ||
- sdk: "$NANOSP_SDK" | ||
name: "nanosp" | ||
|
||
jobs-e2e-tests: | ||
needs: [job_build_debug_nano_s, job_build_debug_nano_x] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest | ||
|
||
steps: | ||
- name: Test | ||
- name: Checkout app-ethereum | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: LedgerHQ/app-ethereum | ||
ref: ${{ ((github.base_ref || github.ref_name) == 'main' && 'master') || (github.base_ref || github.ref_name) }} | ||
|
||
- name: Build | ||
run: | | ||
id | ||
echo $HOME | ||
echo $DISPLAY | ||
make DEBUG=1 BYPASS_SIGNATURES=1 BOLOS_SDK=${{ matrix.sdk }} -j | ||
- name: Rename binary | ||
run: | | ||
mv bin/app.elf ethereum_${{ matrix.name }}.elf | ||
- name: Upload binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: ethereum_${{ matrix.name }}.elf | ||
|
||
jobs-e2e-tests: | ||
name: E2E Tests | ||
needs: [job_build_debug_plugin, job_build_debug_app] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download built binaries | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: binaries | ||
path: tests/elfs/ | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14.4.0" | ||
node-version: "16.19.0" | ||
|
||
- name: Install yarn | ||
run: | | ||
npm install -g yarn | ||
- name: Build/Install build js deps | ||
- name: Install JS deps | ||
run: | | ||
cd tests && yarn install | ||
- name: Download plugin artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: tests/elfs | ||
- name: Copy plugin artifacts | ||
run: | | ||
mv tests/elfs/plugin-artifacts/*.elf tests/elfs | ||
- name: Run zemu tests | ||
- name: Run Zemu tests | ||
run: | | ||
cd tests && yarn test |
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
Submodule ethereum-plugin-sdk
updated
3 files
+21 −0 | include/eth_internals.c | |
+6 −2 | include/eth_internals.h | |
+2 −1 | include/eth_plugin_interface.h |
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
Binary file not shown.
Binary file not shown.