Skip to content
Snippets Groups Projects
Commit 0de1895c authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

ci: build a wheel and use it to run c tests

First step into building and testing wheel automatically.
parent c99cbb02
No related branches found
No related tags found
2 merge requests!1045Merge stable into default,!1036test pre-built wheel for some of the CI
Pipeline #90898 passed
......@@ -39,6 +39,35 @@
when: on_success
needs: []
# 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
......@@ -54,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
......@@ -73,9 +114,9 @@
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"
......@@ -77,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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment