Skip to content

Commit

Permalink
Change GH actions to use 'make'
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Aug 27, 2022
1 parent fc765ca commit 72d5128
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/crossbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build all platforms

on: [ push, pull_request ]

jobs:
crossbuild:
strategy:
matrix:
go-version: [ "1.17", "1.18", "1.19" ]
platform: [ "ubuntu-latest" ]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build containers
run: make all-container GO_VERSION=${{ matrix.go-version }}
12 changes: 3 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ jobs:
test:
strategy:
matrix:
go-versions: [ 1.16.x, 1.17.x, 1.18.x, 1.19.x ]
platform: [ ubuntu-latest ]
go-version: [ "1.17", "1.18", "1.19" ]
platform: [ "ubuntu-latest" ]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -race ./...
run: make test GOFLAGS="-v"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

TAG := $(VERSION)__$(OS)_$(ARCH)

BUILD_IMAGE := golang:1.19-alpine
GO_VERSION := 1.19
BUILD_IMAGE := golang:$(GO_VERSION)-alpine

BIN_EXTENSION :=
ifeq ($(OS), windows)
Expand Down

0 comments on commit 72d5128

Please sign in to comment.