Skip to content
Open
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
16 changes: 6 additions & 10 deletions cpp/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
bazel version
if($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
} else {
bazel run //:buildifier
}
bazel build //...
bazel run //:hello_world
Get-ChildItem env:
bazel build //:hello_world --subcommands=pretty_print
whereis gcc-12
whereis gcc
ls -ld /usr/bin/*gcc* /bin/*gcc* /home/appveyor/bin/*
ls -ld /usr/bin/*ld* /bin/*ld* /home/appveyor/bin/*
12 changes: 0 additions & 12 deletions cpp_and_python/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,3 @@ $ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
bazel version
if ($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
}
else {
bazel run //:buildifier
}
bazel build //...
bazel run //:hello_world_everyone
bazel run //:hello_world_code_dive
bazel run //:hello_world_ndc_techtown
16 changes: 0 additions & 16 deletions cpp_coverage/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,3 @@ $ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
bazel version
if($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
} else {
bazel run //:buildifier
}
bazel build //...
bazel test //:foo_test
if($IsWindows) {
Write-Host "Skipping 'bazel coverage //:foo_test' on Windows"
Write-Host "Bazel coverage is not supported on Windows"
Write-Host "See https://github.com/bazelbuild/bazel/issues/6374"
} else {
bazel coverage //:foo_test
}
23 changes: 6 additions & 17 deletions linux_toolchain/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@ Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
if ($IsWindows) {
Write-Host "Skipping 'linux_toolchain' on Windows"
Write-Host "Like the name of the example says, this in Linux only"
}
else {
bazel version
bazel run //:buildifier
if ($Env:APPVEYOR_BUILD_WORKER_IMAGE) {
Write-Host "Skipping running this example in the CI"
Write-Host "That the generated toolchain works is highly dependent on the environment"
}
else {
bazel build //...
bazel build //... --platforms=//platform:linux_x64
bazel run //:hello_world
}
}
Get-ChildItem env:
bazel build //:hello_world --subcommands=pretty_print
whereis gcc-12
whereis gcc
ls -ld /usr/bin/*gcc* /bin/*gcc* /home/appveyor/bin/*
ls -ld /usr/bin/*ld* /bin/*ld* /home/appveyor/bin/*
11 changes: 0 additions & 11 deletions python/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,3 @@ $ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
bazel version
if ($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
}
else {
bazel run //:buildifier
}
bazel build //...
bazel run //:bin
bazel test //:test
22 changes: 11 additions & 11 deletions script.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$folders = Get-ChildItem | Where-Object{$_.PSISContainer}
foreach ($folder in $folders){
if(-Not ($folder -Match ".bazelci") ){
$output = "-- Executing CI commands for example $folder --"
Write-Host "".PadRight($output.length, '-')
Write-Host $output
Write-Host "".PadRight($output.length, '-')
Invoke-Expression -Command (Join-Path $folder "ci_execution.ps1")
if ($LASTEXITCODE -ne "0") {
Write-Error "ci_execution.ps1 failed" -ErrorAction Stop
}
$folders = Get-ChildItem | Where-Object { $_.PSISContainer }
foreach ($folder in $folders) {
if (($folder -Match "cpp") -or ($folder -Match "linux_toolchain")) {
$output = "-- Executing CI commands for example $folder --"
Write-Host "".PadRight($output.length, '-')
Write-Host $output
Write-Host "".PadRight($output.length, '-')
Invoke-Expression -Command (Join-Path $folder "ci_execution.ps1")
if ($LASTEXITCODE -ne "0") {
Write-Error "ci_execution.ps1 failed" -ErrorAction Stop
}
}
}
9 changes: 0 additions & 9 deletions third_party_dependencies/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,3 @@ $ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
bazel version
if($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
} else {
bazel run //:buildifier
}
bazel build //...
bazel test //...
24 changes: 5 additions & 19 deletions windows_toolchain/ci_execution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,8 @@ $ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
# In case Appveyor decides to update the Visual Studio installation this will help to figure out the new version
# Get-ChildItem env:
bazel version
if ($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/keith/buildifier-prebuilt/issues/99 and https://github.com/bazelbuild/bazel-central-registry/issues/380"
if ($Env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") {
bazel build //...
bazel build //... --platforms=//platform:windows_x64
bazel run //:hello_world
}
else {
Write-Host "Skipping 'windows_toolchain' if the image is not having Visual Studio 2019"
}
}
else {
Write-Host "Skipping 'windows_toolchain' example on Linux"
Write-Host "Like the name of the example says, this in Windows only"
}
Get-ChildItem env:
whereis gcc-12
whereis gcc
ls -ld /usr/bin/*gcc* /bin/*gcc* /home/appveyor/bin/*
ls -ld /usr/bin/*ld* /bin/*ld* /home/appveyor/bin/*