Compare commits

...

5 Commits

Author SHA1 Message Date
John Barton
cbda1cc5ce Comment out IBM Z for now and quieten apt-get 2020-11-11 12:45:16 +11:00
John Barton
38a8505415 Include git 2020-11-11 12:05:55 +11:00
John Barton
a7538440ac Update input to match action 2020-11-11 12:01:43 +11:00
John Barton
a21980f2ad Try shifting env around 2020-11-11 11:53:22 +11:00
John Barton
68a9acd049 Add non-amd64 tests 2020-11-11 11:44:16 +11:00

View File

@ -3,9 +3,10 @@ name: CI
on: [push] on: [push]
jobs: jobs:
build: test:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false
matrix: matrix:
go: [ '1.15', '1.14' ] go: [ '1.15', '1.14' ]
os: [ ubuntu-latest, macOS-latest, windows-latest ] os: [ ubuntu-latest, macOS-latest, windows-latest ]
@ -17,3 +18,45 @@ jobs:
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
- run: go test - run: go test
test-non-amd64:
strategy:
fail-fast: false
matrix:
arch:
# For some reasons this is segfaulting on go env
# - name: IBM Z and LinuxONE
# architecture: "s390x"
- name: POWER8
architecture: "ppc64le"
runs-on: ubuntu-latest
name: Test on ${{ matrix.arch.name }}
steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@master
with:
arch: ${{ matrix.arch.architecture }}
distro: ubuntu20.04
env: | # YAML pipe
GOARCH: ${{ matrix.arch.architecture }}
CGO_ENABLED: 0
run: |
apt-get update
apt-get install -q -y curl wget git
latestGo=$(curl "https://golang.org/VERSION?m=text")
wget "https://dl.google.com/go/${latestGo}.linux-${GOARCH}.tar.gz"
rm -f $(which go)
rm -rf /usr/local/go
tar -C /usr/local -xzf "${latestGo}.linux-${GOARCH}.tar.gz"
export PATH=/usr/local/go/bin:$PATH
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
go get -insecure -v -t -d ./...
go test ./...
cd ./cmd/godotenv
go build -trimpath -ldflags="-w -s" -v