Show More
@@ -0,0 +1,14 b'' | |||
|
1 | FROM registry.heptapod.net/mercurial/ci-images/mercurial-core:v2.0 | |
|
2 | ||
|
3 | USER ci-runner | |
|
4 | ||
|
5 | ENV PATH=/home/ci-runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
|
6 | ENV PYTHONPATH=/home/ci-runner/.local/lib/python3.11/site-packages | |
|
7 | ||
|
8 | RUN python3 -m pip install --user --break-system-packages --upgrade pytype==2023.11.21 | |
|
9 | ||
|
10 | ADD --chown=ci-runner entrypoint.sh /home/ci-runner/entrypoint.sh | |
|
11 | ||
|
12 | RUN chmod -R a=rwX /home/ci-runner/.local/ /home/ci-runner/entrypoint.sh | |
|
13 | ||
|
14 | CMD /home/ci-runner/entrypoint.sh |
@@ -0,0 +1,8 b'' | |||
|
1 | #!/usr/bin/env bash | |
|
2 | ||
|
3 | set -euo pipefail | |
|
4 | ||
|
5 | cd /tmp/mercurial-ci/ | |
|
6 | make local | |
|
7 | ./contrib/setup-pytype.sh | |
|
8 | ./contrib/check-pytype.sh |
@@ -0,0 +1,28 b'' | |||
|
1 | #!/usr/bin/env bash | |
|
2 | ||
|
3 | # find repo-root without calling hg as this might be run with sudo | |
|
4 | THIS="$(readlink -m "$0")" | |
|
5 | HERE="$(dirname "$THIS")" | |
|
6 | HG_ROOT="$(readlink -m "$HERE"/../../..)" | |
|
7 | echo source mercurial repository: "$HG_ROOT" | |
|
8 | ||
|
9 | # find actual user as this might be run with sudo | |
|
10 | if [ -n "$SUDO_UID" ]; then | |
|
11 | ACTUAL_UID="$SUDO_UID" | |
|
12 | else | |
|
13 | ACTUAL_UID="$(id -u)" | |
|
14 | fi | |
|
15 | if [ -n "$SUDO_GID" ]; then | |
|
16 | ACTUAL_GID="$SUDO_GID" | |
|
17 | else | |
|
18 | ACTUAL_GID="$(id -g)" | |
|
19 | fi | |
|
20 | echo using user "$ACTUAL_UID:$ACTUAL_GID" | |
|
21 | if groups | egrep -q '\<(docker|root)\>' ; then | |
|
22 | env DOCKER_BUILDKIT=1 docker build --tag mercurial-pytype-checker "$HERE" | |
|
23 | docker run --rm -it --user "$ACTUAL_UID:$ACTUAL_GID" -v "$HG_ROOT:/tmp/mercurial-ci" mercurial-pytype-checker | |
|
24 | else | |
|
25 | echo "user not in the docker group" >&2 | |
|
26 | echo "(consider running this with \`sudo\`)" >&2 | |
|
27 | exit 255 | |
|
28 | fi |
@@ -296,10 +296,12 b' pyoxidizer-macos-tests: pyoxidizer' | |||
|
296 | 296 | rm -rf $(PYOX_DIR)/doc |
|
297 | 297 | cp -a doc $(PYOX_DIR)/doc |
|
298 | 298 | |
|
299 | pytype-docker: | |
|
300 | contrib/docker/pytype/recipe.sh | |
|
299 | 301 | |
|
300 | 302 | .PHONY: help all local build doc cleanbutpackages clean install install-bin \ |
|
301 | 303 | install-doc install-home install-home-bin install-home-doc \ |
|
302 | 304 | dist dist-notests check tests rust-tests check-code format-c \ |
|
303 | 305 | update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \ |
|
304 | 306 | $(packaging_targets) \ |
|
305 | osx | |
|
307 | osx pytype-docker |
General Comments 0
You need to be logged in to leave comments.
Login now