mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
fix run-on-arch-action actions
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go: [ '1.17', '1.16', '1.15' ]
|
||||
go: [ 1.17, 1.16, 1.15 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -21,39 +21,42 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Install golint
|
||||
- name: Install golint (for old go version)
|
||||
if: matrix.go < 1.16
|
||||
run: go get golang.org/x/lint/golint && go mod tidy
|
||||
|
||||
- name: Install golint
|
||||
if: matrix.go > 1.15
|
||||
run: go install golang.org/x/lint/golint@latest
|
||||
|
||||
- name: Build and Run tests
|
||||
run: make
|
||||
|
||||
test-non-amd64:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- name: POWER8
|
||||
architecture: "ppc64le"
|
||||
runs-on: ubuntu-latest
|
||||
name: Build on ${{ matrix.arch.name }}
|
||||
include:
|
||||
- arch: ppc64le
|
||||
distro: ubuntu20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: uraimo/run-on-arch-action@master
|
||||
env:
|
||||
GOARCH: ${{ matrix.arch.architecture }}
|
||||
with:
|
||||
architecture: ${{ matrix.arch.architecture }}
|
||||
distribution: ubuntu20.04
|
||||
additionalArgs: -e GOARCH
|
||||
arch: ${{ matrix.arch }}
|
||||
distro: ${{ matrix.distro }}
|
||||
install: |
|
||||
apt-get update
|
||||
apt install -y curl wget
|
||||
apt install -y curl wget make gcc
|
||||
latestGo=$(curl "https://golang.org/VERSION?m=text")
|
||||
wget "https://dl.google.com/go/${latestGo}.linux-${GOARCH}.tar.gz"
|
||||
wget --quiet "https://dl.google.com/go/${latestGo}.linux-${{ matrix.arch }}.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 "Go Version: $(go version)\n"
|
||||
tar -C /usr/local -xzf "${latestGo}.linux-${{ matrix.arch }}.tar.gz"
|
||||
run: |
|
||||
go get golang.org/x/lint/golint && go mod tidy
|
||||
export PATH=/usr/local/go/bin:$PATH
|
||||
export PATH=~/go/bin:$PATH
|
||||
printf "Go Version: $(go version)\n"
|
||||
go install golang.org/x/lint/golint@latest
|
||||
make
|
||||
Reference in New Issue
Block a user