mirror of
https://github.com/logos-storage/logos-storage-proofs.git
synced 2026-01-02 13:33:10 +00:00
adding CI build
This commit is contained in:
parent
d3487bfb5f
commit
087397bc55
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
# This workflow runs the tests for the circuits.
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- name: Cache circom
|
||||
id: cache-circom
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cargo/bin/circom
|
||||
# Since the version of circom is specified in `scripts/install-circom.sh`,
|
||||
# as long as the file doesn't change we can reuse the circom binary.
|
||||
key: ${{ runner.os }}-circom-${{ hashFiles('./scripts/install-circom.sh') }}
|
||||
- name: Install circom if not cached
|
||||
run: ./scripts/install-circom.sh
|
||||
- run: npm ci
|
||||
- name: Try build the circuits
|
||||
run: npm run build
|
||||
- name: Run the tests
|
||||
run: npm test
|
||||
11
scripts/install_circom.sh
Normal file
11
scripts/install_circom.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
circom_version=v2.1.4
|
||||
|
||||
if ! [ -x "$(command -v circom)" ]; then
|
||||
git clone https://github.com/iden3/circom.git
|
||||
cd circom
|
||||
git checkout $circom_version
|
||||
cargo build --release
|
||||
cargo install --path circom
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user