-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ba13151
Showing
62 changed files
with
8,588 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily | ||
reviewers: | ||
- "metachris" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## 📝 Summary | ||
|
||
<!--- A general summary of your changes --> | ||
|
||
## ⛱ Motivation and Context | ||
|
||
<!--- Why is this change required? What problem does it solve? --> | ||
|
||
## 📚 References | ||
|
||
<!-- Any interesting external links to documentation, articles, tweets which add value to the PR --> | ||
|
||
--- | ||
|
||
## ✅ I have run these commands | ||
|
||
* [ ] `make lint` | ||
* [ ] `make test-race` | ||
* [ ] `go mod tidy` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.21.0 | ||
id: go | ||
|
||
- name: Ensure go mod tidy runs without changes | ||
run: | | ||
go mod tidy | ||
git diff-index HEAD | ||
git diff-index --quiet HEAD | ||
- name: Install gofumpt | ||
run: go install mvdan.cc/[email protected] | ||
|
||
- name: Install staticcheck | ||
run: go install honnef.co/go/tools/cmd/[email protected] | ||
|
||
- name: Install golangci-lint | ||
run: go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
- name: Lint | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docker-image: | ||
name: Publish Docker Image | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get tag version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Print version | ||
run: | | ||
echo $RELEASE_VERSION | ||
echo ${{ env.RELEASE_VERSION }} | ||
- name: Extract metadata (tags, labels) for Docker images | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: flashbots/mev-boost | ||
tags: | | ||
type=sha | ||
type=pep440,pattern={{version}} | ||
type=pep440,pattern={{major}}.{{minor}} | ||
type=raw,value=latest,enable=${{ !contains(env.RELEASE_VERSION, '-') }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
build-args: | | ||
VERSION=${{ env.RELEASE_VERSION }} | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
build-all: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.21 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --skip-publish --config .goreleaser-build.yaml --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mev-boost-build | ||
path: | | ||
dist/mev-boost*.tar.gz | ||
dist/mev-boost*.txt | ||
release: | ||
needs: build-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.21 | ||
- name: Make directories | ||
run: | | ||
mkdir -p ./build | ||
- name: Download binaries | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: mev-boost-build | ||
path: ./build | ||
- name: Merge checksum file | ||
run: | | ||
cd ./build | ||
cat ./mev-boost*checksums.txt >> checksums.txt | ||
rm ./mev-boost*checksums.txt | ||
- name: Release | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
args: release --config .goreleaser-release.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.21 | ||
id: go | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run unit tests and generate the coverage report | ||
run: make test-coverage | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: ./coverage.out | ||
verbose: false | ||
flags: unittests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Ignore VI/Vim swapfiles | ||
.*.sw? | ||
|
||
# IntelliJ | ||
.idea | ||
.ijwb | ||
/mev-boost | ||
/test-cli | ||
/tmp | ||
/dist | ||
.vscode/ | ||
/README.internal.md | ||
/validator_data.json | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
linters: | ||
enable-all: true | ||
disable: | ||
- exhaustruct | ||
- funlen | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- gocritic | ||
- godot | ||
- godox | ||
- gomnd | ||
- lll | ||
- nlreturn | ||
- nonamedreturns | ||
- nosnakecase | ||
- paralleltest | ||
- testpackage | ||
- varnamelen | ||
- wrapcheck | ||
- wsl | ||
- musttag | ||
- depguard | ||
|
||
# | ||
# Maybe fix later: | ||
# | ||
- cyclop | ||
- gocognit | ||
- goconst | ||
- gosec | ||
- ireturn | ||
- noctx | ||
- tagliatelle | ||
|
||
# | ||
# Disabled because of generics: | ||
# | ||
- contextcheck | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- structcheck | ||
- wastedassign | ||
|
||
# | ||
# Disabled because deprecated: | ||
# | ||
- deadcode | ||
- exhaustivestruct | ||
- golint | ||
- ifshort | ||
- interfacer | ||
- maligned | ||
- scopelint | ||
- varcheck | ||
|
||
linters-settings: | ||
gofumpt: | ||
extra-rules: true | ||
govet: | ||
enable-all: true | ||
disable: | ||
- fieldalignment | ||
- shadow | ||
|
||
output: | ||
print-issued-lines: true | ||
sort-results: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# https://goreleaser.com/customization/builds/ | ||
project_name: mev-boost | ||
builds: | ||
- id: mev-boost | ||
env: | ||
# Force build to be all Go. | ||
- CGO_ENABLED=0 | ||
flags: | ||
# Remove all file system paths from the executable. | ||
- -trimpath | ||
ldflags: | ||
# Disables DWARF debugging information. | ||
- -w | ||
# Disables symbol table information. | ||
- -s | ||
# Sets the value of the symbol. | ||
- -X github.com/flashbots/mev-boost/config.Version={{.Version}} | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# https://goreleaser.com/customization/release/ | ||
builds: | ||
- skip: true | ||
release: | ||
draft: true | ||
extra_files: | ||
- glob: ./build/* | ||
header: | | ||
# 🚀 Features | ||
# 🎄 Enhancements | ||
# 🐞 Notable bug fixes | ||
# 🎠 Community |
Oops, something went wrong.