Skip to content

Commit

Permalink
Added darwin/arm64 to github release workflow (Apple M1 SoC binary)
Browse files Browse the repository at this point in the history
Updated all github workflow go versions to 1.16 (1.13 is EOL)
Updated ubuntu github runner to use latest (16.04 is pretty old)
Updated keychain dep (to address SecTrustedApplicationCreateFromPath deprecation warning)
  • Loading branch information
VeryStrongFingers authored and samuong committed May 1, 2021
1 parent d48c5a1 commit 75c6021
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 17 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Continuous Integration

on: [ push ]
on:
push:
branches: '**'
tags-ignore: '**'

jobs:
lint:
strategy:
matrix:
os: [ 'macos-latest' ]
go: [ '1.13' ]
go: [ '1.16' ]

runs-on: ${{ matrix.os }}

Expand All @@ -23,8 +26,8 @@ jobs:
test:
strategy:
matrix:
os: [ 'macos-latest', 'ubuntu-16.04' ]
go: [ '1.13' ]
os: [ 'macos-latest', 'ubuntu-latest' ]
go: [ '1.16' ]

runs-on: ${{ matrix.os }}

Expand All @@ -41,15 +44,22 @@ jobs:

build:
strategy:
fail-fast: false
matrix:
target:
- os: 'macos-latest'
goos: 'darwin'
goarch: 'amd64'
- os: 'ubuntu-16.04'
- os: 'macos-latest'
goos: 'darwin'
goarch: 'arm64'
- os: 'ubuntu-latest'
goos: 'linux'
goarch: 'amd64'
go: [ '1.13' ]
- os: 'ubuntu-latest'
goos: 'windows'
goarch: 'amd64'
go: [ '1.16' ]

runs-on: ${{ matrix.target.os }}

Expand All @@ -60,7 +70,18 @@ jobs:
with:
go-version: ${{ matrix.go }}

- run: go build -v .
# xcode required until github macos runner is 11.x based
- uses: maxim-lobanov/setup-xcode@v1
if: matrix.target.goos == 'darwin' && matrix.target.goarch == 'arm64'
with:
xcode-version: latest

- if: matrix.target.goos == 'darwin' && matrix.target.goarch == 'arm64'
run: |
echo SDKROOT=$(xcrun --sdk macosx --show-sdk-path) >> $GITHUB_ENV
- run: |
go build -v .
env:
GOOS: ${{ matrix.target.goos }}
GOARCH: ${{ matrix.target.goarch }}
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
jobs:
release:
runs-on: macos-latest

steps:
- uses: actions/create-release@v1
env:
Expand All @@ -35,11 +35,17 @@ jobs:
- os: 'macos-latest'
goos: 'darwin'
goarch: 'amd64'
- os: 'ubuntu-16.04'
- os: 'macos-latest'
goos: 'darwin'
goarch: 'arm64'
- os: 'ubuntu-latest'
goos: 'linux'
goarch: 'amd64'
go: [ '1.13' ]

- os: 'ubuntu-latest'
goos: 'windows'
goarch: 'amd64'
go: [ '1.16' ]

runs-on: ${{ matrix.target.os }}

needs: [ release ]
Expand All @@ -50,13 +56,23 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}


# xcode required until github macos runner is 11.x based
- uses: maxim-lobanov/setup-xcode@v1
if: matrix.target.goos == 'darwin' && matrix.target.goarch == 'arm64'
with:
xcode-version: latest

- if: matrix.target.goos == 'darwin' && matrix.target.goarch == 'arm64'
run: |
echo SDKROOT=$(xcrun --sdk macosx --show-sdk-path) >> $GITHUB_ENV
- run: go build -v -o ${{ matrix.target.goos }}-${{ matrix.target.goarch }} .
env:
GOOS: ${{ matrix.target.goos }}
GOARCH: ${{ matrix.target.goarch }}
CGO_ENABLED: 1

- uses: actions/download-artifact@v1
with:
name: upload_url
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.12
require (
github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4
github.com/gobwas/glob v0.2.3
github.com/keybase/go-keychain v0.0.0-20190604185112-cc436cc9fe98
github.com/keybase/go-keychain v0.0.0-20201121013009-976c83ec27a6
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
github.com/stretchr/testify v1.3.0
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f
github.com/stretchr/testify v1.5.1
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59
gopkg.in/sourcemap.v1 v1.0.5 // indirect
)
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/keybase/go-keychain v0.0.0-20190604185112-cc436cc9fe98 h1:CIcvKEAP7i7v/SWSwzAvq1ATWWs4+J/ezHqZT116+JA=
github.com/keybase/go-keychain v0.0.0-20190604185112-cc436cc9fe98/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc=
github.com/keybase/go-keychain v0.0.0-20201121013009-976c83ec27a6 h1:Mj0fhP9dzHKPijsmli/XbXMDKe1/KWy5xKci8e3nmBg=
github.com/keybase/go-keychain v0.0.0-20201121013009-976c83ec27a6/go.mod h1:N83iQ9rnnzi2KZuTu+0xBcD1JNWn1jSN140ggAF7HeE=
github.com/keybase/go.dbus v0.0.0-20200324223359-a94be52c0b03/go.mod h1:a8clEhrrGV/d76/f9r2I41BwANMihfZYV9C223vaxqE=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d h1:1VUlQbCfkoSGv7qP7Y+ro3ap1P1pPZxgdGVqiTVy5C4=
Expand All @@ -15,13 +19,17 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI=
gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit 75c6021

Please sign in to comment.