Show More
@@ -1,44 +1,48 b'' | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash | |
2 |
|
2 | |||
3 | # Intended to run within docker using image: |
|
3 | # Intended to run within docker using image: | |
4 | # |
|
4 | # | |
5 | # registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0 |
|
5 | # registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0 | |
6 | # |
|
6 | # | |
7 | # we might want to factor most of this with the associated mercurial-core CI |
|
7 | # we might want to factor most of this with the associated mercurial-core CI | |
8 | # definition. (i.e. move this script into a place where the CI can directly call it for its purpose) |
|
8 | # definition. (i.e. move this script into a place where the CI can directly call it for its purpose) | |
9 |
|
9 | |||
10 | set -e -x |
|
10 | set -e -x | |
11 |
|
11 | |||
12 | PYTHON_TARGETS="cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313" |
|
12 | PYTHON_TARGETS="cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313" | |
13 |
|
13 | |||
14 | export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1 |
|
14 | export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1 | |
15 |
|
15 | |||
16 | # We need to copy the repository to ensure: |
|
16 | # We need to copy the repository to ensure: | |
17 | # (1) we don't wrongly write roots files in the repository (or any other wrong |
|
17 | # (1) we don't wrongly write roots files in the repository (or any other wrong | |
18 | # users) |
|
18 | # users) | |
19 | # (2) we don't reuse pre-compiled extension built outside for manylinux and |
|
19 | # (2) we don't reuse pre-compiled extension built outside for manylinux and | |
20 | # therefor not compatible. |
|
20 | # therefor not compatible. | |
21 | cp -r /src/ /tmp/src/ |
|
21 | cp -r /src/ /tmp/src/ | |
22 | cd /tmp/src/ |
|
22 | cd /tmp/src/ | |
23 | hg purge --all --no-confirm |
|
23 | # clear potentially cached artifact from the host | |
|
24 | # (we could narrow this purge probably) | |||
|
25 | hg purge \ | |||
|
26 | --ignored \ | |||
|
27 | --no-confirm | |||
24 |
|
28 | |||
25 | export HGRCPATH=/tmp/build-config.rc |
|
29 | export HGRCPATH=/tmp/build-config.rc | |
26 | cat << EOF > $HGRCPATH |
|
30 | cat << EOF > $HGRCPATH | |
27 | [trusted] |
|
31 | [trusted] | |
28 | users=* |
|
32 | users=* | |
29 | groups=* |
|
33 | groups=* | |
30 | EOF |
|
34 | EOF | |
31 |
|
35 | |||
32 | for py in $PYTHON_TARGETS; do |
|
36 | for py in $PYTHON_TARGETS; do | |
33 | echo 'build wheel for' $py |
|
37 | echo 'build wheel for' $py | |
34 | # cleanup any previous wheel |
|
38 | # cleanup any previous wheel | |
35 | tmp_wd="/tmp/wheels/$py/repaired" |
|
39 | tmp_wd="/tmp/wheels/$py/repaired" | |
36 | rm -rf $tmp_wd |
|
40 | rm -rf $tmp_wd | |
37 | mkdir -p $tmp_wd |
|
41 | mkdir -p $tmp_wd | |
38 | # build a new wheel |
|
42 | # build a new wheel | |
39 | contrib/build-one-linux-wheel.sh $py $tmp_wd |
|
43 | contrib/build-one-linux-wheel.sh $py $tmp_wd | |
40 | # fix the owner back to the repository owner |
|
44 | # fix the owner back to the repository owner | |
41 | chown `stat /src/ -c %u:%g` $tmp_wd/*.whl |
|
45 | chown `stat /src/ -c %u:%g` $tmp_wd/*.whl | |
42 | mv $tmp_wd/*.whl /src/dist |
|
46 | mv $tmp_wd/*.whl /src/dist | |
43 | done |
|
47 | done | |
44 |
|
48 |
General Comments 0
You need to be logged in to leave comments.
Login now