Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Commit aa035a1

Browse files
authored
Non amd tests (joho#122)
* Add non-amd64 tests * Try shifting env around * Update input to match action * Include git * Comment out IBM Z for now and quieten apt-get
1 parent 23296b9 commit aa035a1

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ name: CI
33
on: [push]
44

55
jobs:
6-
build:
6+
test:
77
runs-on: ${{ matrix.os }}
88
strategy:
9+
fail-fast: false
910
matrix:
1011
go: [ '1.15', '1.14' ]
1112
os: [ ubuntu-latest, macOS-latest, windows-latest ]
@@ -16,4 +17,46 @@ jobs:
1617
uses: actions/setup-go@v2
1718
with:
1819
go-version: ${{ matrix.go }}
19-
- run: go test
20+
- run: go test
21+
22+
test-non-amd64:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
arch:
27+
# For some reasons this is segfaulting on go env
28+
# - name: IBM Z and LinuxONE
29+
# architecture: "s390x"
30+
- name: POWER8
31+
architecture: "ppc64le"
32+
33+
runs-on: ubuntu-latest
34+
name: Test on ${{ matrix.arch.name }}
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: uraimo/run-on-arch-action@master
38+
with:
39+
arch: ${{ matrix.arch.architecture }}
40+
distro: ubuntu20.04
41+
env: | # YAML pipe
42+
GOARCH: ${{ matrix.arch.architecture }}
43+
CGO_ENABLED: 0
44+
run: |
45+
apt-get update
46+
apt-get install -q -y curl wget git
47+
latestGo=$(curl "https://golang.org/VERSION?m=text")
48+
wget "https://dl.google.com/go/${latestGo}.linux-${GOARCH}.tar.gz"
49+
rm -f $(which go)
50+
rm -rf /usr/local/go
51+
tar -C /usr/local -xzf "${latestGo}.linux-${GOARCH}.tar.gz"
52+
export PATH=/usr/local/go/bin:$PATH
53+
printf "Using go at: $(which go)\n"
54+
printf "Go version: $(go version)\n"
55+
printf "\n\nGo environment:\n\n"
56+
go env
57+
printf "\n\nSystem environment:\n\n"
58+
env
59+
go get -insecure -v -t -d ./...
60+
go test ./...
61+
cd ./cmd/godotenv
62+
go build -trimpath -ldflags="-w -s" -v

0 commit comments

Comments
 (0)