Skip to content

Add CI

Add CI #6

Workflow file for this run

name: CI
on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Run cargo check
run: cargo check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run clippy
run: make clippy
test:
name: Test (Ubuntu)
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Setupthe development node
run: make setup
- name: Run the development node
run: make run
- name: Run ecAdd tests
run: make test PRECOMPILE=ecadd
- name: Run ecMul tests
run: make test PRECOMPILE=ecmul
- name: Run modexp tests
run: make test PRECOMPILE=modexp