Skip to content

Commit 309f1b6

Browse files
committed
add non amd64 actions
1 parent 5fd7585 commit 309f1b6

2 files changed

Lines changed: 59 additions & 29 deletions

File tree

.github/workflows/easyjson.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: easyjson
2+
3+
on:
4+
push:
5+
branches: [ master, upd_ci ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
go: [ '1.17', '1.16', '1.15' ]
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Go ${{ matrix.go }}
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go }}
23+
24+
- name: Install golint
25+
run: go get golang.org/x/lint/golint && go mod tidy
26+
27+
- name: Build and Run tests
28+
run: make
29+
30+
test-non-amd64:
31+
strategy:
32+
matrix:
33+
arch:
34+
- name: POWER8
35+
architecture: "ppc64le"
36+
runs-on: ubuntu-latest
37+
name: Build on ${{ matrix.arch.name }}
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: uraimo/run-on-arch-action@master
41+
env:
42+
GOARCH: ${{ matrix.arch.architecture }}
43+
with:
44+
architecture: ${{ matrix.arch.architecture }}
45+
distribution: ubuntu20.04
46+
additionalArgs: -e GOARCH
47+
install: |
48+
apt-get update
49+
apt install -y curl wget
50+
latestGo=$(curl "https://golang.org/VERSION?m=text")
51+
wget "https://dl.google.com/go/${latestGo}.linux-${GOARCH}.tar.gz"
52+
rm -f $(which go)
53+
rm -rf /usr/local/go
54+
tar -C /usr/local -xzf "${latestGo}.linux-${GOARCH}.tar.gz"
55+
export PATH=/usr/local/go/bin:$PATH
56+
printf "Go Version: $(go version)\n"
57+
run: |
58+
go get golang.org/x/lint/golint && go mod tidy
59+
make

.github/workflows/go.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)