Skip to content

Commit ef425ac

Browse files
authored
Merge pull request #6764 from BOINC/vko_add_win11_tests
Test BOINC installation on Windows 11 ARM64
2 parents a794054 + 74b89e4 commit ef425ac

File tree

2 files changed

+208
-9
lines changed

2 files changed

+208
-9
lines changed

.github/workflows/windows.yml

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,6 @@ jobs:
136136
if: success() && !startsWith(github.ref, 'refs/tags/') && matrix.configuration == 'Release'
137137
run: python ./tests/msi_validation.py "C:\Program Files (x86)\MsiVal2\MsiVal2.exe" "${{github.workspace}}\win_build\Build\${{matrix.platform}}\${{matrix.configuration}}\boinc.msi" "${{github.workspace}}\installer\darice.cub"
138138

139-
- name: Run installation
140-
if: success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
141-
shell: powershell
142-
run: Start-Process "msiexec.exe" -ArgumentList "/i ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\boinc.msi /quiet /qn /l*v ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\install.log" -Wait
143-
144-
- name: Run installation tests
145-
if: success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
146-
run: python ./tests/windows_installer_integration_tests.py
147-
148139
- name: Prepare logs on failure
149140
if: ${{failure()}}
150141
run: |
@@ -214,6 +205,73 @@ jobs:
214205
env:
215206
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
216207

208+
msbuild-test:
209+
name: ${{matrix.platform}}-${{matrix.type}}-msbuild-test
210+
runs-on: ${{matrix.runner}}
211+
needs: msbuild
212+
strategy:
213+
matrix:
214+
type: [install, upgrade_from_alpha, upgrade_from_stable]
215+
platform: [x64, arm64]
216+
include:
217+
- platform: x64
218+
runner: windows-latest
219+
- platform: arm64
220+
runner: windows-11-arm
221+
fail-fast: false
222+
steps:
223+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
224+
with:
225+
fetch-depth: 2
226+
227+
- name: Install previous alpha version
228+
if: success() && matrix.type == 'upgrade_from_alpha'
229+
shell: powershell
230+
run: |
231+
python ./tests/download_boinc_installer.py ${{matrix.platform}} alpha
232+
if (Test-Path "./${{matrix.platform}}_alpha.exe") {
233+
Start-Process "./${{matrix.platform}}_alpha.exe" -ArgumentList "/quiet /qn /l*v alpha.log" -Wait
234+
}
235+
236+
- name: Install previous stable version
237+
if: success() && matrix.type == 'upgrade_from_stable'
238+
shell: powershell
239+
run: |
240+
python ./tests/download_boinc_installer.py ${{matrix.platform}} release
241+
if (Test-Path "./${{matrix.platform}}_release.exe") {
242+
Start-Process "./${{matrix.platform}}_release.exe" -ArgumentList "/quiet /qn /l*v release.log" -Wait
243+
}
244+
245+
- name: Download installer artifact
246+
if: success()
247+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
248+
with:
249+
name: win_installer_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
250+
251+
- name: Extract installer artifact
252+
if: success()
253+
run: |
254+
7z x win_installer.7z
255+
256+
- name: Run installation
257+
if: success()
258+
shell: powershell
259+
run: Start-Process "./installer_setup.exe" -ArgumentList "/quiet /qn /l*v install.log" -Wait
260+
261+
- name: Run installation tests
262+
if: success()
263+
run: python ./tests/windows_installer_integration_tests.py
264+
265+
- name: Upload logs on failure
266+
if: failure()
267+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
268+
with:
269+
name: windows_installer_test_logs_${{matrix.platform}}_${{matrix.type}}_${{github.event.pull_request.head.sha}}
270+
path: |
271+
install.log
272+
alpha.log
273+
release.log
274+
217275
cmake:
218276
name: ${{matrix.configuration}}-${{matrix.platform}}-cmake
219277
runs-on: windows-latest

tests/download_boinc_installer.py

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
#!/usr/bin/env python3
2+
3+
# This file is part of BOINC.
4+
# https://boinc.berkeley.edu
5+
# Copyright (C) 2026 University of California
6+
#
7+
# BOINC is free software; you can redistribute it and/or modify it
8+
# under the terms of the GNU Lesser General Public License
9+
# as published by the Free Software Foundation,
10+
# either version 3 of the License, or (at your option) any later version.
11+
#
12+
# BOINC is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15+
# See the GNU Lesser General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU Lesser General Public License
18+
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
19+
20+
"""
21+
Download BOINC installer for Windows based on platform and version type.
22+
23+
Usage:
24+
python3 download_boinc_installer.py <platform> <type>
25+
26+
platform: x64 or arm64
27+
type: release or alpha
28+
29+
Examples:
30+
python3 download_boinc_installer.py x64 release
31+
python3 download_boinc_installer.py arm64 alpha
32+
"""
33+
34+
import sys
35+
import urllib.request
36+
import xml.etree.ElementTree as ET
37+
38+
39+
def download_file(url, filename):
40+
"""Download a file from URL and save it with the given filename."""
41+
print(f"Downloading {url}...")
42+
urllib.request.urlretrieve(url, filename)
43+
print(f"Successfully downloaded to {filename}")
44+
45+
46+
def get_download_url(xml_content, platform, version_type):
47+
"""
48+
Parse XML and extract download URL based on platform and version type.
49+
50+
Args:
51+
xml_content: XML content as string
52+
platform: 'x64' or 'arm64'
53+
version_type: 'release' or 'alpha'
54+
55+
Returns:
56+
URL string or None if not found
57+
"""
58+
root = ET.fromstring(xml_content)
59+
60+
# Map input parameters to XML values
61+
platform_map = {
62+
'x64': 'Windows Intel-compatible 64-bit',
63+
'arm64': 'Windows ARM 64-bit'
64+
}
65+
66+
version_map = {
67+
'release': 'Recommended version',
68+
'alpha': 'Development version'
69+
}
70+
71+
target_platform = platform_map.get(platform)
72+
target_version = version_map.get(version_type)
73+
74+
if not target_platform or not target_version:
75+
print(f"Error: Invalid platform '{platform}' or type '{version_type}'")
76+
return None
77+
78+
# Find matching version entry
79+
for version in root.findall('version'):
80+
platform_elem = version.find('platform')
81+
description_elem = version.find('description')
82+
url_elem = version.find('url')
83+
84+
if (platform_elem is not None and platform_elem.text == target_platform and
85+
description_elem is not None and description_elem.text == target_version and
86+
url_elem is not None):
87+
return url_elem.text
88+
89+
return None
90+
91+
92+
def main():
93+
if len(sys.argv) != 3:
94+
print("Usage: python3 download_boinc_installer.py <platform> <type>")
95+
print(" platform: x64 or arm64")
96+
print(" type: release or alpha")
97+
sys.exit(1)
98+
99+
platform = sys.argv[1].lower()
100+
version_type = sys.argv[2].lower()
101+
102+
if platform not in ['x64', 'arm64']:
103+
print(f"Error: Invalid platform '{platform}'. Use 'x64' or 'arm64'")
104+
sys.exit(1)
105+
106+
if version_type not in ['release', 'alpha']:
107+
print(f"Error: Invalid type '{version_type}'. Use 'release' or 'alpha'")
108+
sys.exit(1)
109+
110+
xml_url = 'https://boinc.berkeley.edu/download_all.php?xml=1'
111+
112+
print(f"Fetching version information from {xml_url}...")
113+
try:
114+
with urllib.request.urlopen(xml_url) as response:
115+
xml_content = response.read().decode('utf-8')
116+
except Exception as e:
117+
print(f"Error downloading XML: {e}")
118+
sys.exit(1)
119+
120+
download_url = get_download_url(xml_content, platform, version_type)
121+
122+
if not download_url:
123+
if version_type == 'alpha':
124+
print(f"Development version for {platform} is not available. This is normal.")
125+
sys.exit(0)
126+
else:
127+
print(f"Error: Could not find download URL for {platform} {version_type}")
128+
sys.exit(1)
129+
130+
output_filename = f"{platform}_{version_type}.exe"
131+
132+
try:
133+
download_file(download_url, output_filename)
134+
print(f"Download completed successfully: {output_filename}")
135+
except Exception as e:
136+
print(f"Error downloading file: {e}")
137+
sys.exit(1)
138+
139+
140+
if __name__ == '__main__':
141+
main()

0 commit comments

Comments
 (0)