This page describes how to setup WoA machine to run python buildbot.
Access WoA machine in Linaro Farm
Please check out the following page for instructions on how to remotely access woa machine
/wiki/spaces/TCWG/pages/22395192116
...
Credentials
Login/password is allocated by python buildbot administrators.
You can contact the three maintainers (together) for python buildbot server:
Zachary Ware zach@python.org
Pablo Galindo Salgado pablogsal@gmail.com
Victor Stinner vstinner@python.org
Register worker
To be able to connect worker, even with a password allocated, you need to add configuration on this project: https://github.com/python/buildmaster-config
Examples:
Install Visual Studio Build Tools
...
Note: If Python is not added by default to environment variable PATH, please go to “System Properties” -> “Environment Variables” and add the path
Install and setup Buildbot
Buildbot can be installed in any location but it is preferable to install in C:\
to avoid hitting the maximum path limit on windows. Please run following commands to install buildbot-worker
Code Block | ||
---|---|---|
| ||
:: Create Directory for buildbot installation
mkdir C:\Workspace
cd C:\Workspace
:: Create virtual venv
python -m venv venv
:: Activate venv
.\venv\Scripts\activate
:: Install buildbot-worker in virtual env
python -m pip install pypiwin32 buildbot-worker |
Now create a worker using the following command
Code Block | ||
---|---|---|
| ||
buildbot-worker create-worker buildarea buildbot.python.org:9020 linaro-win-arm64 <PASSWORD> |
Password is allocated by python buildbot administrators. Instructions on how to access them will be added later.
You can contact the three maintainers (together) for python buildbot server:
Zachary Ware zach@python.org
Pablo Galindo Salgado pablogsal@gmail.com
Victor Stinner vstinner@python.org
Edit following files to add admin email address and host information
C:\Workspace\buildarea\info\admin
...
Code Block |
---|
Linaro Windows on Arm Support <woa-support@op-lists.linaro.org> |
C:\Workspace\buildarea\info\host
...
Code Block |
---|
Microsoft Surface X Pro; RAM 16GB
OS: Windows 10 Pro (ARM64) |
Now create a batch file to run as a service
C:\Workspace\buildbot.bat
...
Code Block |
---|
:: Initialise ARM64 environment
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsx86_arm64.bat"
:: Add debug runtime DLL to path
set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\arm64\ucrt\;%PATH%
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\14.29.30133\onecore\debug_nonredist\arm64\Microsoft.VC142.DebugCRT\;%PATH%
:: Activate virtual environment
call "C:\Workspace\buildarea\venv\Scripts\activate"
cd C:\Workspace
:: Start buildbot-worker
echo Starting buildbot-workder
buildbot-worker start buildarea
:: Repeat buildbot-worker restart in a loop in case if it ever terminates due to an error
:start
buildbot-worker restart buildarea
goto :start
|
...
You can automate service by using https://nssm.cc, which is free and open source. It gracefully restarts your program (or batch) when it stops. nssm.exe install
to configure a new service.
Register worker
To be able to connect worker, even with a password allocated, you need to add configuration on this project: https://github.com/python/buildmaster-config
Examples:
...
https://github.com/python/buildmaster-config/pull/288
...
Deactivate Windows Firewall
To run python tests, the compiled python must be able to access network. Either you can run it once manually (and add exception when asked), or simply deactivate windows firewall.
Install and setup Buildbot
Script available at: https://gitlab.com/Linaro/windowsonarm/external-ci/python
You can automate service launch by following those instructions: Windows Service management . You need a user which can execute winget.exe
(needed in a python test). Local SYSTEM account can’t.