Skip to content
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

ci: several housekeeping changes #68

Merged
merged 9 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 31 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,46 @@ jobs:
working_directory: ~/superchain-registry/
executor:
name: go/default # is based on cimg/go
tag: '1.20'
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- run: golangci-lint run superchain validation
golang-modules-tidy:
working_directory: ~/superchain-registry
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- run:
name: tidy superchain module
command: go mod tidy
working_directory: superchain
- run:
name: tidy validation module
command: go mod tidy
working_directory: validation
- run:
name: check git tree is clean
command: git diff --exit-code
golang-test:
working_directory: ~/superchain-registry/
working_directory: ~/superchain-registry
executor:
name: go/default # is based on cimg/go
tag: '1.20'
tag: '1.21'
steps:
- checkout:
path: ~/superchain-registry
- go/load-cache
- go/mod-download
- go/save-cache
- go/test:
packages: ./superchain/...
covermode: atomic
failfast: true
race: true
- go/test:
packages: ./validation/...
covermode: atomic
failfast: true
race: true
- run:
name: run superchain module tests
command: go test ./... -v
working_directory: superchain
- run:
name: run validation module tests
command: go test ./... -v
working_directory: validation
publish-bot:
environment:
NODE_AUTH_TOKEN: $NPM_TOKEN # Use NPM_TOKEN as the auth token
Expand Down Expand Up @@ -97,6 +111,7 @@ workflows:
main:
jobs:
- golang-lint
- golang-modules-tidy
- golang-test
- check-codegen
- check-forge-fmt
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ docs/
.env*
!.env.example
*.log


# Go workspaces checksum file
go.work.sum
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ The superchain configs are made available in minimal form, to embed in OP-Stack
Full deployment artifacts and genesis-states can be derived from the minimal form
using the reference [`op-chain-ops`] tooling.

The `semver.yaml` file represents the semantic versioning lockfile for the all of the smart contracts in the superchain.
The `semver.yaml` files each represent the semantic versioning lockfile for the all of the smart contracts in that superchain.
It is meant to be used when building transactions that upgrade the implementations set in the proxies.

## Go Module
If you would like to contribute a new chain or superchain, please see our [contributing guide](./CONTRIBUTING.md).

## Superchain Go Module

Superchain configs can be imported as Go-module:
```
Expand All @@ -26,6 +28,10 @@ See [`op-chain-ops`] for config tooling and
[`op-chain-ops`]: https://github.com/ethereum-optimism/optimism/tree/develop/op-chain-ops
[`op-bindings`]: https://github.com/ethereum-optimism/optimism/tree/develop/op-bindings


## Validation Go Module
A second module exists in this repo whose purpose is to validate the config exported by the `superchain` module. It is a separate module to avoid import cycles and polluting downstream dependencies with things like `go-ethereum` (which is used in the validation tests). The modules are tracked by a top level `go.work` file. The associated `go.work.sum` file is gitignored and not important to typical workflows, which should mirror those of the [CI configuration](.circleci/config.yml).

## CheckSecurityConfigs

The `CheckSecurityConfigs.s.sol` script is used in CI to perform
Expand Down
Loading
Loading