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
11 changes: 9 additions & 2 deletions .github/workflows/build_wsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
os: [windows-2022, windows-2025]
include:
- os: windows-2022
skip_tags: "adoptopenjdk,jenkins,MSVS_2013,reboot"
- os: windows-2025
# 2025 runners already have VS 2022 & 2019 redists so skip them on win2025
skip_tags: "adoptopenjdk,jenkins,MSVS_2013,MSVS_2019,MSVS_2022,reboot"
name: Windows
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -80,4 +86,5 @@ jobs:
run: |
export ANSIBLE_CONFIG=./ansible.cfg
# Skip MSVS_2013 until https://github.com/adoptium/infrastructure/issues/2178 is fixed
ansible-playbook -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win --extra-vars 'git_sha=${{ github.sha }}' -b --skip-tags adoptopenjdk,jenkins,MSVS_2013,reboot playbooks/AdoptOpenJDK_Windows_Playbook/main.yml
# Windows 2025 runner already has MSVS_2022 installed so will be skipped in the playbook execution.
ansible-playbook -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win --extra-vars 'git_sha=${{ github.sha }}' -b --skip-tags "${{ matrix.skip_tags }}" playbooks/AdoptOpenJDK_Windows_Playbook/main.yml
5 changes: 2 additions & 3 deletions ansible/pbTestScripts/testJDKWin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ rm -rf /cygdrive/c/tmp/*-jre
rm -rf /cygdrive/c/tmp/*-test-image

#Identify The JDK

# Set Test JDK HOME To The Relocated JDK
# export TEST_JDK_HOME=C:/cygwin64$(find ~ -maxdepth 1 -type d -name "*jdk*"|grep -v ".*jre"| grep -v ".*-image")
export TEST_JDK_HOME=`ls -d c:/tmp/jdk*|grep -v "static"|grep -v "debug"|grep -v "jre"|grep -v "test-image"|grep -v "jmods"`
export TEST_JDK_HOME=`ls -d c:/tmp/jdk*|grep -v "static"|grep -v "debug"|grep -v "jre"|grep -v "test-image"|grep -v "jmods"|grep '[+b]'`
echo TEST_JDK_HOME=$TEST_JDK_HOME

## Run The Same Tests As Test JDK for Linux
Expand Down Expand Up @@ -47,5 +45,6 @@ make _jdk_math_0

# Run Some Additional Tests To Test The Playbooks Have Run Properly
export BUILD_LIST=functional
make compile
make _MBCS_Tests_pref_ja_windows_0
make _MBCS_Tests_formatter_ja_windows_0
114 changes: 61 additions & 53 deletions ansible/pbTestScripts/vagrantPlaybookCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,50 +134,57 @@ checkVars()
echo "Can't find vagrant-rsync-back plugin, installing . . ."
vagrant plugin install vagrant-rsync-back
fi
if [[ "$fastMode" == true ]]; then
skipFullSetup=",nvidia_cuda_toolkit"
case "$jdkToBuild" in
"jdk8" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2019"
fi
;;
"jdk11" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2019"
fi
;;
"jdk17" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017"
fi
;;
"jdk21" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
"jdk22" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
"jdk" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"

if [[ "$fastMode" == true ]]; then
skipFullSetup=",nvidia_cuda_toolkit"
case "$jdkToBuild" in
"jdk8" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2019"
fi
;;
"jdk11" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2019"
fi
;;
"jdk17" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017"
fi
;;
"jdk21" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
"jdk22" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
"jdk25" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
"jdk" )
skipFullSetup="$skipFullSetup,MSVS_2013,MSVS_2017,MSVS_2019";
if [ "$buildHotspot" != "" ]; then
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1,MSVS_2013,MSVS_2017,MSVS_2019"
fi
;;
*)
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1";;
esac
fi
;;
*)
skipFullSetup="$skipFullSetup,MSVS_2010,VS2010_SP1";;
esac
fi
jdkToBuild="--version $jdkToBuild"
jdkToBuild="--version $jdkToBuild"
}

checkVagrantOS()
Expand Down Expand Up @@ -358,7 +365,7 @@ startVMPlaybookWin()
cd $WORKSPACE/adoptopenjdkPBTests/${gitFork}-${newGitBranch}/ansible

if [ "$newVagrantFiles" = "true" ]; then
if [[ "$useAdopt" == "true" ]] && [[ "$OS" == "Win2022" ]]; then
if [[ "$useAdopt" == "true" ]] && [[ "$OS" == "Win2022" || "$OS" == "Win2025" ]]; then
echo "Use Adoptium Box For Win2022"
ln -sf vagrant/Vagrantfile.$OS.Adopt Vagrantfile
else
Expand Down Expand Up @@ -465,14 +472,13 @@ startVMPlaybookWin()
# Run a python script to start a test for the built JDK on the Windows VM
if [[ $PYTHON_VERSION == *"Python 2."* ]]; then
echo "Python 2 detected"
python pbTestScripts/startScriptWin.py -i "127.0.0.1:$vagrantPort" -t 2>&1 | tee $testLogPath
python pbTestScripts/startScriptWin.py -i "127.0.0.1:$vagrantPort" -a "$jdkToBuild" -t 2>&1 | tee $testLogPath
elif [[ $PYTHON_VERSION == *"Python 3."* ]]; then
echo "Python 3 detected"
#echo "Due To Changes In Python 3 - No Output Will Be Displayed Until The Build Is Completed"
#python pbTestScripts/startScriptWin_v2.py -i "127.0.0.1:$vagrantPort" -t 2>&1 | tee $testLogPath
# Create Powershell Script To Launch Tests
echo "& sh \"C:/vagrant/pbTestScripts/testJDKWin.sh\"" > testJDK_Tmp.ps1
# Copy PowerShell Script From Vagrant Share For Performance Reasons & Launch
echo "Due To Changes In Python 3 - No Output Will Be Displayed Until The Build Is Completed"
# Create Powershell Script To Launch Build
echo "Set-Location -Path \"C:/tmp\"" > testJDK_Tmp.ps1
echo "& sh \"C:/vagrant/pbTestScripts/testJDKWin.sh\" $jdkToBuild" >> testJDK_Tmp.ps1
vagrant winrm -s powershell -e -c 'copy c:/vagrant/testJDK_Tmp.ps1 c:/tmp; cd c:/tmp; pwd; ls'
vagrant winrm -e -c 'powershell -ExecutionPolicy Bypass -File c:/tmp/testJDK_Tmp.ps1' | tee $testLogPath
else
Expand Down Expand Up @@ -528,10 +534,12 @@ echo "Testing on the following OSs: $vagrantOS"
for OS in $vagrantOS
do
echo OS = $vagrantOS
if [[ "$OS" == "Win2012" || "$OS" == "Win2022" ]] ; then
startVMPlaybookWin $OS
echo "OS : $OS"

if [[ "$OS" == "Win2012" || "$OS" == "Win2022" || "$OS" == "Win2025" ]]; then
startVMPlaybookWin "$OS"
else
startVMPlaybook $OS
startVMPlaybook "$OS"
fi
if [[ "$vmHalt" == true ]]; then
vagrant halt
Expand Down
2 changes: 1 addition & 1 deletion ansible/vagrant/Vagrantfile.Win2012
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Start-Process powershell -Verb runAs
# Windows 2012r2 needs to be forced to use TLS1.2, see: https://github.com/adoptium/infrastructure/issues/1858
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

wget https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
Expand Down
8 changes: 4 additions & 4 deletions ansible/vagrant/Vagrantfile.Win2022
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $script = <<SCRIPT
Start-Process powershell -Verb runAs


wget https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
Expand Down Expand Up @@ -46,9 +46,9 @@ Vagrant.configure("2") do |config|
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 8192
v.cpus = 2
v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
v.memory = 9126
v.cpus = 3
v.customize ["modifyvm", :id, "--cpuexecutioncap", "65"]
end
config.vm.boot_timeout = 600
end
8 changes: 4 additions & 4 deletions ansible/vagrant/Vagrantfile.Win2022.Adopt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$script = <<SCRIPT
Start-Process powershell -Verb runAs

wget https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
Expand Down Expand Up @@ -45,9 +45,9 @@ Vagrant.configure("2") do |config|
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 8192
v.cpus = 2
v.customize ["modifyvm", :id, "--cpuexecutioncap", "60"]
v.memory = 9126
v.cpus = 3
v.customize ["modifyvm", :id, "--cpuexecutioncap", "65"]
end
config.vm.boot_timeout = 600
end
53 changes: 53 additions & 0 deletions ansible/vagrant/Vagrantfile.Win2025
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Runs Powershell as an administator and does the following:
# - Gets/executes an Ansible provided script that configures WinRM to allow Ansible to communicate over it.
# - Resizes the disk to ~100GB, in line with the 'disksize.size = 100GB' option in the config below

$script = <<SCRIPT
Start-Process powershell -Verb runAs

wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
.\\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck

# Retrieving disk's current size
$currentDiskSize =(Get-Partition -DriveLetter c | select Size)
$currentDiskSize =($currentDiskSize -replace "[^0-9]" , "")
# The size the disk should be, in bytes (130GB)
$diskSizeBoundary = 139586437120
# Changing the disksize to max supported size (~130GB)
if ([long]$currentDiskSize -lt $diskSizeBoundary) {
echo "Resizing disk to max size"
$size = (Get-PartitionSupportedSize -DriveLetter c); Resize-Partition -DriveLetter c -Size $size.SizeMax
}else {
echo "Disk is already at max size"
}

Start-Process cmd -Verb runAs
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
SCRIPT

# 2 = version of configuration file for Vagrant 1.1+ leading up to 2.0.x
Vagrant.configure("2") do |config|

config.vm.define :adoptopenjdkW2025 do |adoptopenjdkW2025|
adoptopenjdkW2025.vm.box = "gusztavvargadr/windows-server-2025-standard"
adoptopenjdkW2025.vm.hostname = "adoptopenjdkW2025"
adoptopenjdkW2025.vm.communicator = "winrm"
adoptopenjdkW2025.vm.synced_folder ".", "/vagrant"
adoptopenjdkW2025.vm.network :private_network, type: "dhcp"
adoptopenjdkW2025.vm.provision "shell", inline: $script, privileged: false
adoptopenjdkW2025.disksize.size = '130GB'
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 9126
v.cpus = 3
v.customize ["modifyvm", :id, "--cpuexecutioncap", "65"]
end
config.vm.boot_timeout = 800
end
53 changes: 53 additions & 0 deletions ansible/vagrant/Vagrantfile.Win2025.Adopt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Runs Powershell as an administator and does the following:
# - Gets/executes an Ansible provided script that configures WinRM to allow Ansible to communicate over it.
# - Resizes the disk to ~100GB, in line with the 'disksize.size = 100GB' option in the config below

$script = <<SCRIPT
Start-Process powershell -Verb runAs

wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
.\\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck

# Retrieving disk's current size
$currentDiskSize =(Get-Partition -DriveLetter c | select Size)
$currentDiskSize =($currentDiskSize -replace "[^0-9]" , "")
# The size the disk should be, in bytes (130GB)
$diskSizeBoundary = 139586437120
# Changing the disksize to max supported size (~130GB)
if ([long]$currentDiskSize -lt $diskSizeBoundary) {
echo "Resizing disk to max size"
$size = (Get-PartitionSupportedSize -DriveLetter c); Resize-Partition -DriveLetter c -Size $size.SizeMax
}else {
echo "Disk is already at max size"
}

Start-Process cmd -Verb runAs
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
SCRIPT

# 2 = version of configuration file for Vagrant 1.1+ leading up to 2.0.x
Vagrant.configure("2") do |config|

config.vm.define :adoptopenjdkW2025 do |adoptopenjdkW2025|
adoptopenjdkW2025.vm.box = "adoptium/windows2025"
adoptopenjdkW2025.vm.hostname = "adoptopenjdkW2025"
adoptopenjdkW2025.vm.communicator = "winrm"
adoptopenjdkW2025.vm.synced_folder ".", "/vagrant"
adoptopenjdkW2025.vm.network :private_network, type: "dhcp"
adoptopenjdkW2025.vm.provision "shell", inline: $script, privileged: false
adoptopenjdkW2025.disksize.size = '131GB'
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 9126
v.cpus = 3
v.customize ["modifyvm", :id, "--cpuexecutioncap", "65"]
end
config.vm.boot_timeout = 800
end
2 changes: 1 addition & 1 deletion ansible/vagrant/Vagrantfile.Windows2022.Core
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $script = <<SCRIPT
Start-Process powershell -Verb runAs


wget https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
wget https://raw.githubusercontent.com/ansible/ansible/38e50c9f819a045ea4d40068f83e78adbfaf2e68/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\\ConfigureRemotingForAnsible.ps1
.\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
Expand Down
Loading