Skip to content

Commit

Permalink
added Apple Silicon (darwin/arm64) build
Browse files Browse the repository at this point in the history
  • Loading branch information
dh1tw committed Apr 17, 2021
1 parent d7cfa5c commit 8a81d00
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build_linux:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
version: ['linux-armhf', 'linux-arm64', 'linux-i386', 'linux-amd64']
Expand Down Expand Up @@ -43,6 +43,16 @@ jobs:

build_macos:
runs-on: macos-latest
strategy:
matrix:
version: ['darwin-amd64', 'darwin-arm64']
include:
- version: darwin-amd64
OS: darwin
ARCH: amd64
- version: darwin-arm64
OS: darwin
ARCH: arm64
steps:
- uses: actions/checkout@v1
with:
Expand Down Expand Up @@ -70,11 +80,11 @@ jobs:
- name: Stash the build artifact
uses: actions/upload-artifact@v1
with:
name: remoteAudio-darwin-amd64-${{ github.sha }}
name: remoteAudio-${{ matrix.OS }}-${{ matrix.ARCH }}-${{ github.sha }}
path: ./release

build_windows:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
version: ['windows-amd64', 'windows-i386']
Expand Down Expand Up @@ -109,7 +119,7 @@ jobs:
# A Github release is created whenever the git reference contains a tag, starting with 'v*' (e.g. v0.4.2)
# And the previous build jobs have been successful
create_release:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [build_linux, build_macos, build_windows]
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down Expand Up @@ -137,11 +147,11 @@ jobs:

# In this job we upload the release artifacts to the corresponding release
upload:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: create_release # release must be created before this job can start
strategy:
matrix:
version: ['linux-armhf', 'linux-arm64', 'linux-i386', 'linux-amd64', 'darwin-amd64', 'windows-amd64', 'windows-i386']
version: ['linux-armhf', 'linux-arm64', 'linux-i386', 'linux-amd64', 'darwin-amd64', 'darwin-arm64', 'windows-amd64', 'windows-i386']
# add the GO naming convention for OS ($GOOS) and architecture ($GOARCH)
# instead of using Linux' naming convention (version items).
include:
Expand All @@ -160,6 +170,9 @@ jobs:
- version: darwin-amd64
OS: darwin
ARCH: amd64
- version: darwin-arm64
OS: darwin
ARCH: arm64
- version: windows-amd64
OS: windows
ARCH: amd64
Expand Down

0 comments on commit 8a81d00

Please sign in to comment.