Skip to content
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 #20

feat: add ci for build and zemu test

feat: add ci for build and zemu test #20

Workflow file for this run

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-18 llvm-18-dev llvm-18-tools
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-11-10
components: rust-src
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install yarn and yalc
run: |
npm install -g yarn
npm install -g yalc
- name: Install cargo ledger and deps
run: |
cargo install cargo-ledger
cargo ledger setup
- 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
yalc publish
- name: Build app
run: make build
- name: Install zemu deps
run: |
cd js
yalc add @ironfish/rust-nodejs
cd ../tests_zemu
yalc add @ironfish/rust-nodejs
cd ..
make zemu_install
- name: Run tests
run: make zemu_test