diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml index b4c88c7daa4f333a72dd4302507b581f510fc8b7_Y29udHJpYi9oZXB0YXBvZC1jaS55bWw=..597f07a32d92be8392d2f2e9c9a626a60c0dfe9f_Y29udHJpYi9oZXB0YXBvZC1jaS55bWw= 100644 --- a/contrib/heptapod-ci.yml +++ b/contrib/heptapod-ci.yml @@ -1,6 +1,6 @@ stages: - tests - - phabricator + - packages image: registry.heptapod.net/mercurial/ci-images/mercurial-core @@ -8,7 +8,7 @@ PYTHON: python TEST_HGMODULEPOLICY: "allow" -.runtests_template: &runtests +.runtests_template: stage: tests # The runner made a clone as root. # We make a new clone owned by user used to run the step. @@ -22,5 +22,14 @@ script: - echo "python used, $PYTHON" - echo "$RUNTEST_ARGS" - - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS + - > + HGMODULEPOLICY="$TEST_HGMODULEPOLICY" + "$PYTHON" tests/run-tests.py + --outputdir ${CI_PROJECT_DIR} + --color=always + --xunit ${CI_PROJECT_DIR}/${CI_JOB_ID}.xml + $RUNTEST_ARGS + artifacts: + reports: + junit: ${CI_JOB_ID}.xml @@ -26,5 +35,5 @@ -checks-py2: - <<: *runtests +checks: + extends: .runtests_template variables: RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" @@ -29,3 +38,6 @@ variables: RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" + parallel: + matrix: + - PYTHON: [python2, python3] @@ -31,12 +43,6 @@ -checks-py3: - <<: *runtests - variables: - RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" - PYTHON: python3 - -rust-cargo-test-py2: &rust_cargo_test +rust-cargo-test: stage: tests script: - echo "python used, $PYTHON" - make rust-tests @@ -39,5 +45,9 @@ stage: tests script: - echo "python used, $PYTHON" - make rust-tests + parallel: + matrix: + - PYTHON: [python2, python3] + - {PYTHON: [python3], HG_RUST_FEATURES: [dirstate-tree]} @@ -43,10 +53,5 @@ -rust-cargo-test-py3: - stage: tests - <<: *rust_cargo_test - variables: - PYTHON: python3 - -phabricator-refresh: - stage: phabricator +phabricator-success: + stage: .post + when: on_success script: @@ -52,3 +57,7 @@ script: - - "./contrib/phab-refresh-stack.sh --comment \":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\"" + - > + ./contrib/phab-refresh-stack.sh + --comment ":white_check_mark: refresh by + Heptapod after a successful CI run (:octopus: :green_heart:) + ${CI_PIPELINE_URL}" @@ -54,7 +63,11 @@ -test-py2: - <<: *runtests - variables: - RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" - TEST_HGMODULEPOLICY: "c" +phabricator-failure: + stage: .post + when: on_failure + script: + - > + ./contrib/phab-refresh-stack.sh + --comment ":negative_squared_cross_mark: refresh by + Heptapod after a failed CI run (:octopus: :heart:) + ${CI_PIPELINE_URL}" @@ -60,5 +73,5 @@ -test-py3: - <<: *runtests +test: + extends: .runtests_template variables: RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" @@ -63,18 +76,23 @@ variables: RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" - PYTHON: python3 - TEST_HGMODULEPOLICY: "c" - -test-py2-pure: - <<: *runtests - variables: - RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" - TEST_HGMODULEPOLICY: "py" - -test-py3-pure: - <<: *runtests - variables: - RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" - PYTHON: python3 - TEST_HGMODULEPOLICY: "py" + parallel: + matrix: + - PYTHON: + - python2 + - python3 + TEST_HGMODULEPOLICY: + - c + - py + - PYTHON: + - python2 + - python3 + RUNTEST_ARGS: + - " --no-rust --blacklist /tmp/check-tests.txt --chg" + - PYTHON: + - python2 + - python3 + TEST_HGMODULEPOLICY: + - rust+c + HGWITHRUSTEXT: + - cpython @@ -80,8 +98,31 @@ -test-py2-rust: - <<: *runtests - variables: - HGWITHRUSTEXT: cpython - RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" - TEST_HGMODULEPOLICY: "rust+c" +build-wheels-x86: + stage: packages + image: quay.io/pypa/${PLATFORM} + script: + - yum install -y gettext + - | + for pythondir in /opt/python/* + do + $pythondir/bin/pip install docutils pygments + $pythondir/bin/pip wheel --no-binary :all: -w wheelhouse/ . + done + - | + for whl in wheelhouse/*-linux_*.whl + do + auditwheel repair --plat "$PLATFORM" $whl + done + - rm -v wheelhouse/*-linux_*.whl + - mv -v wheelhouse/*.whl . + artifacts: + paths: + - "*.whl" + parallel: + matrix: + - PLATFORM: + - manylinux1_i686 + - manylinux2010_i686 + # - manylinux2010_x86_64 + - manylinux2014_i686 + - manylinux2014_x86_64 @@ -87,21 +128,9 @@ -test-py3-rust: - <<: *runtests - variables: - HGWITHRUSTEXT: cpython - RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" - PYTHON: python3 - TEST_HGMODULEPOLICY: "rust+c" - -test-py2-chg: - <<: *runtests - variables: - RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" - TEST_HGMODULEPOLICY: "c" - -test-py3-chg: - <<: *runtests - variables: - PYTHON: python3 - RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" - TEST_HGMODULEPOLICY: "c" +build-wheels-arm: + extends: build-wheels-x86 + tags: + - arm64 + parallel: + matrix: + - PLATFORM: + - manylinux2014_aarch64 diff --git a/setup.py b/setup.py index b4c88c7daa4f333a72dd4302507b581f510fc8b7_c2V0dXAucHk=..597f07a32d92be8392d2f2e9c9a626a60c0dfe9f_c2V0dXAucHk= 100644 --- a/setup.py +++ b/setup.py @@ -479,6 +479,7 @@ sub_commands = [('build_mo', None)] + build.sub_commands def run(self): + build.run(self) if os.name == 'nt': pass elif docutils is None: diff --git a/tests/run-tests.py b/tests/run-tests.py index b4c88c7daa4f333a72dd4302507b581f510fc8b7_dGVzdHMvcnVuLXRlc3RzLnB5..597f07a32d92be8392d2f2e9c9a626a60c0dfe9f_dGVzdHMvcnVuLXRlc3RzLnB5 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2604,7 +2604,11 @@ self._result.addSuccess(t) if self._runner.options.xunit: - with open(self._runner.options.xunit, "wb") as xuf: + xunitpath = os.path.join( + self._runner._outputdir, + self._runner.options.xunit, + ) + with open(xunitpath, "wb") as xuf: self._writexunit(self._result, xuf) if self._runner.options.json: