Skip to content

Commit 684a9ac

Browse files
committed
Update wheelmaker to 0.10
1 parent d8c97fc commit 684a9ac

File tree

2 files changed

+24
-67
lines changed

2 files changed

+24
-67
lines changed

.github/workflows/build-wheel-linux.yml

Lines changed: 21 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -19,73 +19,28 @@ on:
1919
# TODO automation trigger
2020

2121
jobs:
22-
2322
build:
24-
25-
runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
26-
# TODO which manylinux do we want to build for? 2014? 2_28? 2_34? Matrix?
27-
container: wheelmaker_2_28:0.1
28-
2923
name: Build manylinux_2_28
30-
31-
steps:
32-
# TODO which project do we build odc wheel from -- this, or some bundle? Or can we obtain the compiled eckit artifact somehow?
33-
- run: git clone --branch develop --depth=1 https://github.com/ecmwf/eckit.git /src/eckit
34-
- run: /buildscripts/compile.sh ./eckit/python_wrapper/buildconfig
35-
- uses: actions/checkout@v2
36-
- run: /buildscripts/compile.sh ./metkit/python_wrapper/buildconfig
37-
38-
################################################################
39-
- run: /buildscripts/wheel-linux.sh ./metkit/python_wrapper/buildconfig 3.11
40-
- uses: actions/upload-artifact@v4
41-
name: Upload wheel 3.11
42-
with:
43-
name: wheel-manylinux2_28-3.11
44-
path: /build/wheel/*.whl
45-
46-
# TODO other python versions, once the above is correct.
47-
# NOTE if Matrix, then break into (compile & upload) ; (wheel & upload)[matix] steps
48-
49-
test:
50-
51-
needs: build
52-
strategy:
53-
fail-fast: false
54-
matrix:
55-
python-version: ["3.11"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] # TODO enable
56-
57-
name: Test with ${{ matrix.python-version }}
5824
runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
59-
container: wheelmaker_2_28:0.1
25+
# TODO which manylinux do we want to build for? 2014? 2_28? 2_34? Matrix?
26+
container:
27+
image: eccr.ecmwf.int/wheelmaker/2_28:0.10
28+
credentials:
29+
username: ${{ secrets.ECMWF_DOCKER_REGISTRY_USERNAME }}
30+
password: ${{ secrets.ECMWF_DOCKER_REGISTRY_ACCESS_TOKEN }}
6031
steps:
61-
- uses: actions/checkout@v2
62-
- uses: actions/download-artifact@v4
63-
with:
64-
name: wheel-manylinux2_28-${{ matrix.python-version }}
65-
- run: /buildscripts/test-wheel.sh ${{ matrix.python-version }}
66-
67-
# TODO enable and test
68-
# deploy:
69-
#
70-
# if: ${{ github.ref_type == 'tag' || github.event_name == 'release' }}
71-
# needs: [test, build]
72-
# strategy:
73-
# fail-fast: false
74-
# matrix:
75-
# python-version: ["3.11"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] # TODO enable
76-
#
77-
# name: Deploy wheel ${{ matrix.python-version }}
78-
# runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
79-
# container: wheelmaker_2_28:0.1
80-
# steps:
81-
# - run: mkdir artifact-${{ matrix.python-version }}
82-
# - uses: actions/checkout@v2
83-
# - uses: actions/download-artifact@v4
84-
# with:
85-
# name: wheel-manylinux2_28-${{ matrix.python-version }}
86-
# path: artifact-${{ matrix.python-version }}
87-
# - run: |
88-
# /buildsripts/upload-twine.sh ${{ matrix.python-version }}
89-
# env:
90-
# TWINE_USERNAME: __token__
91-
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
32+
# TODO convert this to be matrix-friendly. Note it's a bit tricky since
33+
# we'd ideally not reexecute the compile step multiple times, but it
34+
# (non-essentially) depends on a matrix-based step
35+
# NOTE we dont use action checkout because it doesnt cleanup after itself correctly
36+
- run: git clone --depth=1 --branch="${GITHUB_REF#refs/heads/}" https://github.com/$GITHUB_REPOSITORY /proj
37+
- run: cd /proj && /buildscripts/prepare_deps.sh ./python_wrapper/buildconfig 3.11
38+
- run: cd /proj && /buildscripts/compile.sh ./python_wrapper/buildconfig
39+
- run: cd /proj && PYTHONPATH=/buildscripts /buildscripts/wheel-linux.sh ./python_wrapper/buildconfig 3.11
40+
- run: cd /proj && /buildscripts/test-wheel.sh ./python_wrapper/buildconfig 3.11 /tmp/build/wheel/*whl
41+
- run: cd /proj && /buildscripts/upload-pypi.sh /tmp/build/wheel/*whl
42+
env:
43+
TWINE_USERNAME: __token__
44+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
45+
# NOTE temporary thing until all the mess gets cleared
46+
- run: rm -rf ./* ./.git ./.github

python_wrapper/buildconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
# to be source'd by wheelmaker's compile.sh *and* wheel-linux.sh
1010
# NOTE replace the whole thing with pyproject.toml? Less powerful, and quaint to use for sourcing ecbuild invocation
11+
# TODO we duplicate information -- pyproject.toml's `name` and `packages` are derivable from $NAME and must stay consistent
1112

1213
NAME="metkit"
13-
CMAKE_PARAMS="-DECKIT_PATH=/target/eckit"
14+
CMAKE_PARAMS="-DECKIT_PATH=/tmp/target/eckit"
1415
PYPROJECT_DIR="python_wrapper"
16+
DEPENDENCIES='["eckit"]'

0 commit comments

Comments
 (0)