Add offset validation and remove unnecessary code per code review #591
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: AsteriscCI | |
on: [push] | |
jobs: | |
rvgo-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.x' | |
- name: Build rvsol | |
run: forge build | |
working-directory: rvsol | |
- name: Build rv64g test binaries | |
run: make bin bin/simple bin/minimal | |
working-directory: tests/go-tests | |
- name: Run tests | |
run: go test -v ./rvgo/... -coverprofile=coverage.out -coverpkg=./rvgo/... | |
- name: Fuzz | |
run: make fuzz | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
rvsol-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
- name: Build FFI | |
run: go build | |
working-directory: rvgo/scripts/go-ffi | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run foundry tests | |
run: forge test -vvv --ffi | |
working-directory: rvsol | |
rvsol-lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run lint | |
run: make lint-check | |
working-directory: rvsol | |
rvgo-lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
cache: false | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest | |
check-optimism-version-match: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Submodule update | |
run: git submodule update --init | |
- name: Install Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
- name: Check if optimism submodule version matches go.mod version | |
run: ./.github/scripts/check_versions.sh | |
op-program-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Submodule update | |
run: git submodule update --init | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
- name: Build asterisc | |
run: make build-rvgo && cp rvgo/bin/asterisc tests/op-program-test/ | |
- name: Build op-program | |
run: make -C rvsol/lib/optimism/op-program op-program-host && cp rvsol/lib/optimism/op-program/bin/op-program tests/op-program-test/ | |
- name: Run op-program | |
run: tar -xzvf ./test-data.tar.gz && ./local_cmd.sh | |
working-directory: tests/op-program-test | |
rvgo-abigen: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install justfile | |
uses: extractions/setup-just@v2 | |
with: | |
just-version: '1.28.0' | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Cache geth alltools | |
id: cache-geth | |
uses: actions/cache@v4 | |
with: | |
path: geth-alltools-linux-amd64-1.14.9-c350d3ac.tar.gz | |
key: ${{ runner.os }}-geth-alltools-linux-amd64-1.14.9-c350d3ac | |
- name: Download geth alltools if not cached | |
if: steps.cache-geth.outputs.cache-hit != 'true' | |
run: | | |
wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.14.9-c350d3ac.tar.gz | |
echo "834879bda2a2f10b6bfd60023872f8fe geth-alltools-linux-amd64-1.14.9-c350d3ac.tar.gz" | md5sum -c - | |
- name: Install abigen | |
run: | | |
tar -xvf geth-alltools-linux-amd64-1.14.9-c350d3ac.tar.gz | |
sudo mv geth-alltools-linux-amd64-1.14.9-c350d3ac/abigen /usr/local/bin/ | |
- name: Build rvsol | |
run: forge build | |
working-directory: rvsol | |
- name: Check bindings | |
run: | | |
make gen-bindings | |
git diff --exit-code bindings | |
working-directory: rvgo |