Skip to content

Commit

Permalink
added race flag to our build
Browse files Browse the repository at this point in the history
  • Loading branch information
miladz68 committed Dec 13, 2024
1 parent f842002 commit 47e558f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/coreum/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (

cosmovisorBinaryPath = "bin/cosmovisor"
goCoverFlag = "-cover"
goRaceFlag = "-race"
)

var defaultBuildTags = []string{"netgo", "ledger"}
Expand All @@ -54,12 +55,13 @@ func BuildCoredLocally(ctx context.Context, deps types.DepsFunc) error {
CGOEnabled: true,
Tags: defaultBuildTags,
LDFlags: ldFlags,
Flags: []string{goCoverFlag, goRaceFlag},
})
}

// BuildCoredInDocker builds cored in docker.
func BuildCoredInDocker(ctx context.Context, deps types.DepsFunc) error {
return buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag},
return buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag, goRaceFlag},
binaryName, "")
}

Expand All @@ -81,7 +83,7 @@ func BuildExtendedCoredInDocker(ctx context.Context, deps types.DepsFunc) error
return err
}

err = buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag},
err = buildCoredInDocker(ctx, deps, tools.TargetPlatformLinuxLocalArchInDocker, []string{goCoverFlag, goRaceFlag},
extendedBinaryName, "ext")
if err != nil {
return err
Expand Down

0 comments on commit 47e558f

Please sign in to comment.