op-geth/.circleci/config.yml
2023-03-03 07:14:19 +10:00

67 lines
1.7 KiB
YAML

version: 2.1
jobs:
build-geth:
docker:
- image: cimg/go:1.18
resource_class: medium
steps:
- checkout
- run:
command: go run build/ci.go install
unit-test:
resource_class: medium
docker:
- image: cimg/go:1.18
steps:
- checkout
- run:
command: go run build/ci.go test
lint-geth:
resource_class: medium
docker:
- image: cimg/go:1.18
steps:
- checkout
- run:
command: go run build/ci.go lint
push-geth:
docker:
- image: cimg/base:2022.04
steps:
- when:
condition:
equal: [ optimism, <<pipeline.git.branch>> ]
steps:
- checkout
- setup_remote_docker:
version: 20.10.12
- run:
name: Build and push
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker context create buildx-build
docker buildx create --use buildx-build
docker buildx build --push \
--tag "ethereumoptimism/op-geth:$CIRCLE_SHA1" \
--tag "ethereumoptimism/op-geth:$CIRCLE_BRANCH" \
--tag "ethereumoptimism/op-geth:latest" \
--platform=linux/arm64,linux/amd64 \
-f Dockerfile .
# Below step is required to prevent CircleCI from barfing on a
# job with no steps
- run: echo 0
workflows:
main:
jobs:
- build-geth:
name: Build geth
- unit-test:
name: Run unit tests for geth
- lint-geth:
name: Run linter over geth
- push-geth:
name: Push geth