Skip to content

Commit

Permalink
Installed GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
pazone committed Oct 16, 2023
1 parent 2ec5c43 commit d24545c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 9 additions & 7 deletions .buildkite/hooks/pre-command.ps1
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# Install gcc TODO: Move to the VM image
choco install mingw

# Install gvm and go
# TODO: Move GVM download to the base VM image
$env:GvmVersion = "0.5.2"
$Env:GOTMPDIR = $Env:BUILDKITE_BUILD_CHECKOUT_PATH #https://github.com/golang/go/issues/42224#issuecomment-1021149948
$Env:GOPATH = "$Env:BUILDKITE_BUILD_CHECKOUT_PATH\gopath"

[Net.ServicePointManager]::SecurityProtocol = "tls12"
$env:GoVersion = Get-Content -Path .go-version
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v$env:GvmVersion/gvm-windows-amd64.exe -Outfile C:\Windows\System32\gvm.exe
gvm --format=powershell $env:GoVersion | Invoke-Expression
go version

$GOPATH = $(go env GOPATH)
$env:Path = "$GOPATH\bin;" + $env:Path
[Environment]::SetEnvironmentVariable("GOPATH", "$GOPATH", [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("Path", "$GOPATH\bin;$env:Path", [EnvironmentVariableTarget]::Machine)

# Install tools
go install github.com/magefile/mage
go install github.com/elastic/go-licenser
go install golang.org/x/tools/cmd/goimports
go install github.com/jstemmer/go-junit-report
go install gotest.tools/gotestsum

# debug
Write-Host "GOPATH: $env:GOPATH"
#Get-ChildItem -Path $env:GOPATH\bin
12 changes: 5 additions & 7 deletions .buildkite/scripts/steps/unit-tests.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
$ErrorActionPreference = "Stop"
Write-Host "--- Unit tests"
#debug
Write-Host "GOPATH: $env:GOPATH"
# Get-ChildItem -Path $env:GOPATH\bin

# run tests
$Env:TEST_COVERAGE = $true
.\gopath\mage unitTest
Write-Host "--- Build"
mage build

Write-Host "--- Unit tests"
$Env:TEST_COVERAGE = $true
mage unitTest

0 comments on commit d24545c

Please sign in to comment.