Skip to content

Commit

Permalink
Add http2 support and update to go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
adidenko committed Jun 20, 2024
1 parent f7c28b8 commit 808336a
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 520 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ jobs:
build:
strategy:
matrix:
go-version: ["1.20"]
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ["1.22"]
os:
- ubuntu-latest-amd64
- ubuntu-latest-arm64
- macos-latest-amd64
- macos-latest-arm64
- windows-latest
runs-on: ${{ matrix.os }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.22"
- name: Test
run: make test
9 changes: 7 additions & 2 deletions .github/workflows/publish-release-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
package:
strategy:
matrix:
go-version: ["1.20"]
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ["1.22"]
os:
- ubuntu-latest-amd64
- ubuntu-latest-arm64
- macos-latest-amd64
- macos-latest-arm64
- windows-latest
runs-on: ${{ matrix.os }}

steps:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/publish-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f7b4ed12385588c3f9bc252f0a2b520d83b52d48
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @authors Minigun Maintainers
# @copyright 2020 Wayfair, LLC -- All rights reserved.

FROM golang:1.20 as test
FROM golang:1.22 as test
ENV GOPATH=/go
ENV PATH="$PATH:$GOPATH/bin"
WORKDIR /go/src/github.com/wayfair-incubator/minigun
Expand Down
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,28 @@ test: $(VENDOR_DIR)

# Some Github targets

.PHONY: build-ubuntu-latest
.PHONY: build-ubuntu-latest-amd64
build-ubuntu-latest: $(VENDOR_DIR) $(OUTPUT_DIR)
CGO_ENABLED=1 go build -a -ldflags '-extldflags "-static"' -o output/minigun .
cd output && tar czf minigun-linux64.tar.gz minigun
cd output && tar czf minigun-linux-amd64.tar.gz minigun
rm -f output/minigun

.PHONY: build-macos-latest
.PHONY: build-macos-latest-amd64
build-macos-latest: $(VENDOR_DIR) $(OUTPUT_DIR)
CGO_ENABLED=1 go build -a -ldflags '-extldflags "-static"' -o output/minigun .
cd output && tar czf minigun-darwin64.tar.gz minigun
cd output && tar czf minigun-darwin-amd64.tar.gz minigun
rm -f output/minigun

.PHONY: build-ubuntu-latest-arm64
build-ubuntu-latest: $(VENDOR_DIR) $(OUTPUT_DIR)
GOARCH=arm64 CGO_ENABLED=1 go build -a -ldflags '-extldflags "-static"' -o output/minigun .
cd output && tar czf minigun-linux-arm64.tar.gz minigun
rm -f output/minigun

.PHONY: build-macos-latest-arm64
build-macos-latest: $(VENDOR_DIR) $(OUTPUT_DIR)
GOARCH=arm64 CGO_ENABLED=1 go build -a -ldflags '-extldflags "-static"' -o output/minigun .
cd output && tar czf minigun-darwin-arm64.tar.gz minigun
rm -f output/minigun

.PHONY: build-windows-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Or by checking the [following documentation page](./docs/report-help.md)
This is an example of how to list things you need to use the software and how to install them.

- Docker for image build.
- Golang 1.20 for local binary build.
- Golang 1.22 for local binary build.

### Building a Docker image

Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module github.com/wayfair-incubator/minigun

go 1.20
go 1.22

require (
github.com/dustin/go-humanize v1.0.0
github.com/google/logger v1.1.0
github.com/gorilla/mux v1.7.4
github.com/olekukonko/tablewriter v0.0.4
github.com/prometheus/client_golang v1.13.1
github.com/prometheus/client_model v0.2.0
github.com/dustin/go-humanize v1.0.1
github.com/google/logger v1.1.1
github.com/gorilla/mux v1.8.1
github.com/olekukonko/tablewriter v0.0.5
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
golang.org/x/net v0.26.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/mattn/go-runewidth v0.0.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
Loading

0 comments on commit 808336a

Please sign in to comment.