Skip to content

Commit

Permalink
Merge branch 'succinctlabs:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
PayneJoe authored Jan 12, 2025
2 parents a9eb454 + dbe622a commit 4a06fa3
Show file tree
Hide file tree
Showing 230 changed files with 31,081 additions and 6,503 deletions.
6 changes: 2 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Note: this is only compatible with Linux runners.

name: Test setup
name: Setup
description: "Setup the environment for the CI"
inputs:
pull_token:
description: "Token to use for private repo access"
Expand Down Expand Up @@ -101,6 +102,3 @@ runs:
else
echo "pkg-config and libssl-dev are already installed."
fi
- name: Set up Docker
uses: docker/setup-buildx-action@v3
119 changes: 24 additions & 95 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,121 +5,50 @@ name: book

on:
push:
branches: [main]
branches: [dev]
pull_request:
branches: [main]
branches: [dev]
paths:
- "book/**"
merge_group:

jobs:
# test:
# runs-on: ubuntu-latest
# name: test
# timeout-minutes: 60

# steps:
# - uses: actions/checkout@v4

# - name: Install mdbook
# run: |
# mkdir mdbook
# curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
# echo $(pwd)/mdbook >> $GITHUB_PATH

# - name: Install mdbook-template
# run: |
# mkdir mdbook-template
# curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
# echo $(pwd)/mdbook-template >> $GITHUB_PATH

# - name: Run tests
# run: mdbook test

lint:
runs-on: ubuntu-latest
name: lint
timeout-minutes: 60

steps:
- uses: actions/checkout@v4

- name: Install mdbook-linkcheck
run: |
mkdir mdbook-linkcheck
curl -sSL -o mdbook-linkcheck.zip https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip
unzip mdbook-linkcheck.zip -d ./mdbook-linkcheck
chmod +x $(pwd)/mdbook-linkcheck/mdbook-linkcheck
echo $(pwd)/mdbook-linkcheck >> $GITHUB_PATH
- name: Run linkcheck
run: mdbook-linkcheck --standalone
defaults:
run:
working-directory: book

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo $(pwd)/mdbook >> $GITHUB_PATH
- name: Install mdbook-template
run: |
mkdir mdbook-template
curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template
echo $(pwd)/mdbook-template >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build book
run: mdbook build
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: book/package-lock.json

# - name: Build docs
# run: cargo docs
# env:
# # Keep in sync with ./ci.yml:jobs.docs
# RUSTDOCFLAGS:
# --cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page
# -Zunstable-options
- name: Install dependencies
run: npm ci

# - name: Move docs to book folder
# run: |
# mv target/doc target/book/docs
- name: Create New Code Refrences
run: chmod +x gen-code-refs.sh && ./gen-code-refs.sh

- name: Archive artifact
shell: sh
run: |
chmod -c -R +rX "target/book" |
while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "target/book" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
- name: Build website
run: npm run build

- name: Upload artifact
uses: actions/upload-artifact@v4
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error
path: book/build

deploy:
# Only deploy if a push to main
if: github.ref_name == 'main' && github.event_name == 'push'
if: github.ref_name == 'dev' && github.event_name == 'push'
runs-on: ubuntu-latest
needs: [lint, build]
needs: [build]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:

check:
name: Cargo Check
runs-on: [runs-on, runner=16cpu-linux-x64, disk=medium, "run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=16cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
- name: Run cargo prove new
run: |
cargo prove new fibonacci --version dev --evm
cargo prove new fibonacci --evm --version dev
- name: Build program and run script
run: |
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test deployment

on:
pull_request:
branches: [dev]

defaults:
run:
working-directory: book

jobs:
test-deploy:
name: Test doc build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: book/package-lock.json

- name: Install dependencies
run: npm ci

- name: Test build website
run: npm run build
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pgo-data.profdata
**/proof-with-io.bin
**/program.bin
**/stdin.bin
**/node_modules

# Example fibonacci groth16 / plonk proofs
examples/fibonacci/fibonacci-groth16.bin
Expand All @@ -40,4 +41,11 @@ crates/prover/trusted-setup
crates/prover/vk

# Example legacy elf
examples/elf
examples/elf

# Example fibonacci groth16 / plonk proofs
examples/fibonacci/fibonacci-groth16.bin
examples/fibonacci/fibonacci-plonk.bin

# C++
.vscode/c_cpp_properties.json
21 changes: 20 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,25 @@ changes that are split across multiple commits.
That said, if you have a number of commits that are "checkpoints" and don't represent a single logical change, please
squash those together.

**Conventional Commit Messages and PR Titles:**
To ensure consistency and aid in automated tooling (such as changelog generation), please follow the
[Conventional Commits](https://www.conventionalcommits.org/) style for commit messages and PR titles. Prefix your commit
messages and PR titles with one of the following types:

- **feat:** for new features
- **fix:** for bug fixes
- **docs:** for documentation-only changes
- **refactor:** for code changes that neither fix a bug nor add a feature
- **chore:** for changes to the build process or auxiliary tools
- **test:** for adding or updating tests

For example:
- `docs: Update README with corrected links`
- `fix: Resolve race condition in event loop`

If your pull request title does not contain a valid prefix, automated checks may fail. You can amend your commit and
force-push to correct this before merging.

#### Opening the pull request

From within GitHub, opening a new pull request will present you with a template that should be filled out. Please try
Expand Down Expand Up @@ -162,4 +181,4 @@ _Adapted from the [Reth contributing guide](https://raw.githubusercontent.com/pa

[mcve]: https://stackoverflow.com/help/mcve

[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment
[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Loading

0 comments on commit 4a06fa3

Please sign in to comment.