-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME_BUILDSLAVE
71 lines (54 loc) · 2.92 KB
/
README_BUILDSLAVE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
How to setup a buildslave for PyPy
==================================
There are three documented ways to run a PyPy buildslave:
- "bare metal" on the host machine, described below
- in a chroot, setting up the chroot is described in `README-CHROOT`
- via docker on a centos6-based image, see docker/Dockerfile
In all cases the required setup is::
- hg
- "python" should run a python 2.6-2.7 that will run the test suites.
This should be pypy2.7 on windows to prevent problems with mixing runtimes,
(cpython is built with an ancient MSVC) but the buildbot itself requires
pywin32 which is not supported, so you must use cpython on windows to run the
buildbot. One way to have python.exe be an alias to pypy.exe is to create a
PyPy2 virtual env and copy pypy.exe to python.exe. But now how can you run
the buildbot? Create a CPython virtualenv, rename the python.exe in it to
"python_for_buildbot" and run the buildbot with "python_for_buildbot.exe
buildslave start"
- virtualenv that will use the "python" from above
- pytest, hypothesis, cffi for testing
- all the build dependencies list here
http://doc.pypy.org/en/latest/build.html?highlight=dependencies#install-build-time-dependencies
If your slave will be translating, you will also need
- pypy in your path
- at least 4GB of RAM for 32 bit, 6GB for 64 bit translations
On MacOS, you will need to use CPython2.7.16+ in order to download and build
the xz package since it requires a modern SSL.
On windows, you will need to add `externals/bin` to your PATH before running
the buildslave.
Then you will need to install the ``buildbot-slave`` package, which will
install many other packages like twised, so you may prefer to run the
slave in a virtualenv::
pip install buildbot-slave
The next step is to create a buildslave configuration file. Based on version
0.8.7 of buildbot you need to execute the following command.
buildslave create-slave BASEDIR MASTERHOST:PORT SLAVENAME PASSWORD
The MASTERHOST currently is ``buildbot.pypy.org``. The
value for PORT is ``10407``.
SLAVENAME and PASSWORD can be freely chosen. These values need to be added to
the slaveinfo.py configuration file on the MASTERHOST, ask in the IRC channel
(#pypy on irc.libera.chat) for the settings to be added. BASEDIR is a path to a
local directory that will be created to contain all the files will be used by
the buildslave.
Finally you will need to update the buildmaster configuration found in
https://foss.heptapod.net/pypy/buildbot/src/default/bot2/pypybuildbot/master.py
to associate the buildslave with one or more
builders. Builders define what tasks should be executed on the buildslave.
Once the changes are commited the buildmaster on MASTERHOST needs to be updated
and restared to reflect the changes to the configuration.
Starting and stopping the buildslave
====================================
To start the buildslave just run
buildslave start BASEDIR
and to stop it run
buildslave stop BASEDIR