workflows: add MacOS CLI build and test configurations
Unfortunately, the default MacOS runner produces amd64 binaries, therefore we need to set GOARCH appropriately. At the same time, docker image will be linux/arm64, so we can build it as well.
This commit is contained in:
parent
740cf500fd
commit
16083459b8
2 changed files with 14 additions and 4 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
@ -24,7 +24,11 @@ jobs:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-2022]
|
os: [ubuntu-20.04, windows-2022, macos-12]
|
||||||
|
arch: [amd64, arm64]
|
||||||
|
exclude:
|
||||||
|
- os: windows-2022
|
||||||
|
arch: 'arm64'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -49,11 +53,13 @@ jobs:
|
||||||
|
|
||||||
- name: Build CLI
|
- name: Build CLI
|
||||||
run: make build
|
run: make build
|
||||||
|
env:
|
||||||
|
GOARCH: ${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: neo-go-binaries
|
name: neo-go-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
path: ./bin/neo-go*
|
path: ./bin/neo-go*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
8
.github/workflows/run_tests.yml
vendored
8
.github/workflows/run_tests.yml
vendored
|
@ -82,14 +82,18 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-2022]
|
os: [ubuntu-20.04, windows-2022, macos-12]
|
||||||
go_versions: [ '1.16', '1.17', '1.18' ]
|
go_versions: [ '1.16', '1.17', '1.18' ]
|
||||||
exclude:
|
exclude:
|
||||||
# Only latest Go version for Windows.
|
# Only latest Go version for Windows and MacOS.
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
go_versions: '1.16'
|
go_versions: '1.16'
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
go_versions: '1.17'
|
go_versions: '1.17'
|
||||||
|
- os: macos-12
|
||||||
|
go_versions: '1.16'
|
||||||
|
- os: macos-12
|
||||||
|
go_versions: '1.17'
|
||||||
# Exclude latest Go version for Ubuntu as Coverage uses it.
|
# Exclude latest Go version for Ubuntu as Coverage uses it.
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
go_versions: '1.18'
|
go_versions: '1.18'
|
||||||
|
|
Loading…
Reference in a new issue