-
Notifications
You must be signed in to change notification settings - Fork 518
docs: update README.md #1712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update README.md #1712
Changes from all commits
9b4d00a
77ad9a3
7141fbb
bdf0312
44a69e4
b450755
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,14 +27,10 @@ jobs: | |
| go-version: ${{ env.GO_VERSION }} | ||
| cache: true | ||
|
|
||
| - name: install deps | ||
| run: | | ||
| go install golang.org/x/tools/cmd/goimports@${{ env.GOIMPORTS_VERSION }} | ||
| go install github.com/klauspost/asmfmt/cmd/asmfmt@${{ env.ASMFMT_VERSION }} | ||
| - name: gofmt | ||
| run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi | ||
| - name: goimports | ||
| run: if [[ -n $(goimports -l .) ]]; then echo "please run goimports"; exit 1; fi | ||
| run: if [[ -n $(go tool goimports -l .) ]]; then echo "please run goimports"; exit 1; fi | ||
| - name: generated files should not be modified | ||
| run: | | ||
| go generate ./... | ||
|
|
@@ -67,8 +63,6 @@ jobs: | |
|
|
||
| - name: install deps | ||
| run: | | ||
| go install golang.org/x/tools/cmd/goimports@${{ env.GOIMPORTS_VERSION }} | ||
| go install github.com/klauspost/asmfmt/cmd/asmfmt@${{ env.ASMFMT_VERSION }} | ||
| go install github.com/consensys/[email protected] | ||
| go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
| sudo add-apt-repository ppa:ethereum/ethereum | ||
|
|
@@ -86,8 +80,21 @@ jobs: | |
| - name: Run tests | ||
| run: | | ||
| set -euo pipefail | ||
| go test -json -v -p 4 -short -timeout=30m ./... 2>&1 | gotestfmt -hide=all | tee /tmp/gotest.log | ||
| go test -json -v -p 4 -timeout=30m -tags=release_checks,solccheck . 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -json -v -p 4 -timeout=30m -tags=prover_checks ./test/... 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -json -v -p 4 -timeout=30m -tags=prover_checks ./examples/... 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -json -v -run=NONE -fuzz=FuzzIntcomp -fuzztime=30s ./internal/backend/ioutils 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -short -json -v -p 4 -short -timeout=30m ./... 2>&1 | gotestfmt -hide=all | tee /tmp/gotest.log | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate
|
||
| go test -short -json -v -p 4 -timeout=30m -tags=release_checks,solccheck . 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -short -json -v -p 4 -timeout=30m -tags=prover_checks ./test/... 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -short -json -v -p 4 -timeout=30m -tags=prover_checks ./examples/... 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
| go test -short -json -v -run=NONE -fuzz=FuzzIntcomp -fuzztime=10s ./internal/backend/ioutils 2>&1 | gotestfmt -hide=all | tee -a /tmp/gotest.log | ||
|
|
||
| notify: | ||
| needs: test | ||
| if: always() | ||
| uses: ./.github/workflows/slack-notifications.yml | ||
| with: | ||
| status: ${{ needs.test.result == 'success' && 'success' || 'failure' }} | ||
| actor: ${{ github.actor }} | ||
| repository: ${{ github.repository }} | ||
| branch: ${{ github.head_ref }} | ||
| run_id: ${{ github.run_id }} | ||
| secrets: | ||
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,6 @@ permissions: | |
|
|
||
| env: | ||
| GO_VERSION: 1.25.x | ||
| GOIMPORTS_VERSION: v0.42.0 | ||
| ASMFMT_VERSION: v1.3.2 | ||
|
|
||
| jobs: | ||
| staticcheck: | ||
|
|
@@ -30,14 +28,10 @@ jobs: | |
| go-version: ${{ env.GO_VERSION }} | ||
| cache: true | ||
|
|
||
| - name: install deps | ||
| run: | | ||
| go install golang.org/x/tools/cmd/goimports@${{ env.GOIMPORTS_VERSION }} | ||
| go install github.com/klauspost/asmfmt/cmd/asmfmt@${{ env.ASMFMT_VERSION }} | ||
| - name: gofmt | ||
| run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi | ||
| - name: goimports | ||
| run: if [[ -n $(goimports -l .) ]]; then echo "please run goimports"; exit 1; fi | ||
| run: if [[ -n $(go tool goimports -l .) ]]; then echo "please run goimports"; exit 1; fi | ||
| - name: generated files should not be modified | ||
| run: | | ||
| go generate ./... | ||
|
|
@@ -80,8 +74,6 @@ jobs: | |
| cache: true | ||
| - name: install deps | ||
| run: | | ||
| go install golang.org/x/tools/cmd/goimports@${{ env.GOIMPORTS_VERSION }} | ||
| go install github.com/klauspost/asmfmt/cmd/asmfmt@${{ env.ASMFMT_VERSION }} | ||
| go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
| - name: install solc deps | ||
| if: startsWith(matrix.os, 'gha-runner-scale-set-ubuntu') == true | ||
|
|
@@ -106,3 +98,16 @@ jobs: | |
| go test -v -p 4 -timeout=50m -tags=release_checks -race ./examples/cubic/... | ||
| go test -v -p 4 -timeout=50m -tags=release_checks -short -race ./test/... | ||
| go test -v -run=NONE -fuzz=FuzzIntcomp -fuzztime=30s ./internal/backend/ioutils | ||
|
|
||
| notify: | ||
| needs: test | ||
| if: always() | ||
| uses: ./.github/workflows/slack-notifications.yml | ||
| with: | ||
| status: ${{ needs.test.result == 'success' && 'success' || 'failure' }} | ||
| actor: ${{ github.actor }} | ||
| repository: ${{ github.repository }} | ||
| branch: ${{ github.ref_name }} | ||
| run_id: ${{ github.run_id }} | ||
| secrets: | ||
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: Slack Notifications | ||
|
|
||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| SLACK_BOT_TOKEN: | ||
| required: true | ||
| inputs: | ||
| status: | ||
| description: 'The status of the workflow (success or failure)' | ||
| required: true | ||
| type: string | ||
| actor: | ||
| description: 'The GitHub actor' | ||
| required: true | ||
| type: string | ||
| repository: | ||
| description: 'The GitHub repository' | ||
| required: true | ||
| type: string | ||
| branch: | ||
| description: 'The branch name' | ||
| required: true | ||
| type: string | ||
| run_id: | ||
| description: 'The workflow run ID' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| notify_slack: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Post to Slack | ||
| run: | | ||
| if [ "${{ inputs.status }}" == "success" ]; then | ||
| payload=$(jq -n --arg repository "${{ inputs.repository }}" --arg branch "${{ inputs.branch }}" --arg actor "${{ inputs.actor }}" --arg run_id "${{ inputs.run_id }}" '{ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Script injection via branch name in Slack workflowMedium Severity
Additional Locations (1) |
||
| "channel": "team-gnark-build", | ||
| "text": "GitHub Action build result: success", | ||
| "blocks": [ | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": ":large_green_circle: *All checks have passed:* *\($branch)* :white_check_mark:" | ||
| }, | ||
| }, | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| { | ||
| "type": "context", | ||
| "elements": [ | ||
| { | ||
| "type": "mrkdwn", | ||
| "text": "\($repository) -- \($actor) -- <https://github.com/\($repository)/actions/runs/\($run_id)|View details>" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }') | ||
| else | ||
| payload=$(jq -n --arg repository "${{ inputs.repository }}" --arg branch "${{ inputs.branch }}" --arg actor "${{ inputs.actor }}" --arg run_id "${{ inputs.run_id }}" '{ | ||
| "channel": "team-gnark-build", | ||
| "text": "GitHub Action build result: failure", | ||
| "blocks": [ | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": ":red_circle: *Failed run:* *\($branch)*" | ||
| }, | ||
| }, | ||
| { | ||
| "type": "context", | ||
| "elements": [ | ||
| { | ||
| "type": "mrkdwn", | ||
| "text": "\($repository) -- \($actor) -- <https://github.com/\($repository)/actions/runs/\($run_id)|View details>" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }') | ||
| fi | ||
| response=$(curl -s -X POST -H 'Content-type: application/json; charset=utf-8' --data "$payload" https://slack.com/api/chat.postMessage -H "Authorization: Bearer ${{ secrets.SLACK_BOT_TOKEN }}" ) | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| shell: bash | ||


Uh oh!
There was an error while loading. Please reload this page.