Commit 83f6e52f authored by Nicolas "Norswap" Laurent's avatar Nicolas "Norswap" Laurent Committed by norswap

update workflows to use makefile (notably checks out the submodule)

parent c5d9332c
name: Test Challenge
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,35 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Go + Node
uses: actions/checkout@v3
with:
submodules: true
- name: Install Toolchain (Go, Node.js, Yarn and Make)
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm
- name: Install unicorn
run: |
./build_unicorn.sh
echo "LIBUNICORN_PATH=$(pwd)/unicorn2/" >> $GITHUB_ENV
- name: Install yarn
run: |
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm make
npm install --global yarn
yarn install
- name: Build minigeth and run block 13284469 (builds preimage cache)
run: |
(cd minigeth/ && go build)
mkdir -p /tmp/cannon
minigeth/go-ethereum 13284469
- name: Install Python deps
run: pip3 install -r mipigo/requirements.txt
- name: Build minigeth for embedded
run: |
cd mipigo
./build.sh
- name: Build mipsevm
run: |
cd mipsevm
go build
- name: Generate golden and checkpoints for 13284469
run: mipsevm/mipsevm && mipsevm/mipsevm 13284469
- name: Build
run: make unicorn minigeth_mips minigeth_default_arch mipsevm yarn
- name: Run test challenge
run: npx hardhat test test/challenge_test.js
run: make test_challenge
name: Test Challenge Fault
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,7 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install Toolchain (Go, Node.js, Yarn and Make)
run: |
sudo apt-get update
......
name: Test Challenge Simple
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,7 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Install Toolchain (Go, Node.js, Yarn and Make)
run: |
sudo apt-get update
......
name: Test Contracts
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,14 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Node
uses: actions/checkout@v3
- name: Install Toolchain (Node, Yarn and Make)
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install nodejs npm
- name: Install yarn
run: |
sudo apt-get -y --no-install-recommends install nodejs npm make
npm install --global yarn
yarn install
- name: Install Dependencies
run: make yarn
- name: Hardhat Test
run: npx hardhat test
run: make test_contracts
name: Test minigeth
name: Test Minigeth
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,20 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Go
uses: actions/checkout@v3
with:
submodules: true
- name: Install Toolchain (Go & Make)
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install golang-1.16
sudo apt-get -y --no-install-recommends install golang-1.16 make
- name: Build minigeth
run: |
(cd minigeth/ && go build)
mkdir -p /tmp/cannon
- name: Test block 13284491 (0 tx)
run: minigeth/go-ethereum 13284491
- name: Test block 13284469 (few tx)
run: minigeth/go-ethereum 13284469
- name: Test block 13284053 (deletion)
run: minigeth/go-ethereum 13284053
- name: Test block 13303075 (uncles)
run: minigeth/go-ethereum 13303075
run: make minigeth_default_arch
- name: Test Minigeth
run: make test_minigeth
name: Test MIPS EVM
on: push
on: [push, pull_request]
jobs:
unit:
......@@ -8,32 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Go + Node
uses: actions/checkout@v3
with:
submodules: true
- name: Install Toolchain (Go, Node, Yarn & Make)
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm
- name: Install unicorn
run: |
./build_unicorn.sh
echo "LIBUNICORN_PATH=$(pwd)/unicorn2/" >> $GITHUB_ENV
- name: Install yarn
run: |
sudo apt-get -y --no-install-recommends install golang-1.16 nodejs npm make
npm install --global yarn
yarn install
- name: Hardhat Compile
run: npx hardhat compile
- name: Build minigeth and run blocks 13284469 and 13284491
run: |
(cd minigeth/ && go build)
mkdir -p /tmp/cannon
minigeth/go-ethereum 13284469
minigeth/go-ethereum 13284491
- name: Install Python deps
run: pip3 install -r mipigo/requirements.txt
- name: Build minigeth for embedded
run: |
cd mipigo
./build.sh
- name: All MIPS EVM tests
run: cd mipsevm && go test -v
- name: Build
run: make build
- name: Test MIPS EVM
run: make test_mipsevm
build: unicorn submodules minigeth_mips minigeth_default_arch mipsevm contracts
yarn
SHELL := /bin/bash
build: unicorn submodule minigeth_mips minigeth_default_arch mipsevm contracts
unicorn:
./build_unicorn.sh
submodules:
git submodule init
git submodule update
submodule:
# CI will checkout submodules on its own (and fails on these commands)
if [[ -z "$$GITHUB_ENV" ]]; then \
git submodule init; \
git submodule update; \
fi
minigeth_mips:
cd mipigo && ./build.sh
......@@ -17,10 +21,12 @@ minigeth_default_arch:
mipsevm:
cd mipsevm && go build
contracts:
yarn
contracts: yarn
npx hardhat compile
yarn:
yarn install
define clear_cache
rm -rf /tmp/cannon
mkdir -p /tmp/cannon
......@@ -71,5 +77,5 @@ mrproper: clean
rm -rf node_modules
rm -rf mipigo/venv
.PHONY: build unicorn submodules minigeth_mips minigeth_default_arch mipsevm contracts \
clean mrproper test_challenge test_mipsevm test_minigeth test
.PHONY: build unicorn submodule minigeth_mips minigeth_default_arch mipsevm contracts \
yarn clean mrproper test_challenge test_mipsevm test_minigeth test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment