mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
* ci: add zizmor * trigger ci * adjust permissions * typo * adjust * adjust * chore: auto version bump [bot] * adjust * adjust * fix * chore: auto version bump [bot] * undo bump version * fix branch --------- Co-authored-by: Thegaram <7571518+Thegaram@users.noreply.github.com>
156 lines
3.5 KiB
YAML
156 lines
3.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: # we keep this to avoid triggering `push` & `pull_request` every time we update a PR
|
|
- main
|
|
- staging
|
|
- develop
|
|
- alpha
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
jobs:
|
|
build-mock-ccc-geth: # build geth with mock circuit capacity checker
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Build
|
|
run: |
|
|
make nccc_geth
|
|
|
|
build-geth: # build geth with circuit capacity checker
|
|
if: github.event_name == 'push' # will only be triggered when pushing to main & staging & develop & alpha
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Install rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
|
|
with:
|
|
toolchain: nightly-2023-12-03
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Build
|
|
run: |
|
|
make libzkp
|
|
sudo cp ./rollup/ccc/libzkp/libzkp.so /usr/local/lib/
|
|
make geth
|
|
|
|
check:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Lint
|
|
run: |
|
|
rm -rf $HOME/.cache/golangci-lint
|
|
make lint
|
|
|
|
goimports-lint:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18.x
|
|
|
|
- name: Install goimports
|
|
run: go install golang.org/x/tools/cmd/goimports@v0.24.0
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- run: goimports -local github.com/scroll-tech/go-ethereum/ -w .
|
|
|
|
# If there are any diffs from goimports, fail.
|
|
- name: Verify no changes from goimports
|
|
run: |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
go-mod-tidy-lint:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- run: go mod tidy
|
|
|
|
# If there are any diffs from go mod tidy, fail.
|
|
- name: Verify no changes from go mod tidy
|
|
run: |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
test:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Test
|
|
run: |
|
|
make test
|
|
|
|
- name: Upload coverage report
|
|
run: bash <(curl -s https://codecov.io/bash)
|