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

ci: for branches, use a single trigger

This trigger will unlock all the job necessary to build wheels and upload
nightly build. This should make the nightly build process more pratical.

In practice right now, only run pipeline for branch by creating them explicitly
on the web. So we could just run everything without trigger, but this is a
decision for later. This changeset only focus on making the nightly build
process somewhat manageable.
parent 3f7c7a85
No related branches found
No related tags found
2 merge requests!1100Merge stable into default,!1084wheel: add a target for musl linux and other nightly build improvement.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
when: always when: always
stages: stages:
- nightly-trigger
- build - build
- checks - checks
- tests - tests
...@@ -79,6 +80,17 @@ ...@@ -79,6 +80,17 @@
- .dummy - .dummy
when: manual when: manual
trigger-nightly-build:
extends: .trigger
stage: nightly-trigger
rules:
- if: $CI_COMMIT_BRANCH =~ $RE_BRANCH
when: manual
allow_failure: true
- if: $CI_COMMIT_BRANCH =~ $RE_TOPIC
when: never
.build-wheel: .build-wheel:
extends: .all extends: .all
image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0" image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0"
...@@ -100,6 +112,7 @@ ...@@ -100,6 +112,7 @@
- wheels/ - wheels/
expire_in: 1 week expire_in: 1 week
build-c-wheel: build-c-wheel:
extends: .build-wheel extends: .build-wheel
variables: variables:
...@@ -239,7 +252,15 @@ ...@@ -239,7 +252,15 @@
trigger-pycompat: trigger-pycompat:
extends: .trigger extends: .trigger
stage: py-version-compat stage: py-version-compat
rules:
- if: $CI_COMMIT_BRANCH =~ $RE_BRANCH
when: on_success
needs:
- trigger-nightly-build
- if: $CI_COMMIT_BRANCH =~ $RE_TOPIC
when: manual
allow_failure: true
.test-c-pycompat: .test-c-pycompat:
extends: .test-c extends: .test-c
stage: py-version-compat stage: py-version-compat
...@@ -242,9 +263,7 @@ ...@@ -242,9 +263,7 @@
.test-c-pycompat: .test-c-pycompat:
extends: .test-c extends: .test-c
stage: py-version-compat stage: py-version-compat
needs:
- trigger-pycompat
variables: variables:
WHEEL_TYPE: "c" WHEEL_TYPE: "c"
...@@ -256,6 +275,7 @@ ...@@ -256,6 +275,7 @@
variables: variables:
PYTHON: python3.8 PYTHON: python3.8
needs: needs:
- job: trigger-pycompat
- job: build-c-wheel - job: build-c-wheel
parallel: parallel:
matrix: matrix:
...@@ -266,6 +286,7 @@ ...@@ -266,6 +286,7 @@
variables: variables:
PYTHON: python3.12 PYTHON: python3.12
needs: needs:
- job: trigger-pycompat
- job: build-c-wheel - job: build-c-wheel
parallel: parallel:
matrix: matrix:
...@@ -284,6 +305,7 @@ ...@@ -284,6 +305,7 @@
variables: variables:
PYTHON: python3.13 PYTHON: python3.13
needs: needs:
- job: trigger-pycompat
- job: build-c-wheel - job: build-c-wheel
parallel: parallel:
matrix: matrix:
...@@ -333,6 +355,12 @@ ...@@ -333,6 +355,12 @@
trigger-wheel-windows: trigger-wheel-windows:
extends: .trigger extends: .trigger
stage: build stage: build
rules:
- if: $CI_COMMIT_BRANCH =~ $RE_BRANCH
when: never
- if: $CI_COMMIT_BRANCH =~ $RE_TOPIC
when: manual
allow_failure: true
build-c-wheel-windows: build-c-wheel-windows:
extends: .windows extends: .windows
...@@ -340,7 +368,13 @@ ...@@ -340,7 +368,13 @@
# wait for someone to click on "trigger-wheel-windows" # wait for someone to click on "trigger-wheel-windows"
when: on_success when: on_success
needs: needs:
- "trigger-wheel-windows" rules:
- if: $CI_COMMIT_BRANCH =~ $RE_BRANCH
needs:
- trigger-nightly-build
- if: $CI_COMMIT_BRANCH =~ $RE_TOPIC
needs:
- "trigger-wheel-windows"
variables: variables:
MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1"
script: script:
...@@ -458,7 +492,13 @@ ...@@ -458,7 +492,13 @@
# The weird directory structure match the one we use for Linux to deal with the # The weird directory structure match the one we use for Linux to deal with the
# multiple jobs. (all this might be unnecessary) # multiple jobs. (all this might be unnecessary)
build-c-wheel-macos: build-c-wheel-macos:
when: manual # avoid overloading the CI by default rules:
- if: $CI_COMMIT_BRANCH =~ $RE_BRANCH
needs:
- trigger-nightly-build
- if: $CI_COMMIT_BRANCH =~ $RE_TOPIC
when: manual # avoid overloading the CI by default
allow_failure: true
stage: build stage: build
tags: tags:
- macos - macos
...@@ -494,9 +534,6 @@ ...@@ -494,9 +534,6 @@
when: on_success when: on_success
- if: '$CI_COMMIT_BRANCH =~ $RE_TOPIC' - if: '$CI_COMMIT_BRANCH =~ $RE_TOPIC'
when: never when: never
# if you need to test this, make it
# when: manual
# allow_failure: true
# a dummy job that gather greatly parallel object into one. # a dummy job that gather greatly parallel object into one.
# #
...@@ -505,6 +542,6 @@ ...@@ -505,6 +542,6 @@
# #
.sink: .sink:
extends: extends:
- .nightly_build_sink - .nightly_build_step
- .dummy - .dummy
...@@ -509,6 +546,6 @@ ...@@ -509,6 +546,6 @@
- .dummy - .dummy
linux-test-result: test-result-linux:
extends: .sink extends: .sink
needs: needs:
- test-c - test-c
...@@ -516,8 +553,8 @@ ...@@ -516,8 +553,8 @@
- test-3.12-c - test-3.12-c
- test-3.13-c - test-3.13-c
macos-test-result: test-result-macos:
extends: .sink extends: .sink
needs: needs:
- macos - macos
...@@ -520,8 +557,8 @@ ...@@ -520,8 +557,8 @@
extends: .sink extends: .sink
needs: needs:
- macos - macos
windows-test-result: test-result-windows:
extends: .sink extends: .sink
needs: needs:
- windows - windows
...@@ -544,9 +581,9 @@ ...@@ -544,9 +581,9 @@
- build-c-wheel - build-c-wheel
- build-c-wheel-macos - build-c-wheel-macos
- build-c-wheel-windows - build-c-wheel-windows
- linux-test-result - test-result-linux
- macos-test-result - test-result-macos
- windows-test-result - test-result-windows
# It would be nice to be able to restrict that a bit to protected branch only # It would be nice to be able to restrict that a bit to protected branch only
variables: variables:
TWINE_USERNAME: gitlab-ci-token TWINE_USERNAME: gitlab-ci-token
......
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