summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2022-04-12 11:58:45 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2022-04-13 11:23:23 -0400
commit164fca12782575349e76b024d1c880df57de1e3f (patch)
treea7285dde49408557c88693112deeb4e889817589
parent38542f10ada8ec5c3a264549382ef75c813ec672 (diff)
downloadffi-yajl-164fca12782575349e76b024d1c880df57de1e3f.tar.gz
Use build tools that are included with devkit
These are in the devkit that is part of the base image and are guaranteed correct for native compilation of gems against these versions of ruby. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r--.expeditor/buildkite/run_windows_tests.ps144
-rw-r--r--.expeditor/verify.pipeline.yml4
2 files changed, 33 insertions, 15 deletions
diff --git a/.expeditor/buildkite/run_windows_tests.ps1 b/.expeditor/buildkite/run_windows_tests.ps1
index 3e2277b..ed5c28a 100644
--- a/.expeditor/buildkite/run_windows_tests.ps1
+++ b/.expeditor/buildkite/run_windows_tests.ps1
@@ -1,24 +1,42 @@
-# Stop script execution when a non-terminating error occurs
-$ErrorActionPreference = "Stop"
+param([String]$version)
+# This script will run ruby test on windows platform. It requires a version
+# "3.0" or "3.1" as an argument.
-# This will run ruby test on windows platform
+# Stop script execution when a non-terminating error occurs. Note that this makes it
+# unneccesary to check the exit code of each program being run - non-zero exit will force it to fail and terminate.
+$ErrorActionPreference = "Stop"
-echo "--- Install make "
-choco install make --source=cygwin
-If ($lastexitcode -ne 0) { Exit $lastexitcode }
+# The specific paths of tools within the ruby30/31 devkit vary a bit across 3.0 and 3.1
+if ($version -eq "3.0")
+{
+ $base_dir = "C:\ruby30\"
+ $Env:PATH += ";" + $base_dir + "ruby\bin;" + $base_dir + "msys64\usr\bin;" + $base_dir + "msys64\mingw64\bin"
+}
+elseif($version -eq "3.1")
+{
+ $base_dir = "C:\ruby31\"
+ # Note path change - gcc is living in ucrt64\bin here, and mingw64 in earlier versions.
+ $Env:PATH += ";" + $base_dir + "ruby\bin;" + $base_dir + "msys64\usr\bin;" + $base_dir + "msys64\ucrt64\bin"
+}
-Write-Output "--- Bundle install"
+Write-Output "--- Ensuring required bins are in path"
+Write-Output "PATH: " + $Env:PATH
+make --version
+gcc --version
ruby --version
bundler --version
+
+Write-Output "--- Updating system gems"
gem update --system
-If ($lastexitcode -ne 0) { Exit $lastexitcode }
+
+Write-Output "--- Bundle install"
bundle install --without development_extras --jobs 3 --retry 3 --path vendor/bundle
-If ($lastexitcode -ne 0) { Exit $lastexitcode }
+
+Write-Output "--- Gem install"
gem install yajl-ruby json psych
-If ($lastexitcode -ne 0) { Exit $lastexitcode }
-Write-Output "--- Bundle Execute"
+Write-Output "--- Bundle Execute: rake compile"
bundle exec rake compile
-If ($lastexitcode -ne 0) { Exit $lastexitcode }
+
+Write-Output "--- Bundle Execute: rake spec"
bundle exec rake spec
-If ($lastexitcode -ne 0) { Exit $lastexitcode } \ No newline at end of file
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 83ce300..c105118 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -61,7 +61,7 @@ steps:
- label: "run-specs-ruby-3.0-windows"
command:
- - .expeditor/buildkite/run_windows_tests.ps1
+ - .expeditor/buildkite/run_windows_tests.ps1 "3.0"
timeout_in_minutes: 20
expeditor:
executor:
@@ -75,7 +75,7 @@ steps:
- label: "run-specs-ruby-3.1-windows"
command:
- - .expeditor/buildkite/run_windows_tests.ps1
+ - .expeditor/buildkite/run_windows_tests.ps1 "3.1"
timeout_in_minutes: 20
expeditor:
executor: