mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-02-11 06:43:45 -05:00
feat: support darwin arm builds and golang 1.16 (#140)
* chore: bump to golang 1.16 * fix(ci): remove fail fast from non-matrix builds * chore: rename release workflow from yml to yaml * fix: use goreleaser for compile tests * fix(make): use gorelease in compile target * fix(ci): add gpg import step for compile
This commit is contained in:
parent
97c491737c
commit
1159e2de73
9 changed files with 25 additions and 51 deletions
4
.github/workflows/acc-test.yaml
vendored
4
.github/workflows/acc-test.yaml
vendored
|
|
@ -13,7 +13,7 @@ on:
|
|||
- '.github/workflows/**'
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.15"
|
||||
GO_VERSION: "1.16"
|
||||
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
go-version: '1.16'
|
||||
- run: cat /etc/issue
|
||||
- run: bash scripts/gogetcookie.sh
|
||||
# locally: docker run -it ubuntu-20.04 bash (https://ubuntu.pkgs.org/20.04/docker-ce-stable-amd64/)
|
||||
|
|
|
|||
22
.github/workflows/compile.yaml
vendored
22
.github/workflows/compile.yaml
vendored
|
|
@ -13,20 +13,28 @@ on:
|
|||
- '.github/workflows/**'
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.15"
|
||||
GO_VERSION: "1.16"
|
||||
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
- run: cat /etc/issue
|
||||
- run: bash scripts/gogetcookie.sh
|
||||
- run: make compile
|
||||
go-version: '1.16'
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: paultyng/ghaction-import-gpg@v2.1.0
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
PASSPHRASE: ${{ secrets.PASSPHRASE }}
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist --skip-publish --snapshot
|
||||
env:
|
||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15
|
||||
go-version: 1.16
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: paultyng/ghaction-import-gpg@v2.1.0
|
||||
6
.github/workflows/unit-test.yaml
vendored
6
.github/workflows/unit-test.yaml
vendored
|
|
@ -13,19 +13,17 @@ on:
|
|||
- '.github/workflows/**'
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.15"
|
||||
GO_VERSION: "1.16"
|
||||
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
go-version: '1.16'
|
||||
- run: cat /etc/issue
|
||||
- run: bash scripts/gogetcookie.sh
|
||||
- run: make vet
|
||||
|
|
|
|||
6
.github/workflows/website-lint.yaml
vendored
6
.github/workflows/website-lint.yaml
vendored
|
|
@ -12,19 +12,17 @@ on:
|
|||
- website/docs/**
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.15"
|
||||
GO_VERSION: "1.16"
|
||||
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
|
||||
|
||||
jobs:
|
||||
website-lint-spellcheck-tffmt:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
go-version: '1.16'
|
||||
- run: cat /etc/issue
|
||||
- run: bash scripts/gogetcookie.sh
|
||||
# locally: docker run -it ubuntu-20.04 bash (https://ubuntu.pkgs.org/20.04/docker-ce-stable-amd64/)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1.15.2
|
||||
1.16.2
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ testacc_cleanup: fmtcheck
|
|||
@sh -c "'$(CURDIR)/scripts/testacc_cleanup.sh'"
|
||||
|
||||
compile: fmtcheck
|
||||
@sh -c "'$(CURDIR)/scripts/compile.sh'"
|
||||
@sh -c "curl -sL https://git.io/goreleaser | bash -s -- --rm-dist --skip-publish --snapshot"
|
||||
|
||||
vet:
|
||||
@echo "go vet ."
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -18,4 +18,4 @@ require (
|
|||
gotest.tools/v3 v3.0.3 // indirect
|
||||
)
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# Prerequisites
|
||||
if ! command -v gox > /dev/null; then
|
||||
GO111MODULE=off go get -u github.com/mitchellh/gox
|
||||
fi
|
||||
|
||||
# setup environment
|
||||
PROVIDER_NAME="docker"
|
||||
TARGET_DIR="$(pwd)/results"
|
||||
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
|
||||
XC_OS=${XC_OS:=linux darwin windows openbsd solaris}
|
||||
XC_EXCLUDE_OSARCH="!darwin/arm !darwin/386 !solaris/amd64"
|
||||
LD_FLAGS="-s -w"
|
||||
export CGO_ENABLED=0
|
||||
|
||||
rm -rf "${TARGET_DIR}"
|
||||
mkdir -p "${TARGET_DIR}"
|
||||
|
||||
# Compile
|
||||
gox \
|
||||
-os="${XC_OS}" \
|
||||
-arch="${XC_ARCH}" \
|
||||
-osarch="${XC_EXCLUDE_OSARCH}" \
|
||||
-ldflags "${LD_FLAGS}" \
|
||||
-output "$TARGET_DIR/{{.OS}}_{{.Arch}}/terraform-provider-${PROVIDER_NAME}_v0.0.0_x4" \
|
||||
-verbose \
|
||||
-rebuild \
|
||||
.
|
||||
Loading…
Reference in a new issue