Skip to content

Commit

Permalink
remove DARWIN_X86 build, include DARWIN_arm64 (#275)
Browse files Browse the repository at this point in the history
fix test workflow to run only on PR

Signed-off-by: sriv <[email protected]>
  • Loading branch information
sriv authored Jul 8, 2021
1 parent 936381c commit e66bc42
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: test

on: [push, pull_request]

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Go ${{ matrix.os }}
Expand Down
24 changes: 12 additions & 12 deletions build/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
const (
dotGauge = ".gauge"
plugins = "plugins"
GOARCH = "GOARCH"
goARCH = "GOARCH"
goOS = "GOOS"
x86 = "386"
x86_64 = "amd64"
Expand Down Expand Up @@ -69,8 +69,8 @@ func createPluginDistro(forAllPlatforms bool) {
if forAllPlatforms {
for _, platformEnv := range platformEnvs {
setEnv(platformEnv)
*binDir = filepath.Join(bin, fmt.Sprintf("%s_%s", platformEnv[goOS], platformEnv[GOARCH]))
fmt.Printf("Creating distro for platform => OS:%s ARCH:%s \n", platformEnv[goOS], platformEnv[GOARCH])
*binDir = filepath.Join(bin, fmt.Sprintf("%s_%s", platformEnv[goOS], platformEnv[goARCH]))
fmt.Printf("Creating distro for platform => OS:%s ARCH:%s \n", platformEnv[goOS], platformEnv[goARCH])
createDistro()
}
} else {
Expand Down Expand Up @@ -274,13 +274,13 @@ var binDir = flag.String("bin-dir", "", "Specifies OS_PLATFORM specific binaries

var (
platformEnvs = []map[string]string{
{GOARCH: x86, goOS: DARWIN, CGO_ENABLED: "0"},
{GOARCH: x86_64, goOS: DARWIN, CGO_ENABLED: "0"},
{GOARCH: x86, goOS: LINUX, CGO_ENABLED: "0"},
{GOARCH: x86_64, goOS: LINUX, CGO_ENABLED: "0"},
{GOARCH: ARM64, goOS: LINUX, CGO_ENABLED: "0"},
{GOARCH: x86, goOS: WINDOWS, CGO_ENABLED: "0"},
{GOARCH: x86_64, goOS: WINDOWS, CGO_ENABLED: "0"},
{goARCH: ARM64, goOS: DARWIN, CGO_ENABLED: "0"},
{goARCH: x86_64, goOS: DARWIN, CGO_ENABLED: "0"},
{goARCH: x86, goOS: LINUX, CGO_ENABLED: "0"},
{goARCH: x86_64, goOS: LINUX, CGO_ENABLED: "0"},
{goARCH: ARM64, goOS: LINUX, CGO_ENABLED: "0"},
{goARCH: x86, goOS: WINDOWS, CGO_ENABLED: "0"},
{goARCH: x86_64, goOS: WINDOWS, CGO_ENABLED: "0"},
}
)

Expand All @@ -301,7 +301,7 @@ func getPluginProperties(jsonPropertiesFile string) (map[string]interface{}, err
func compileAcrossPlatforms() {
for _, platformEnv := range platformEnvs {
setEnv(platformEnv)
fmt.Printf("Compiling for platform => OS:%s ARCH:%s \n", platformEnv[goOS], platformEnv[GOARCH])
fmt.Printf("Compiling for platform => OS:%s ARCH:%s \n", platformEnv[goOS], platformEnv[goARCH])
compileGoPackage(htmlReport)
}
}
Expand Down Expand Up @@ -348,7 +348,7 @@ func getArch() string {
}

func getGOARCH() string {
goArch := os.Getenv(GOARCH)
goArch := os.Getenv(goARCH)
if goArch == "" {
return runtime.GOARCH

Expand Down

0 comments on commit e66bc42

Please sign in to comment.