From 795280f9c029d73f39dc9b5fa505232fb50687dc Mon Sep 17 00:00:00 2001 From: Dmitrii Ovechkin Date: Wed, 27 Dec 2023 10:49:45 +0100 Subject: [PATCH] add qemu --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0352407..8cdca2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,25 +72,34 @@ jobs: go-version: ${{ matrix.go }} - name: 'Test on darwin' - if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) }} + if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }} env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./... - - name: 'Test on linux' + - name: 'Test on linux [amd64]' if: ${{ matrix.os == 'linux' && contains(fromJson('["amd64"]'), matrix.arch) }} env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./... + - name: 'Setup qemu-user-static on [linux] arch [arm64]' + if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }} + run: | + sudo apt-get update + sudo apt-get -y install qemu-user-static + - name: 'Test on [linux] arch [arm64] TODO' if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }} + env: + GOOS: ${{ matrix.os }} + GOARCH: ${{ matrix.arch }} run: go test -coverpkg=./mock/... ./... - name: 'Test on windows' - if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) }} + if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }} env: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }}