changeset 52207:05addf266f6f stable

wheel: add a platform level to the wheel directories One day, we will gather all wheel in a single directory and be able to pick the right one programmatically. This days is not today… This will help clarify things if we fetch all artifacts at the same time.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 09 Nov 2024 01:19:17 +0100
parents 2b7e3177f99c
children b8efa9013d3f
files contrib/heptapod-ci.yml
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/heptapod-ci.yml	Wed Nov 13 14:34:40 2024 +0100
+++ b/contrib/heptapod-ci.yml	Sat Nov 09 01:19:17 2024 +0100
@@ -56,17 +56,17 @@
     FLAVOR: ""
     MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1"
     CI_CLEVER_CLOUD_FLAVOR: "XS"
-  before_script:
+  script:
+    - PLATFORM=`/opt/python/cp313-cp313/bin/python -c 'import sys; print(sys.platform)'`
     - echo $WHEEL_TYPE
     - test -n "$WHEEL_TYPE"
     - echo $FLAVOR
-    - mkdir -p wheels/$WHEEL_TYPE/$BUILD_PY_ID
-  script:
+    - mkdir -p wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID
     - /opt/python/$BUILD_PY_ID/bin/python setup.py bdist_wheel --dist-dir tmp-wheelhouse
-    - auditwheel repair tmp-wheelhouse/*.whl -w wheels/$WHEEL_TYPE/$BUILD_PY_ID
+    - auditwheel repair tmp-wheelhouse/*.whl -w wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID
   artifacts:
     paths:
-      - wheels/$WHEEL_TYPE/$BUILD_PY_ID
+      - wheels/
     expire_in: 1 week
 
 build-c-wheel:
@@ -111,13 +111,15 @@
         - PORT_START=`expr 19051 + 1009 '*' $CI_CONCURRENT_ID`
         - PORT_ARG="--port $PORT_START"
         - echo $PORT_ARG
+        - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'`
+        - echo $PLATFORM
         - WHEEL_ARG=""
         - SHARDING_ARGS=""
         - if test -n "$WHEEL_TYPE"; then
              PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`;
              echo "$PY_TAG";
              test -n "PY_TAG";
-             WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/$PY_TAG/*.whl`";
+             WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$PLATFORM/$WHEEL_TYPE/$PY_TAG/*.whl`";
              test -n "$WHEEL";
              echo installing from $WHEEL;
              WHEEL_ARG="--hg-wheel $WHEEL";
@@ -429,11 +431,12 @@
     variables:
       MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1"
     script:
+      - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'`
       - rm -rf tmp-wheels
       - cibuildwheel --output-dir tmp-wheels/
       - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do
-          mkdir -p wheels/c/$py_version/;
-          mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/;
+          mkdir -p wheels/$PLATFORM/c/$py_version/;
+          mv tmp-wheels/*$py_version*.whl wheels/$PLATFORM/c/$py_version/;
         done
       - rm -rf tmp-wheels
     artifacts: