Skip to content

Zk certificate operation queue #329

Zk certificate operation queue

Zk certificate operation queue #329

Workflow file for this run

name: Build, Lint, and Test
on:
push:
branches: [main]
pull_request:
jobs:
build-lint-test:
name: Build, Lint, and Test
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)"
id: yarn-cache-dir
- name: Get Yarn version
run: echo "::set-output name=YARN_VERSION::$(yarn --version)"
id: yarn-version
- name: Cache yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --immutable
- name: cache ptau file trusted setup for testing
# using this action because the file is too large to be commited to the repo
id: ptau-cache
uses: actions/cache@v3
with:
path: ./packages/zk-certificates/circuits/pot17_final.ptau
key: 'trusted setup for testing' # can be static because it's not going to change
- if: ${{ steps.ptau-cache.outputs.cache-hit != 'true' }}
name: Download ptau file
run: wget https://galactica.com/trusted-setup/dev/pot17_final.ptau -O ./packages/zk-certificates/circuits/pot17_final.ptau
- name: cache zk circuit build
id: cache-zk-circuit-build
uses: actions/cache@v3
with:
path: |
./packages/zk-certificates/contracts/zkpVerifiers
./packages/zk-certificates/circuits/build
key: zk-circuit-cache-${{ runner.os }}-${{ hashFiles('packages/zk-certificates/circuits/*') }}
- run: yarn build
- run: yarn lint
- run: yarn test
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty after building"
exit 1
fi
# - name: Validate RC changelog
# if: ${{ startsWith(github.head_ref, 'release/') }}
# run: yarn auto-changelog validate --rc
# - name: Validate changelog
# if: ${{ !startsWith(github.head_ref, 'release/') }}
# run: yarn auto-changelog validate
all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-20.04
needs:
- build-lint-test
steps:
- run: echo "Great success!"