Use elfs from CI in tests (#167)
* Add Nano X build * Use CI's build artifacts for CI's tests
This commit is contained in:
83
.github/workflows/ci-workflow.yml
vendored
83
.github/workflows/ci-workflow.yml
vendored
@@ -3,18 +3,18 @@ name: Compilation & tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
|
||||
jobs:
|
||||
job_build_debug:
|
||||
name: Build debug
|
||||
job_build_debug_nano_s:
|
||||
name: Build debug Nano S
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:2.0.0-1
|
||||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
@@ -24,21 +24,86 @@ jobs:
|
||||
|
||||
- name: Build an altcoin
|
||||
run: |
|
||||
make DEBUG=1 CHAIN=ethereum_classic
|
||||
make DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic
|
||||
|
||||
- name: Upload altcoin binary
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ethereum-classic-app-debug
|
||||
name: ethereum_classic_nanos
|
||||
path: bin
|
||||
|
||||
- name: Build Ethereum
|
||||
run: |
|
||||
make clean
|
||||
make DEBUG=1
|
||||
make DEBUG=1 ALLOW_DATA=1
|
||||
|
||||
- name: Upload app binary
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ethereum-app-debug
|
||||
name: ethereum_nanos
|
||||
path: bin
|
||||
|
||||
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
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build an altcoin Nano X
|
||||
run: |
|
||||
make clean
|
||||
make BOLOS_SDK=$NANOX_SDK DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic
|
||||
|
||||
- name: Upload altcoin binary
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ethereum_classic_nanox
|
||||
path: bin
|
||||
|
||||
- name: Build Ethereum Nano X
|
||||
run: |
|
||||
make clean
|
||||
make BOLOS_SDK=$NANOX_SDK DEBUG=1 ALLOW_DATA=1
|
||||
|
||||
- name: Upload app binary
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ethereum_nanox
|
||||
path: bin
|
||||
|
||||
jobs-e2e-tests:
|
||||
needs: [job_build_debug_nano_s, job_build_debug_nano_x]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Test
|
||||
run: |
|
||||
id
|
||||
echo $HOME
|
||||
echo $DISPLAY
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14.4.0"
|
||||
- name: Install yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
- name: Build/Install build js deps
|
||||
run: |
|
||||
cd tests && yarn install
|
||||
- name: Download app binaries
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: tests/elfs
|
||||
- name: Run zemu tests
|
||||
run: |
|
||||
cd tests && yarn test
|
||||
|
||||
35
.github/workflows/e2e-tests.yml
vendored
35
.github/workflows/e2e-tests.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: End-to-end tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
e2e-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Test
|
||||
run: |
|
||||
id
|
||||
echo $HOME
|
||||
echo $DISPLAY
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.4.0'
|
||||
- name: Install yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
- name: Build/Install build js deps
|
||||
run: |
|
||||
cd tests && yarn install
|
||||
- name: Run zemu tests
|
||||
run: |
|
||||
cd tests && yarn test
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,8 +15,8 @@ const sim_options_nanox = {
|
||||
};
|
||||
|
||||
const Resolve = require("path").resolve;
|
||||
const NANOS_ELF_PATH = Resolve("elfs/ethereum_nanos.elf");
|
||||
const NANOX_ELF_PATH = Resolve("elfs/ethereum_nanox.elf");
|
||||
const NANOS_ELF_PATH = Resolve("elfs/ethereum_nanos/app.elf");
|
||||
const NANOX_ELF_PATH = Resolve("elfs/ethereum_nanox/app.elf");
|
||||
|
||||
const TIMEOUT = 1000000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user