Skip to content
Draft

EVM #11

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 58 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push]

env:
GO_VERSION: 1.24
RUST_VERSION: stable
RETENTION-DAYS: 1

jobs:
Expand All @@ -15,8 +16,30 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: build
- name: build (without FFI)
run: make build

build-with-ffi:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rootchain/consensus/zkverifier/sp1-verifier-ffi
rootchain/consensus/zkverifier/light-client-verifier-ffi
- name: build (with FFI)
run: make build-with-ffi
test:
runs-on: ubuntu-latest
steps:
Expand All @@ -25,9 +48,9 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: vet
- name: vet (without FFI)
run: go vet ./...
- name: test
- name: test (without FFI)
run: make test
- name: upload test coverage
uses: actions/upload-artifact@v4
Expand All @@ -36,6 +59,38 @@ jobs:
path: test-coverage.out
retention-days: ${{ env.RETENTION-DAYS }}

test-with-ffi:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rootchain/consensus/zkverifier/sp1-verifier-ffi
rootchain/consensus/zkverifier/light-client-verifier-ffi
- name: Build Rust FFI libraries
run: make build-rust-ffi
- name: vet (with FFI)
run: go vet -tags zkverifier_ffi ./...
- name: test (with FFI)
run: make test ZKVERIFIER_FFI=1
- name: upload test coverage (with FFI)
uses: actions/upload-artifact@v4
with:
name: test-coverage-ffi
path: test-coverage.out
retention-days: ${{ env.RETENTION-DAYS }}

analyze:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
.DS_Store
build/

# rust
target/
Cargo.lock
*.pdb
config.toml

# Test artifacts
test-coverage.out
test-coverage-cobertura.xml
Expand Down
Loading
Loading