Skip to content
Snippets Groups Projects

test pre-built wheel for some of the CI

Merged Pierre-Yves David requested to merge topic/stable/ci-wheel into branch/stable
Compare and
2 files
+ 195
53
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 68
5
@@ -20,4 +20,6 @@
when: always
stages:
- build
- checks
- tests
@@ -23,4 +25,7 @@
- tests
- platform-compat
- py-version-compat
image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
@@ -32,4 +37,5 @@
.all_template: &all
when: on_success
needs: []
@@ -35,4 +41,33 @@
# TODO: we should use an image based on manylinux instead "all-in-one" image
# used for all test so far.
.build-wheel: &wheel
<<: *all
stage: build
variables:
WHEEL_TYPE: ""
FLAVOR: ""
before_script:
- echo "python used, $PYTHON"
- $PYTHON --version
- echo $WHEEL_TYPE
- test -n "$WHEEL_TYPE"
- echo $FLAVOR
- mkdir -p wheels/$WHEEL_TYPE
script:
- $PYTHON setup.py bdist_wheel $FLAVOR --dist-dir wheels/$WHEEL_TYPE
artifacts:
paths:
- wheels/$WHEEL_TYPE
expire_in: 1 week
build-c-wheel:
<<: *wheel
variables:
WHEEL_TYPE: "c"
# TODO: We should select the wheel compatible with the python (and plateform)
# we use. This is necessary to build multiple wheel.
.runtests_template: &runtests
<<: *all
stage: tests
@@ -48,7 +83,19 @@
- ls -1 tests/test-check-*.* > /tmp/check-tests.txt
script:
- echo "$RUNTEST_ARGS"
- HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
- echo "$WHEEL_TYPE"
- WHEEL=""
- if test -n "$WHEEL_TYPE"; then
WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/*.whl`";
test -n "$WHEEL";
fi
- if test -n "$WHEEL"; then
echo installing from $WHEEL;
HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --hg-wheel $WHEEL --color=always $RUNTEST_ARGS;
else
echo installing from source;
HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS;
fi
checks:
<<: *runtests
@@ -52,6 +99,7 @@
checks:
<<: *runtests
stage: checks
variables:
SHOW_VERSION_OF: "$PYTHON black clang-format"
RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
@@ -59,10 +107,10 @@
rust-cargo-test:
<<: *all
stage: tests
stage: checks
script:
- make rust-tests
- make cargo-clippy
variables:
CI_CLEVER_CLOUD_FLAVOR: S
@@ -63,12 +111,12 @@
script:
- make rust-tests
- make cargo-clippy
variables:
CI_CLEVER_CLOUD_FLAVOR: S
test-c: &test_c
.test-c: &test_c
<<: *runtests
variables:
RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
TEST_HGTESTS_ALLOW_NETIO: "1"
@@ -70,8 +118,16 @@
<<: *runtests
variables:
RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
TEST_HGTESTS_ALLOW_NETIO: "1"
test-c:
<<: *test_c
needs: [build-c-wheel]
variables:
WHEEL_TYPE: "c"
RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
TEST_HGTESTS_ALLOW_NETIO: "1"
test-pure:
<<: *runtests
variables:
@@ -99,9 +155,10 @@
# version (and 3.12 have been giving us various troubles)
test-3.8-c:
<<: *test_c
stage: py-version-compat
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.8
test-3.12-c:
<<: *test_c
@@ -102,12 +159,13 @@
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.8
test-3.12-c:
<<: *test_c
stage: py-version-compat
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
test-3.12-rust:
<<: *test_rust
@@ -108,12 +166,13 @@
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
test-3.12-rust:
<<: *test_rust
stage: py-version-compat
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
test-3.13-c:
<<: *test_c
@@ -114,12 +173,13 @@
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.12
test-3.13-c:
<<: *test_c
stage: py-version-compat
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
test-3.13-rust:
<<: *test_rust
@@ -120,11 +180,12 @@
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
test-3.13-rust:
<<: *test_rust
stage: py-version-compat
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
check-pytype:
@@ -126,9 +187,10 @@
when: manual # avoid overloading the CI by default
variables:
PYTHON: python3.13
check-pytype:
extends: .runtests_template
<<: *test_rust
stage: checks
before_script:
- export PATH="/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/shims:/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/bin:$PATH"
- echo "PATH, $PATH"
@@ -149,7 +211,7 @@
.window_runtests_template: &windows_runtests
<<: *all
when: manual # we don't have any Windows runners anymore at the moment
stage: tests
stage: platform-compat
before_script:
- C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt'
# TODO: find/install cvs, bzr, perforce, gpg, sqlite3
@@ -183,6 +245,7 @@
macos:
<<: *test_c
stage: platform-compat
when: manual # avoid overloading the CI by default
tags:
- macos
Loading