Skip to content

Commit 738f356

Browse files
committed
fix run-on-arch-action actions
1 parent 309f1b6 commit 738f356

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/easyjson.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
go: [ '1.17', '1.16', '1.15' ]
15+
go: [ 1.17, 1.16, 1.15 ]
1616
steps:
1717
- uses: actions/checkout@v2
1818

@@ -21,39 +21,42 @@ jobs:
2121
with:
2222
go-version: ${{ matrix.go }}
2323

24-
- name: Install golint
24+
- name: Install golint (for old go version)
25+
if: matrix.go < 1.16
2526
run: go get golang.org/x/lint/golint && go mod tidy
2627

28+
- name: Install golint
29+
if: matrix.go > 1.15
30+
run: go install golang.org/x/lint/golint@latest
31+
2732
- name: Build and Run tests
2833
run: make
2934

3035
test-non-amd64:
36+
runs-on: ubuntu-latest
37+
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
3138
strategy:
3239
matrix:
33-
arch:
34-
- name: POWER8
35-
architecture: "ppc64le"
36-
runs-on: ubuntu-latest
37-
name: Build on ${{ matrix.arch.name }}
40+
include:
41+
- arch: ppc64le
42+
distro: ubuntu20.04
3843
steps:
3944
- uses: actions/checkout@v2
4045
- uses: uraimo/run-on-arch-action@master
41-
env:
42-
GOARCH: ${{ matrix.arch.architecture }}
4346
with:
44-
architecture: ${{ matrix.arch.architecture }}
45-
distribution: ubuntu20.04
46-
additionalArgs: -e GOARCH
47+
arch: ${{ matrix.arch }}
48+
distro: ${{ matrix.distro }}
4749
install: |
4850
apt-get update
49-
apt install -y curl wget
51+
apt install -y curl wget make gcc
5052
latestGo=$(curl "https://golang.org/VERSION?m=text")
51-
wget "https://dl.google.com/go/${latestGo}.linux-${GOARCH}.tar.gz"
53+
wget --quiet "https://dl.google.com/go/${latestGo}.linux-${{ matrix.arch }}.tar.gz"
5254
rm -f $(which go)
5355
rm -rf /usr/local/go
54-
tar -C /usr/local -xzf "${latestGo}.linux-${GOARCH}.tar.gz"
56+
tar -C /usr/local -xzf "${latestGo}.linux-${{ matrix.arch }}.tar.gz"
57+
run: |
5558
export PATH=/usr/local/go/bin:$PATH
59+
export PATH=~/go/bin:$PATH
5660
printf "Go Version: $(go version)\n"
57-
run: |
58-
go get golang.org/x/lint/golint && go mod tidy
61+
go install golang.org/x/lint/golint@latest
5962
make

0 commit comments

Comments
 (0)