Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Apple Silicon. Fixes #1997 #1998

Merged
merged 3 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
GOOS = "GOOS"
X86 = "386"
X86_64 = "amd64"
ARM64 = "arm64"
darwin = "darwin"
linux = "linux"
freebsd = "freebsd"
Expand Down Expand Up @@ -92,7 +93,7 @@ func runTests(coverage bool) {
if *verbose {
runProcess("go", "test", "./...", "-v")
} else {
runProcess("go", "test", "./...")
runProcess("go", "test", "./...")
}
}
}
Expand Down Expand Up @@ -151,7 +152,7 @@ var certFile = flag.String("certFile", "", "Should be passed for signing the win
// Each target name is the directory name
var (
platformEnvs = []map[string]string{
map[string]string{GOARCH: X86, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: ARM64, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86_64, GOOS: darwin, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86, GOOS: linux, CGO_ENABLED: "0"},
map[string]string{GOARCH: X86_64, GOOS: linux, CGO_ENABLED: "0"},
Expand Down Expand Up @@ -441,6 +442,10 @@ func getPackageArchSuffix() string {
return "x86_64"
}

if arch := getGOARCH(); arch == "arm" {
return "arm64"
}

if arch := getGOARCH(); arch == X86 {
return "x86"
}
Expand Down
6 changes: 3 additions & 3 deletions build/npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion build/npm/src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const fs = require('fs');
const BASE_URL="https://github.com/getgauge/gauge/releases/download/",
ARCH_MAPPING = {
"ia32": "x86",
"x64": "x86_64"
"x64": "x86_64",
"arm64": "arm64"
},
PLATFORM_MAPPING = {
"darwin": "darwin",
Expand Down
4 changes: 3 additions & 1 deletion build/pip/setup.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ class CustomInstallCommand(install):
"""Customized setuptools install command to download and setup."""

_base_url = 'https://api.github.com/repos/getgauge/gauge/releases'
_arch_map = {{"ia32": "x86", "x64": "x86_64"}}
_arch_map = {{"ia32": "x86", "x64": "x86_64", "arm64": "arm64"}}
_os_map = {{"Darwin": "darwin", "Linux": "linux", "Windows": "windows"}}
_os_name = _os_map[platform.system()]

def _get_arch(self):
if 'arm64' in platform.platform():
return self._arch_map['arm64']
if '64' in platform.architecture()[0]:
return self._arch_map['x64']
else:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
google.golang.org/genproto v0.0.0-20210111234610-22ae2b108f89
google.golang.org/grpc v1.37.0
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.34.1/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c=
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// CurrentGaugeVersion represents the current version of Gauge
var CurrentGaugeVersion = &Version{1, 1, 8}
var CurrentGaugeVersion = &Version{1, 2, 0}

// BuildMetadata represents build information of current release (e.g, nightly build information)
var BuildMetadata = ""
Expand Down