Skip to content

Merge pull request #4 from EYBlockchain/livesey/fully-collapse #5

Merge pull request #4 from EYBlockchain/livesey/fully-collapse

Merge pull request #4 from EYBlockchain/livesey/fully-collapse #5

Workflow file for this run

name: CI checks
on:
pull_request:
push:
branches:
- main
- next
jobs:
download-srs:
runs-on: ubuntu-latest
outputs:
srs-cache-hit: ${{ steps.cache-srs.outputs.cache-hit }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Restore SRS from cache
id: restore-srs
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: zk_stdlib/examples/assets/bls_filecoin_2p19
key: fixed-srs-cache
- name: Download SRS if not cached
if: steps.restore-srs.outputs.cache-hit != 'true'
run: |
mkdir -p zk_stdlib/examples/assets
curl -L -o zk_stdlib/examples/assets/bls_filecoin_2p19 \
https://midnight-s3-fileshare-dev-eu-west-1.s3.eu-west-1.amazonaws.com/bls_filecoin_2p19
test-blstrs:
if: github.event.pull_request.draft == false
name: Test blstrs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/cargo-test
with:
package: midnight-curves
args: --release --all-features
test-circuits:
if: github.event.pull_request.draft == false
name: Test circuits
runs-on: ubuntu-latest-16-core-x64
env:
RUST_BACKTRACE: full
RUSTFLAGS: --cfg ci_build
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- run: cargo tree -e features -p midnight-curves
- uses: ./.github/actions/cargo-test
with:
package: midnight-circuits
args: --release
test-zk-stdlib:
needs: download-srs
if: github.event.pull_request.draft == false
name: Test zk-stdlib
runs-on: ubuntu-latest-16-core-x64
env:
RUST_BACKTRACE: full
RUSTFLAGS: --cfg ci_build
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Restore SRS from cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: zk_stdlib/examples/assets/bls_filecoin_2p19
key: fixed-srs-cache
- uses: ./.github/actions/cargo-test
with:
package: midnight-zk-stdlib
args: --release -- --skip serialization
- uses: ./.github/actions/cargo-test
with:
package: midnight-zk-stdlib
args: --release --test serialization -- --test-threads=1
test-vk-consistency:
needs: download-srs
if: github.event.pull_request.draft == false
name: Test VK consistency
runs-on: ubuntu-latest-16-core-x64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Restore SRS from cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: zk_stdlib/examples/assets/bls_filecoin_2p19
key: fixed-srs-cache
- uses: ./.github/actions/cargo-test
with:
package: midnight-zk-stdlib
args: --release -- --ignored
- name: Check for changes in goldenfiles/examples.
run: |
if ! git diff --quiet -- zk_stdlib/goldenfiles/examples; then
echo "Files in zk_stdlib/goldenfiles/examples have changed"
echo "Run "cargo test --release -- --ignored" locally and commit the changes"
git diff -- zk_stdlib/goldenfiles/examples
exit 1
else
echo "No changes in goldenfiles/examples"
fi
test-proofs:
if: github.event.pull_request.draft == false
name: Test proofs
runs-on: ubuntu-latest
steps:
- name: Install libfontconfig1-dev
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/cargo-test
with:
package: midnight-proofs
args: --release
test-aggregation:
if: github.event.pull_request.draft == false
name: Test Aggregation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/cargo-test
with:
package: midnight-aggregation
args: --release --all-features
test-zkir:
if: github.event.pull_request.draft == false
name: Test ZKIR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./.github/actions/cargo-test
with:
package: midnight-zkir
args: --release --all-features
doc-links:
if: github.event.pull_request.draft == false
name: Intra-doc links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: 'Install rust-toolchain.toml'
run: rustup toolchain install
- name: cargo fetch
run: cargo fetch
# Ensure intra-documentation links all resolve correctly
# Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- name: Check intra-doc links
run: cargo doc --workspace --document-private-items --no-deps
fmt:
if: github.event.pull_request.draft == false
name: Rustfmt
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: dtolnay/rust-toolchain@nightly
- run: rustup component add rustfmt --toolchain nightly
- run: cargo +nightly fmt --all -- --check
clippy:
if: github.event.pull_request.draft == false
name: Clippy
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: 'Install rust-toolchain.toml'
run: rustup toolchain install
# font required for benchmarking charts generation
- name: Install libfontconfig1-dev
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Run Clippy
if: always()
run: cargo clippy --all-targets --all-features -- -Dwarnings
- name: Run Clippy on `aggregation`
if: always()
run: cargo clippy -p midnight-aggregation --all-targets --all-features -- -Dwarnings