This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
README.md: Cannon archive notice #72
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
on: [push, pull_request] | |
name: Cannon Test | |
permissions: | |
contents: read | |
jobs: | |
cannon-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.x | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: unicorn commit hash | |
working-directory: ./diffmips/unicorn | |
run: | | |
git rev-parse HEAD > /tmp/unicorn-commit-hash.txt | |
- name: cached libunicorn | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./diffmips/unicorn/build | |
key: | |
unicorn-build-{{ hashFiles('/tmp/unicorn-commit-hash.txt') }} | |
restore-keys: | | |
unicorn-build-{{ hashFiles('/tmp/unicorn-commit-hash.txt') }} | |
- name: install libunicorn | |
working-directory: ./diffmips | |
run: make libunicorn | |
- uses: actions/cache@v3 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
~\AppData\Local\go-build | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: main golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.53.3 | |
working-directory: ./ | |
skip-cache: true # we already have go caching | |
args: --timeout=3m | |
- name: unicorntest golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.53.3 | |
working-directory: ./diffmips/unicorntest | |
skip-cache: true # we already have go caching | |
args: --timeout=3m | |
- name: Build examples | |
working-directory: ./example | |
run: make elf | |
- name: build contracts | |
working-directory: ./contracts | |
run: forge build | |
- name: mipsevm tests | |
working-directory: ./mipsevm | |
run: go test ./... | |
- name: diffmips tests | |
working-directory: ./diffmips/unicorntest | |
run: go test ./... |