From 738f356010a1a4e818935856ab796dc0868d036f Mon Sep 17 00:00:00 2001 From: bulletmys Date: Sun, 10 Oct 2021 21:15:09 +0300 Subject: [PATCH] fix run-on-arch-action actions --- .github/workflows/easyjson.yml | 39 ++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/easyjson.yml b/.github/workflows/easyjson.yml index b032980..0679163 100644 --- a/.github/workflows/easyjson.yml +++ b/.github/workflows/easyjson.yml @@ -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 \ No newline at end of file