From 8950ac608552f821c2f094700c6d5ae6c681b990 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Fri, 26 Jan 2024 11:45:16 -0600 Subject: [PATCH] feat: adds `zk linkcheck` to ci to prevent dead links (#870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ - Adds `zk linkcheck` to CI - Adds `zk linkcheck` to Pull request template ## Why ❔ - Prevents dead links from being introduced to repo ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`. --- .github/pull_request_template.md | 1 + .github/workflows/check-links.yml | 41 +++++++++++++++++++ .../boojum_function_check_if_satisfied.md | 2 +- docs/specs/prover/overview.md | 2 +- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-links.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 764b85baccaf..223da1507052 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,3 +19,4 @@ - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `zk spellcheck`. +- [ ] Linkcheck has been run via `zk linkcheck`. diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 000000000000..ef0dbdc12f51 --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,41 @@ +name: Check Links + +on: + push: + branches: + - main + pull_request: + merge_group: + +env: + CARGO_TERM_COLOR: always + +jobs: + linkcheck: + runs-on: [matterlabs-ci-runner] + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + with: + submodules: "recursive" + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Setup environment + run: | + echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV + echo $(pwd)/bin >> $GITHUB_PATH + echo IN_DOCKER=1 >> .env + + - name: Start services + run: | + docker compose up -d zk + + - name: Build zk + run: | + ci_run zk + + - name: Run zk linkcheck + run: | + ci_run zk linkcheck diff --git a/docs/specs/prover/boojum_function_check_if_satisfied.md b/docs/specs/prover/boojum_function_check_if_satisfied.md index 922889b90d49..48fa095637d6 100644 --- a/docs/specs/prover/boojum_function_check_if_satisfied.md +++ b/docs/specs/prover/boojum_function_check_if_satisfied.md @@ -12,7 +12,7 @@ variables circuit columns that are under PLONK copy-permutation constraints (so in programming languages), and the witness ephemeral values that can be used to prove certain constraints, for example by providing an inverse if the variable must be non-zero. -![Check_if_satisfied.png](./img/boojum_function_check_if_satisfied/check_if_satisfied.png) +![Check_if_satisfied.png](./img/boojum_function_check_if_satisfied/Check_if_satisfied.png) Next we prepare a view. Instead of working with all of the columns at once, it can be helpful to work with only a subset. diff --git a/docs/specs/prover/overview.md b/docs/specs/prover/overview.md index a6025e23bb89..a7f814a458a8 100644 --- a/docs/specs/prover/overview.md +++ b/docs/specs/prover/overview.md @@ -1,7 +1,7 @@ # Intro to zkSync’s ZK This page is specific to our cryptography. For a general introduction, please read: -[https://docs.zksync.io/userdocs/intro/#introduction](https://docs.zksync.io/userdocs/intro/#introduction) +[https://docs.zksync.io/build/developer-reference/rollups.html](https://docs.zksync.io/build/developer-reference/rollups.html) As a ZK rollup, we want everything to be verified by cryptography and secured by Ethereum. The power of ZK allows for transaction compression, reducing fees for users while inheriting the same security.