Skip to content

Commit

Permalink
Add build task for op-migrate command
Browse files Browse the repository at this point in the history
  • Loading branch information
ironbeer committed Apr 20, 2024
1 parent aa9cc44 commit f2dad6e
Show file tree
Hide file tree
Showing 6 changed files with 376 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- 'v*'
branches:
- op-migrate

jobs:
release:
Expand Down Expand Up @@ -38,4 +40,5 @@ jobs:
with:
files: docker-bake.hcl
set: '*.platform=linux/amd64,linux/arm64'
targets: op-migrate
push: true
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ install-geth:
go install -v github.com/ethereum/go-ethereum/cmd/geth@$(shell cat .gethrc); \
echo "Installed geth!"; true)
.PHONY: install-geth

op-migrate:
make -C ./op-chain-ops op-migrate
.PHONY: op-migrate
17 changes: 17 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ variable "OP_PROPOSER_VERSION" {
default = "${GIT_VERSION}"
}

variable "OP_MIGRATE_VERSION" {
default = "${GIT_VERSION}"
}

variable "OP_CHALLENGER_VERSION" {
default = "${GIT_VERSION}"
}
Expand Down Expand Up @@ -104,6 +108,19 @@ target "op-proposer" {
tags = [for tag in split(",", IMAGE_TAGS) : "${REGISTRY}/${REPOSITORY}/op-proposer:${tag}"]
}

target "op-migrate" {
dockerfile = "ops/docker/op-stack-go/Dockerfile"
context = "."
args = {
GIT_COMMIT = "${GIT_COMMIT}"
GIT_DATE = "${GIT_DATE}"
OP_MIGRATE_VERSION = "${OP_MIGRATE_VERSION}"
}
target = "op-migrate-target"
platforms = split(",", PLATFORMS)
tags = [for tag in split(",", IMAGE_TAGS) : "${REGISTRY}/${REPOSITORY}/op-migrate:${tag}"]
}

target "op-challenger" {
dockerfile = "ops/docker/op-stack-go/Dockerfile"
context = "."
Expand Down
6 changes: 6 additions & 0 deletions op-chain-ops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ fuzz:
go test -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzVersionedNonce ./crossdomain

.PHONY: check-l2 test fuzz

op-migrate:
go build -o ./bin/op-migrate ./cmd/op-migrate/main.go
go build -o ./bin/op-migrate-check ./cmd/check-migration/main.go
go build -o ./bin/op-migrate-rollover ./cmd/rollover/main.go
.PHONY: op-migrate
Loading

0 comments on commit f2dad6e

Please sign in to comment.