forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from privacy-scaling-explorations/purely-upstream
Purely upstream
- Loading branch information
Showing
182 changed files
with
41,833 additions
and
6,685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
timezone: Etc/UTC | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- str4d | ||
assignees: | ||
- str4d | ||
labels: | ||
- "A-CI" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Benchmarks | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
deployments: write | ||
|
||
jobs: | ||
benchmark: | ||
name: Performance regression check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: Run benchmark | ||
run: cargo bench -- --output-format bencher | tee output.txt | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: halo2 Benchmark | ||
tool: 'cargo' | ||
output-file-path: output.txt | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
auto-push: true | ||
# Show alert with commit comment on detecting possible performance regression | ||
alert-threshold: '200%' | ||
comment-on-alert: true | ||
fail-on-alert: true | ||
alert-comment-cc-users: '@str4d' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: halo2 book | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: 'latest' | ||
|
||
- name: Install mdbook-katex | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: mdbook-katex | ||
|
||
- name: Build halo2 book | ||
run: mdbook build book/ | ||
|
||
- name: Build latest rustdocs | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --no-deps --workspace --all-features | ||
env: | ||
RUSTDOCFLAGS: -Z unstable-options --enable-index-page --cfg docsrs --html-in-header ${{ github.workspace }}/halo2_proofs/katex-header.html | ||
|
||
- name: Move latest rustdocs into book | ||
run: | | ||
mkdir -p ./book/book/rustdoc | ||
mv ./target/doc ./book/book/rustdoc/latest | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./book/book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,14 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# We don't need to test across multiple platforms yet | ||
# os: [ubuntu-latest, windows-latest, macOS-latest] | ||
os: [ubuntu-latest] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -33,10 +32,11 @@ jobs: | |
- wasm32-wasi | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: Add target | ||
run: rustup target add ${{ matrix.target }} | ||
- name: cargo build | ||
|
@@ -50,27 +50,49 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: 1.56.1 | ||
override: true | ||
# Build benchmarks to prevent bitrot | ||
- name: Build benchmarks | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --benches --examples --all-features | ||
|
||
book: | ||
name: Book tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: '0.4.5' | ||
- name: Test halo2 book | ||
run: mdbook test -L target/debug/deps book/ | ||
|
||
codecov: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
# Use stable for this to ensure that cargo-tarpaulin can be built. | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-tarpaulin | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -82,19 +104,18 @@ jobs: | |
command: tarpaulin | ||
args: --all-features --timeout 600 --out Xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
uses: codecov/[email protected] | ||
|
||
doc-links: | ||
name: Intra-doc links | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: cargo fetch | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -113,10 +134,11 @@ jobs: | |
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: false | ||
toolchain: 1.56.1 | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Beta lints | ||
|
||
# These lints are only informative, so we only run them directly on branches | ||
# and not trial-merges of PRs, to reduce noise. | ||
on: push | ||
|
||
jobs: | ||
clippy-beta: | ||
name: Clippy (beta) | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: beta | ||
components: clippy | ||
override: true | ||
- name: Run Clippy (beta) | ||
uses: actions-rs/clippy-check@v1 | ||
continue-on-error: true | ||
with: | ||
name: Clippy (beta) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -W clippy::all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
Cargo.lock | ||
.vscode | ||
**/*.html | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# License | ||
|
||
Licensed under either of | ||
|
||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) | ||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
|
||
at your option. | ||
|
||
# Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally | ||
submitted for inclusion in the work by you, as defined in the Apache-2.0 | ||
license, shall be dual licensed as above, without any additional terms or | ||
conditions. | ||
|
Oops, something went wrong.