Skip to content

Commit

Permalink
Merge pull request #1 from capsule-corp-ternoa/dev_updates
Browse files Browse the repository at this point in the history
Dev updates, first release, v1.11.0
  • Loading branch information
mohsinriaz17 authored Feb 7, 2023
2 parents 61ac031 + 582944e commit c0ab258
Show file tree
Hide file tree
Showing 1,083 changed files with 32,333 additions and 364,096 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 7 additions & 5 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: "Verify PRs to main"
name: Verify PRs to main

on:
workflow_dispatch:
pull_request:
branches:
- main
- dev

jobs:
configure:
Expand All @@ -12,7 +14,7 @@ jobs:
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
steps:
- id: get-user
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)"
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT

get_version:
needs: configure
Expand All @@ -27,7 +29,7 @@ jobs:
version: ${{ steps.store-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -38,7 +40,7 @@ jobs:
run: make version

- id: store-version
run: echo ::set-output name=version::$(cat ./app/app.version)
run: echo "version=$(cat ./app/app.version)" >> $GITHUB_OUTPUT

check_app_version:
needs: get_version
Expand All @@ -55,4 +57,4 @@ jobs:

- name: Tag exists
if: ${{ steps.checkTag.outputs.exists == 'true' }}
run: exit 1
run: exit 1
12 changes: 8 additions & 4 deletions .github/workflows/ledger.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
branches:
- main
- dev
pull_request:
branches: [main]
branches:
- main
- dev

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -19,7 +23,7 @@ jobs:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down
103 changes: 38 additions & 65 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Build
on: [ push ]
on:
workflow_dispatch:
push:
pull_request:
branches:
- main
- dev

jobs:
configure:
Expand All @@ -8,28 +14,27 @@ jobs:
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
steps:
- id: get-user
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)"
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install deps
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
make deps
brew install conan
- run: cmake -DCMAKE_BUILD_TYPE=Debug . && make
- run: GTEST_COLOR=1 ASAN_OPTIONS=detect_leaks=0 ctest -VV

build_only_rust:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install deps
Expand All @@ -50,7 +55,7 @@ jobs:
cd ./app/rust
cargo test
build_nano_S:
build_ledger:
needs: configure
runs-on: ubuntu-latest
container:
Expand All @@ -60,63 +65,35 @@ jobs:
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
outputs:
size: ${{steps.build.outputs.size}}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Build Standard app
id: build
shell: bash -l {0}
run: |
source $HOME/.cargo/env
make
SUBSTRATE_PARSER_FULL=1 make
echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
- name: Build SR25519 app
shell: bash -l {0}
run: |
source $HOME/.cargo/env
SUPPORT_SR25519=1 make
build_nano_SP:
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/nanosplus-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
build_nano_X:
needs: configure
size_nano_s:
needs: build_ledger
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanox-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
NANOS_LIMIT_SIZE: 136
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Build Standard app
shell: bash -l {0}
run: |
source $HOME/.cargo/env
make
- run: |
echo "LNS app size: ${{needs.build_ledger.outputs.size}} KiB"
[ ${{needs.build_ledger.outputs.size}} -le $NANOS_LIMIT_SIZE ]
test_zemu:
runs-on: ubuntu-latest
Expand All @@ -127,7 +104,7 @@ jobs:
echo $HOME
echo $DISPLAY
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
Expand All @@ -137,9 +114,7 @@ jobs:
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'
uses: actions/setup-node@v3
- name: Install yarn
run: |
npm install -g yarn
Expand All @@ -159,7 +134,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev
Expand All @@ -169,9 +144,7 @@ jobs:
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'
uses: actions/setup-node@v3
- name: Install yarn
run: |
npm install -g yarn
Expand All @@ -188,7 +161,7 @@ jobs:
cd tests_zemu && yarn testSR25519
build_package_0:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
needs: [configure, build, build_ledger, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand All @@ -200,7 +173,7 @@ jobs:
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install deps
Expand All @@ -213,21 +186,21 @@ jobs:
make SUBSTRATE_PARSER_FULL=0
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)
id: nanos_light
run: echo "tag_name=$(./app/pkg/installer_nanos.sh version)" >> $GITHUB_OUTPUT
- 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 }}
tag_name: ${{ steps.nanos_light.outputs.tag_name }}
draft: false
prerelease: false

build_package_1:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
needs: [configure, build, build_ledger, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand All @@ -239,7 +212,7 @@ jobs:
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install deps
Expand All @@ -253,7 +226,7 @@ jobs:
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos_xl.sh
- name: Set tag
id: nanos_xl
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_xl.sh version)
run: echo "tag_name=$(./app/pkg/installer_nanos_xl.sh version)" >> $GITHUB_OUTPUT
- name: Update Release
id: update_release_1
uses: softprops/action-gh-release@v1
Expand All @@ -266,7 +239,7 @@ jobs:
prerelease: false

build_package_2:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
needs: [configure, build, build_ledger, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand All @@ -278,7 +251,7 @@ jobs:
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install deps
Expand All @@ -292,7 +265,7 @@ jobs:
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)
run: echo "tag_name=$(./app/pkg/installer_nanos_plus.sh version)" >> $GITHUB_OUTPUT
- name: Update Release
id: update_release_2
uses: softprops/action-gh-release@v1
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ build/*
cmake-build-debug

tests_zemu/snapshots-tmp
tests_zemu/snapshots/s-pallets
tests_zemu/yarn.lock
tests_tools/target
fuzz-*.log
/scan-build
/app/doc
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
url = https://github.com/LedgerHQ/nanosplus-secure-sdk
[submodule "deps/ledger-zxlib"]
path = deps/ledger-zxlib
url = https://github.com/Zondax/ledger-zxlib.git
url = https://github.com/mohsinriaz17/ledger-zxlib.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#* limitations under the License.
#********************************************************************************
cmake_minimum_required(VERSION 3.0)
project(ledger-kusama VERSION 0.0.0)
project(ledger-ternoa VERSION 0.0.0)
enable_testing()

cmake_policy(SET CMP0025 NEW)
Expand Down
Loading

0 comments on commit c0ab258

Please sign in to comment.