File tree 8 files changed +22
-3
lines changed 8 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 45
45
working_directory : buildconfig/manylinux-build/docker_base
46
46
command : docker build -t manylinux2014_base_aarch64 -f Dockerfile-aarch64 .
47
47
48
+ - run :
49
+ name : Substitute core count in pip config file for speed
50
+ command : sed -i "s/{nproc}/$(nproc)/g" buildconfig/pip_config.ini
51
+
48
52
- run :
49
53
name : Build the Linux wheels.
50
54
command : |
Original file line number Diff line number Diff line change 83
83
# Build a wheel, install it for running unit tests
84
84
run : |
85
85
export PIP_CONFIG_FILE=buildconfig/pip_config.ini
86
+ echo "\nSubstituting core count in pip config file for speed\n"
87
+ sed -i "s/{nproc}/$(nproc)/g" $PIP_CONFIG_FILE
86
88
echo "\nBuilding pygame wheel\n"
87
89
python3 setup.py docs
88
90
pip3 wheel . --wheel-dir /artifacts -vvv
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ jobs:
181
181
key : macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
182
182
fail-on-cache-miss : true
183
183
184
+ - name : Substitute core count in pip config file for speed
185
+ run : sed -i '' "s/{nproc}/$(sysctl -n hw.logicalcpu)/g" buildconfig/pip_config.ini
186
+
184
187
- name : Build and test wheels
185
188
uses : pypa/cibuildwheel@v2.16.4
186
189
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ jobs:
110
110
tags : ${{ steps.meta.outputs.tags }}
111
111
labels : ${{ steps.meta.outputs.labels }}
112
112
113
+ - name : Substitute core count in pip config file for speed
114
+ run : sed -i "s/{nproc}/$(nproc)/g" buildconfig/pip_config.ini
115
+
113
116
- name : Build and test wheels
114
117
env :
115
118
# set custom pygame images
Original file line number Diff line number Diff line change 69
69
env :
70
70
PIP_CONFIG_FILE : " buildconfig/pip_config.ini"
71
71
run : |
72
+ # Substitute core count in pip config file for speed
73
+ sed -i "s/{nproc}/$(nproc)/g" $PIP_CONFIG_FILE
72
74
python3 setup.py docs
73
75
python3 setup.py sdist
74
76
pip3 install dist/pygame-*.tar.gz -vv
Original file line number Diff line number Diff line change @@ -151,6 +151,11 @@ jobs:
151
151
- uses : TheMrMilchmann/setup-msvc-dev@v3 # this lets us use the developer command prompt on windows
152
152
with :
153
153
arch : ${{ matrix.msvc-dev-arch }}
154
+
155
+ - name : Substitute core count in pip config file for speed
156
+ shell : bash
157
+ run : sed -i "s/{nproc}/$(nproc)/g" buildconfig/pip_config.ini
158
+
154
159
- name : Build and test wheels
155
160
shell : cmd
156
161
run : |
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export PKG_CONFIG_PATH="$PG_DEP_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
16
16
export PATH=" /usr/local/opt/coreutils/libexec/gnubin:$PATH "
17
17
18
18
# for great speed.
19
- export MAKEFLAGS=" -j 4 "
19
+ export MAKEFLAGS=" -j $( sysctl -n hw.logicalcpu ) "
20
20
21
21
# With this we
22
22
# 1) Force install prefix to $PG_DEP_PREFIX
Original file line number Diff line number Diff line change 4
4
[wheel]
5
5
6
6
# preserve this multiline assignment to register these args as distinct
7
- # use -j3 to use 3 cores, most CI machines have either 2 or 3 cores
7
+ # {nproc} gets substituted to the number of cores when this file is used.
8
8
global-option =
9
9
build_ext
10
- -j3
10
+ -j{nproc}
You can’t perform that action at this time.
0 commit comments