|
7 | 7 | # nor does it submit to any jurisdiction.
|
8 | 8 |
|
9 | 9 |
|
10 |
| -name: Build Linux |
| 10 | +name: Build Python Wheel for Linux |
11 | 11 |
|
12 | 12 | on:
|
13 | 13 | # Trigger the workflow manually
|
|
16 | 16 | # Allow to be called from another workflow
|
17 | 17 | workflow_call: ~
|
18 | 18 |
|
| 19 | + # TODO automation trigger |
19 | 20 | # repository_dispatch:
|
20 | 21 | # types: [eccodes-updated]
|
21 | 22 |
|
22 |
| - push: |
23 |
| - tags-ignore: |
24 |
| - - '**' |
25 |
| - paths: |
26 |
| - - 'scripts/common.sh' |
27 |
| - - 'scripts/select-python-linux.sh' |
28 |
| - - 'scripts/wheel-linux.sh' |
29 |
| - - 'scripts/build-linux.sh' |
30 |
| - - 'scripts/test-linux.sh' |
31 |
| - - 'scripts/copy-licences.py' |
32 |
| - - '.github/workflows/build-wheel-linux.yml' |
33 |
| - |
34 |
| -# to allow the action to run on the manylinux docker image based on CentOS 7 |
35 |
| -env: |
36 |
| - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true |
37 |
| - |
38 | 23 | jobs:
|
39 |
| - |
40 | 24 | build:
|
41 |
| - |
42 |
| - # if: false # for temporarily disabling for debugging |
43 |
| - |
44 |
| - runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6] |
45 |
| - container: dockcross/manylinux_2_28-x64:latest |
46 |
| - |
47 |
| - name: Build manylinux_2_28-x64 |
48 |
| - |
49 |
| - steps: |
50 |
| - - uses: actions/checkout@v4 |
51 |
| - |
52 |
| - - run: ./scripts/build-linux.sh |
53 |
| - |
54 |
| - ################################################################ |
55 |
| - - run: ./scripts/wheel-linux.sh 3.8 |
56 |
| - - uses: actions/upload-artifact@v4 |
57 |
| - name: Upload wheel 3.8 |
58 |
| - with: |
59 |
| - name: wheel-manylinux2014-3.8 |
60 |
| - path: wheelhouse/*.whl |
61 |
| - |
62 |
| - # ################################################################ |
63 |
| - - run: ./scripts/wheel-linux.sh 3.9 |
64 |
| - - uses: actions/upload-artifact@v4 |
65 |
| - name: Upload wheel 3.9 |
66 |
| - with: |
67 |
| - name: wheel-manylinux2014-3.9 |
68 |
| - path: wheelhouse/*.whl |
69 |
| - |
70 |
| - # ################################################################ |
71 |
| - - run: ./scripts/wheel-linux.sh 3.10 |
72 |
| - - uses: actions/upload-artifact@v4 |
73 |
| - name: Upload wheel 3.10 |
74 |
| - with: |
75 |
| - name: wheel-manylinux2014-3.10 |
76 |
| - path: wheelhouse/*.whl |
77 |
| - |
78 |
| - # ################################################################ |
79 |
| - - run: ./scripts/wheel-linux.sh 3.11 |
80 |
| - - uses: actions/upload-artifact@v4 |
81 |
| - name: Upload wheel 3.11 |
82 |
| - with: |
83 |
| - name: wheel-manylinux2014-3.11 |
84 |
| - path: wheelhouse/*.whl |
85 |
| - |
86 |
| - # ################################################################ |
87 |
| - - run: ./scripts/wheel-linux.sh 3.12 |
88 |
| - - uses: actions/upload-artifact@v4 |
89 |
| - name: Upload wheel 3.12 |
90 |
| - with: |
91 |
| - name: wheel-manylinux2014-3.12 |
92 |
| - path: wheelhouse/*.whl |
93 |
| - |
94 |
| - test: |
95 |
| - |
96 |
| - needs: build |
97 |
| - |
98 |
| - strategy: |
99 |
| - fail-fast: false |
100 |
| - matrix: # We don't test 3.6, as it is not supported anymore by github actions |
101 |
| - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
102 |
| - |
| 25 | + name: Build manylinux_2_28 |
103 | 26 | runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
|
104 |
| - |
105 |
| - name: Test with ${{ matrix.python-version }} |
106 |
| - |
| 27 | + # TODO which manylinux do we want to build for? 2014? 2_28? 2_34? Matrix? |
| 28 | + container: |
| 29 | + image: eccr.ecmwf.int/wheelmaker/2_28:latest |
| 30 | + credentials: |
| 31 | + username: ${{ secrets.ECMWF_DOCKER_REGISTRY_USERNAME }} |
| 32 | + password: ${{ secrets.ECMWF_DOCKER_REGISTRY_ACCESS_TOKEN }} |
107 | 33 | steps:
|
108 |
| - |
109 |
| - - uses: actions/checkout@v4 |
110 |
| - |
111 |
| - - uses: actions/download-artifact@v4 |
112 |
| - with: |
113 |
| - name: wheel-manylinux2014-${{ matrix.python-version }} |
114 |
| - |
115 |
| - - run: ./scripts/test-linux.sh ${{ matrix.python-version }} |
116 |
| - |
117 |
| - |
118 |
| - deploy: |
119 |
| - |
120 |
| - if: ${{ github.ref_type == 'tag' || github.event_name == 'release' }} |
121 |
| - |
122 |
| - strategy: |
123 |
| - fail-fast: false |
124 |
| - matrix: |
125 |
| - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
126 |
| - |
127 |
| - needs: [test, build] |
128 |
| - |
129 |
| - name: Deploy wheel ${{ matrix.python-version }} |
130 |
| - |
131 |
| - runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6] |
132 |
| - |
133 |
| - |
134 |
| - steps: |
135 |
| - |
136 |
| - - run: mkdir artifact-${{ matrix.python-version }} |
137 |
| - |
138 |
| - - uses: actions/checkout@v4 |
139 |
| - |
140 |
| - - uses: actions/download-artifact@v4 |
141 |
| - with: |
142 |
| - name: wheel-manylinux2014-${{ matrix.python-version }} |
143 |
| - path: artifact-${{ matrix.python-version }} |
144 |
| - |
| 34 | + # TODO convert this to be matrix-friendly. Note it's a bit tricky since |
| 35 | + # we'd ideally not reexecute the compile step multiple times, but it |
| 36 | + # (non-essentially) depends on a matrix-based step |
| 37 | + # NOTE we dont use action checkout because it doesnt cleanup after itself correctly |
| 38 | + - run: git clone --depth=1 --branch="${GITHUB_REF#refs/heads/}" https://github.com/$GITHUB_REPOSITORY /proj |
| 39 | + - run: cd /proj && /buildscripts/prepare_deps.sh ./buildconfig 3.11 |
145 | 40 | - run: |
|
146 |
| - source ./scripts/select-python-linux.sh 3.10 |
147 |
| - pip3 install twine |
148 |
| - ls -l artifact-${{ matrix.python-version }}/*.whl |
149 |
| - twine upload artifact-${{ matrix.python-version }}/*.whl |
| 41 | + cd /proj |
| 42 | + export PYTHONPATH=/buildscripts/; export LIBDIR=/tmp/prereqs/eccodeslib/lib64; export INCDIR=/tmp/prereqs/eccodeslib/include |
| 43 | + uv run --python python3.11 python -m build --installer uv --wheel . |
| 44 | + - run: mkdir -p /build/wheel && mv /proj/dist/*whl /build/wheel |
| 45 | + - run: cd /proj && /buildscripts/test-wheel.sh ./python_wrapper/buildconfig 3.11 /build/wheel/*whl |
| 46 | + - run: cd /proj && /buildscripts/upload-pypi.sh /build/wheel/*whl |
150 | 47 | env:
|
151 | 48 | TWINE_USERNAME: __token__
|
152 | 49 | TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
| 50 | + # NOTE temporary thing until all the mess gets cleared |
| 51 | + - run: rm -rf ./* ./.git ./.github |
0 commit comments