-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Deploy from CI
committed
Aug 14, 2024
0 parents
commit 236d05c
Showing
89 changed files
with
19,442 additions
and
0 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,2 @@ | ||
**/*.asm linguist-language=Rust | ||
**/*.pil linguist-language=Rust |
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,41 @@ | ||
name: Generate rust cache for PR builds | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install Rust toolchain 1.77 (with clippy and rustfmt) | ||
run: rustup toolchain install 1.77-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.77-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.77-x86_64-unknown-linux-gnu | ||
- name: Install EStarkPolygon prover dependencies | ||
run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm | ||
- name: Lint | ||
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings | ||
- name: Lint | ||
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings | ||
- name: Format | ||
run: cargo fmt --all --check --verbose | ||
- name: Build | ||
run: cargo build --all-targets --all --all-features --profile pr-tests | ||
- name: Check without Halo2 | ||
run: cargo check --all --no-default-features --profile pr-tests | ||
- name: ⚡ Save rust cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
Cargo.lock | ||
key: ${{ runner.os }}-cargo-pr-tests-${{ hashFiles('**/Cargo.lock') }} |
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,11 @@ | ||
name: Check markdown links | ||
on: [pull_request, merge_group] | ||
jobs: | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: 'no' | ||
use-verbose-mode: 'yes' |
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,43 @@ | ||
# adapted from https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions#GitHub-Pages-Deploy | ||
|
||
name: Deploy book | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # To push a branch | ||
pull-requests: write # To create a PR from that branch | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install latest mdbook | ||
run: | | ||
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | ||
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | ||
mkdir mdbook | ||
curl -sSL $url | tar -xz --directory=./mdbook | ||
echo `pwd`/mdbook >> $GITHUB_PATH | ||
- name: Deploy GitHub Pages | ||
run: | | ||
# generate cli docs and inject them into the book | ||
cargo run --package powdr-cli -- --markdown-help > book/src/cli/README.md | ||
# build the book | ||
cd book | ||
mdbook build | ||
git worktree add gh-pages | ||
git config user.name "Deploy from CI" | ||
git config user.email "" | ||
cd gh-pages | ||
# Delete the ref to avoid keeping history. | ||
git update-ref -d refs/heads/gh-pages | ||
rm -rf * | ||
mv ../book/* . | ||
git add . | ||
git commit -m "Deploy $GITHUB_SHA to gh-pages" | ||
git push --force --set-upstream origin gh-pages |
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,87 @@ | ||
name: Nightly tests | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
IS_NIGHTLY_TEST: true | ||
POWDR_GENERATE_PROOFS: "true" | ||
|
||
jobs: | ||
check_if_needs_running: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
status: ${{ steps.count.outputs.status }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Count recent commits | ||
id: count | ||
run: echo "status=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT | ||
|
||
udeps: | ||
runs-on: ubuntu-latest | ||
needs: check_if_needs_running | ||
if: needs.check_if_needs_running.outputs.status > 0 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Run cargo-udeps | ||
uses: aig787/cargo-udeps-action@v1 | ||
with: | ||
version: 'latest' | ||
args: '--all-targets' | ||
|
||
test_release: | ||
runs-on: ubuntu-latest | ||
needs: check_if_needs_running | ||
if: needs.check_if_needs_running.outputs.status > 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: ⚡ Cache rust | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.toml') }} | ||
- name: ⚡ Cache nodejs | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/pilcom/node_modules | ||
key: ${{ runner.os }}-pilcom-node-modules | ||
- name: Install Rust toolchain 1.77 | ||
run: rustup toolchain install 1.77-x86_64-unknown-linux-gnu | ||
- name: Install nightly | ||
run: rustup toolchain install nightly-2024-08-01-x86_64-unknown-linux-gnu | ||
- name: Install stdlib | ||
run: rustup component add rust-src --toolchain nightly-2024-08-01-x86_64-unknown-linux-gnu | ||
- name: Install EStarkPolygon prover dependencies | ||
run: sudo apt-get install -y nlohmann-json3-dev libpqxx-dev nasm | ||
- name: Install pilcom | ||
run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install | ||
- name: Check without Halo2 | ||
run: cargo check --all --no-default-features | ||
- name: Build | ||
run: cargo build --all --release --all-features | ||
- name: Run tests | ||
# Number threads is set to 1 because the runner does not have enough memeory for more. | ||
run: PILCOM=$(pwd)/pilcom/ cargo test --all --release --verbose --all-features -- --include-ignored --nocapture --test-threads=1 | ||
- name: Run benchmarks | ||
run: cargo bench | ||
working-directory: compiler |
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,62 @@ | ||
test(=instruction_tests::add) | | ||
test(=instruction_tests::addi) | | ||
test(=instruction_tests::amoadd_w) | | ||
test(=instruction_tests::and) | | ||
test(=instruction_tests::andi) | | ||
test(=instruction_tests::beq) | | ||
test(=instruction_tests::bge) | | ||
test(=instruction_tests::bgeu) | | ||
test(=instruction_tests::blt) | | ||
test(=instruction_tests::bltu) | | ||
test(=instruction_tests::bne) | | ||
test(=instruction_tests::divu) | | ||
test(=instruction_tests::j) | | ||
test(=instruction_tests::jal) | | ||
test(=instruction_tests::lb) | | ||
test(=instruction_tests::lbu) | | ||
test(=instruction_tests::lh) | | ||
test(=instruction_tests::lhu) | | ||
test(=instruction_tests::lrsc) | | ||
test(=instruction_tests::lw) | | ||
test(=instruction_tests::mul) | | ||
test(=instruction_tests::mulh) | | ||
test(=instruction_tests::mulhsu) | | ||
test(=instruction_tests::mulhu) | | ||
test(=instruction_tests::or) | | ||
test(=instruction_tests::ori) | | ||
test(=instruction_tests::remu) | | ||
test(=instruction_tests::rvc) | | ||
test(=instruction_tests::sb) | | ||
test(=instruction_tests::sh) | | ||
test(=instruction_tests::simple) | | ||
test(=instruction_tests::sll) | | ||
test(=instruction_tests::slli) | | ||
test(=instruction_tests::slt) | | ||
test(=instruction_tests::slti) | | ||
test(=instruction_tests::sltiu) | | ||
test(=instruction_tests::sltu) | | ||
test(=instruction_tests::srai) | | ||
test(=instruction_tests::srl) | | ||
test(=instruction_tests::srli) | | ||
test(=instruction_tests::sub) | | ||
test(=instruction_tests::sw) | | ||
test(=instruction_tests::xor) | | ||
test(=instruction_tests::xori) | | ||
test(=byte_access) | | ||
test(=dispatch_table_pie_relocation) | | ||
test(=dispatch_table_static_relocation) | | ||
test(=double_word) | | ||
test(=function_pointer) | | ||
test(=many_chunks_memory) | | ||
test(=memfuncs) | | ||
test(=password) | | ||
test(=print) | | ||
test(=runtime_affine_256) | | ||
test(=runtime_ec_add) | | ||
test(=runtime_ec_double) | | ||
test(=runtime_modmul_256) | | ||
test(=runtime_poseidon_gl) | | ||
test(=sum) | | ||
test(=trivial) | | ||
test(=two_sums_serde) | | ||
test(=zero_with_values) |
Oops, something went wrong.