# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610374602 -3600 # Mon Jan 11 15:16:42 2021 +0100 # Node ID edf5db1a9d54d5644e3950932333d65104b8d952 # Parent b4c88c7daa4f333a72dd4302507b581f510fc8b7 # EXP-Topic build-wheels ci: build python wheels The wheels are merely attached to the job as artifacts. We could upload them to Heptapod or PyPI, but that's left for a possible followup. Differential Revision: https://phab.mercurial-scm.org/D9724 diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml +++ b/contrib/heptapod-ci.yml @@ -1,5 +1,6 @@ stages: - tests + - packages - phabricator image: registry.heptapod.net/mercurial/ci-images/mercurial-core @@ -105,3 +106,42 @@ PYTHON: python3 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" TEST_HGMODULEPOLICY: "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 + +build-wheels-arm: + extends: build-wheels-x86 + tags: + - arm64 + parallel: + matrix: + - PLATFORM: + - manylinux2014_aarch64 # HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610441560 -3600 # Tue Jan 12 09:52:40 2021 +0100 # Node ID b6dc6e7aabefee9c5bd57958593c0bfec4e9b68a # Parent edf5db1a9d54d5644e3950932333d65104b8d952 # EXP-Topic build-wheels ci: generate and report XML test results Differential Revision: https://phab.mercurial-scm.org/D9725 diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml +++ b/contrib/heptapod-ci.yml @@ -23,7 +23,16 @@ 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 checks-py2: <<: *runtests # HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610442393 -3600 # Tue Jan 12 10:06:33 2021 +0100 # Node ID 603367658fc43323f271c81fbe05bac7438348f0 # Parent b6dc6e7aabefee9c5bd57958593c0bfec4e9b68a # EXP-Topic build-wheels ci: use parallel matrices Differential Revision: https://phab.mercurial-scm.org/D9726 diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml +++ b/contrib/heptapod-ci.yml @@ -9,7 +9,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. @@ -34,87 +34,53 @@ reports: junit: ${CI_JOB_ID}.xml -checks-py2: - <<: *runtests +checks: + extends: .runtests_template variables: RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" + parallel: + matrix: + - PYTHON: [python2, python3] -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 - -rust-cargo-test-py3: - stage: tests - <<: *rust_cargo_test - variables: - PYTHON: python3 + parallel: + matrix: + - PYTHON: [python2, python3] + - {PYTHON: [python3], HG_RUST_FEATURES: [dirstate-tree]} phabricator-refresh: stage: phabricator script: - "./contrib/phab-refresh-stack.sh --comment \":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\"" -test-py2: - <<: *runtests - variables: - RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" - TEST_HGMODULEPOLICY: "c" - -test-py3: - <<: *runtests +test: + extends: .runtests_template 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" - -test-py2-rust: - <<: *runtests - variables: - HGWITHRUSTEXT: cpython - RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" - TEST_HGMODULEPOLICY: "rust+c" - -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" + 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 build-wheels-x86: stage: packages # HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610443555 -3600 # Tue Jan 12 10:25:55 2021 +0100 # Node ID 0a87d29412b6b21d896d05bcd49717ec4378e410 # Parent 603367658fc43323f271c81fbe05bac7438348f0 # EXP-Topic build-wheels ci: report status to phabricator on failures Differential Revision: https://phab.mercurial-scm.org/D9727 diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml +++ b/contrib/heptapod-ci.yml @@ -1,7 +1,6 @@ stages: - tests - packages - - phabricator image: registry.heptapod.net/mercurial/ci-images/mercurial-core @@ -52,10 +51,25 @@ - PYTHON: [python2, python3] - {PYTHON: [python3], HG_RUST_FEATURES: [dirstate-tree]} -phabricator-refresh: - stage: phabricator +phabricator-success: + stage: .post + when: on_success 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}" + +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}" test: extends: .runtests_template # HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610708825 -3600 # Fri Jan 15 12:07:05 2021 +0100 # Node ID 8fc814bc9ec6eeb370a11c327c4105cf5182ed0f # Parent 0a87d29412b6b21d896d05bcd49717ec4378e410 # EXP-Topic build-wheels setup: unbreak build by remembering to call superclass Oops. diff --git a/setup.py b/setup.py --- 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: # HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1610453024 -3600 # Tue Jan 12 13:03:44 2021 +0100 # Node ID 597f07a32d92be8392d2f2e9c9a626a60c0dfe9f # Parent 8fc814bc9ec6eeb370a11c327c4105cf5182ed0f # EXP-Topic build-wheels tests: use outputdir for relative filenames to xunit reports I couldn't find these anywhere in a CI run. diff --git a/tests/run-tests.py b/tests/run-tests.py --- 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: