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

wheel: add a job uploading nightly build

There are various questions around when to actually run it, and which jobs to
run on the default branch, but having a working job we can decide to run
manually (by running the manual dependencies) is a good step to get the wheel
story from one end to the other.

See inline comment for more details.
parent 05addf266f6f
No related branches found
No related tags found
5 merge requests!1083Merge stable into default,!1078fix the pycompat Rust jobs,!1076clone: properly exclude rev-branch-cache from post clone cache warming,!1075prepare for building the Wheel during the release process.,!1063upload nightly build !
Pipeline #92330 canceled
......@@ -25,6 +25,7 @@
- tests
- platform-compat
- py-version-compat
- upload
image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
......@@ -443,3 +444,57 @@
paths:
- wheels
expire_in: 1 week
# Upload nightly build wheel on the heptapod registry on test success
#
# At the time this task is added, since the mac wheels are built on shell
# runner, those nightly are not be considered fully secured.
#
# In addition, since any job can upload package, pretty much anyone with CI
# access can upload anything pretending to be any version. To fix it we would
# have to prevent the CI token to upload to the registry and have dedicated
# credential accessible only from protected branches.
upload-wheel-nightly:
extends: .all
image: "registry.heptapod.net/mercurial/ci-images/twine:v3.0"
stage: upload
# because we don't want to upload only half of a wheel
interruptible: false
rules:
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
# note that at the time of writing this, this job depends on multiple
# manual one. So it will not run by default, but will automatically run
# if the manual jobs are triggered.
#
# Also beware that "on_success" will ignore failure of manual test we
# directly depends on. This currently relevant for the "test-3.x-c"
# tests.
when: on_success
- if: $CI_COMMIT_BRANCH =~ /^topic\/.*/
when: never
# if you need to test this, make it
# when: manual
# allow_failure: true
needs:
- build-c-wheel
- build-c-wheel-macos
- build-c-wheel-windows
- test-c
- macos
# if we also requires windows to be happy, reach the "50 needed jobs" limit.
# So we need some intermediate job to reduce the number.
# - windows
- test-3.8-c
- test-3.12-c
- test-3.13-c
# It would be nice to be able to restrict that a bit to protected branch only
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN
script:
- twine
upload
--verbose
--repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
wheels/*/*/*/*.whl
wheels/*/*.whl
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