This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
feat: add ci for build and zemu test #34
Workflow file for this run
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
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
branches: | |
- main | |
- develop | |
- master # for safety reasons | |
- dev # for safety reasons | |
jobs: | |
configure: | |
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} | |
outputs: | |
uid_gid: ${{ steps.get-user.outputs.uid_gid }} | |
steps: | |
- id: get-user | |
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT | |
build_ledger: | |
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ | |
libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ | |
libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev \ | |
clang gcc-arm-none-eabi gcc-multilib llvm-dev llvm | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2023-11-10 | |
components: rust-src | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install yarn | |
run: | | |
npm install -g yarn | |
- name: Install ledger deps | |
run: | | |
cargo install cargo-ledger | |
cargo ledger setup | |
pip install ledgerwallet | |
- name: Checkout and build ironfish repo | |
run: | | |
git clone https://github.com/iron-fish/ironfish.git | |
cd ironfish | |
git fetch --all | |
git checkout -b feat/hughy/make-test-witness origin/feat/hughy/make-test-witness | |
yarn install | |
cd ironfish-rust-nodejs | |
yarn link | |
- name: Build app | |
run: | | |
export PATH=/home/runner/.local/bin:$PATH | |
make build | |
- name: Install zemu deps | |
run: | | |
cd js | |
yarn unlink @ironfish/rust-nodejs | |
yarn link @ironfish/rust-nodejs | |
cd ../tests_zemu | |
yarn unlink @ironfish/rust-nodejs | |
yarn link @ironfish/rust-nodejs | |
cd .. | |
make zemu_install | |
- name: Run tests | |
run: make zemu_test |