Skip to content

Commit

Permalink
support dependency generation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmi committed Dec 10, 2024
1 parent 9fed163 commit 00af3d0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 63 deletions.
78 changes: 19 additions & 59 deletions .github/workflows/build-wheel-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,69 +19,29 @@ on:
# TODO automation trigger

jobs:

build:

runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
# TODO which manylinux do we want to build for? 2014? 2_28? 2_34? Matrix?
container: eccr.ecmwf.int/wheelmaker/2_28:latest

name: Build manylinux_2_28

steps:
- uses: actions/checkout@v2
- run: /buildscripts/compile.sh ./eckit/python_wrapper/buildconfig

################################################################
- run: /buildscripts/wheel-linux.sh ./eckit/python_wrapper/buildconfig 3.11
- uses: actions/upload-artifact@v4
name: Upload wheel 3.11
with:
name: wheel-manylinux2_28-3.11
path: /build/wheel/*.whl

# TODO other python versions, once the above is correct.
# NOTE if Matrix, then break into (compile) && (wheel & upload)@[matix] steps

test:

needs: build
strategy:
fail-fast: false
matrix:
python-version: ["3.11"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] # TODO enable

name: Test with ${{ matrix.python-version }}
runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
container: eccr.ecmwf.int/wheelmaker/2_28:latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
name: wheel-manylinux2_28-${{ matrix.python-version }}
- run: /buildscripts/test-wheel.sh ${{ matrix.python-version }}

deploy:

if: ${{ github.ref_type == 'tag' || github.event_name == 'release' }}
needs: [test, build]
strategy:
fail-fast: false
matrix:
python-version: ["3.11"] # ["3.8", "3.9", "3.10", "3.11", "3.12"] # TODO enable

name: Deploy wheel ${{ matrix.python-version }}
runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6]
container: eccr.ecmwf.int/wheelmaker/2_28:latest
# TODO which manylinux do we want to build for? 2014? 2_28? 2_34? Matrix?
container:
image: eccr.ecmwf.int/wheelmaker/2_28:0.9
credentials:
username: ${{ secrets.ECMWF_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.ECMWF_DOCKER_REGISTRY_ACCESS_TOKEN }}
steps:
- run: mkdir artifact-${{ matrix.python-version }}
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
name: wheel-manylinux2_28-${{ matrix.python-version }}
path: artifact-${{ matrix.python-version }}
- run: |
/buildsripts/upload-twine.sh ${{ matrix.python-version }}
# TODO convert this to be matrix-friendly. Note it's a bit tricky since
# we'd ideally not reexecute the compile step multiple times, but it
# (non-essentially) depends on a matrix-based step
# - uses: actions/checkout@v4
- run: rm -rf /src && git clone --depth=1 --branch="$GITHUB_BRANCH" https://github.com/$GITHUB_REPOSITORY /src
- run: /buildscripts/prepare_deps.sh ./python_wrapper/buildconfig 3.11
- run: cd /src && /buildscripts/compile.sh ./python_wrapper/buildconfig
- run: cd /src && /buildscripts/wheel-linux.sh ./python_wrapper/buildconfig 3.11
- run: /buildscripts/test-wheel.sh ./python_wrapper/buildconfig 3.11 /build/wheel/*whl
- run: /buildscripts/upload-pypi.sh /build/wheel/*whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# TODO because of checkout action output failing to be cleaned up later, we need to remove
# Either fix the checkout action, or the cleanup step, or checkout manually
# - run: rm -rf ./* ./.git ./.github
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ It features facilities to easily handle, in a cross-platform way:
* MPI object-oriented wrapper
* linear algebra abstraction with multiple backends (BLAS, MKL, Armadillo, Eigen3)
* advanced container classes
* space partition trees
* file-mapped arrays
* space partition trees
* file-mapped arrays


Requirements
Expand Down
4 changes: 2 additions & 2 deletions python_wrapper/buildconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
# TODO we duplicate information -- pyproject.toml's `name` and `packages` are derivable from $NAME and must stay consistent

NAME="eckit"
CMAKE_PARAMS="-DENABLE_MPI=0 -DENABLE_ECKIT_GEO=1"
CMAKE_PARAMS="-DENABLE_MPI=0 -DENABLE_ECKIT_GEO=1 -DENABLE_BUILD_TOOLS=OFF"
PYPROJECT_DIR="python_wrapper"
FINDLIBS_DEPENDENCIES='[]'
DEPENDENCIES='[]'
1 change: 1 addition & 0 deletions python_wrapper/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[metadata]
description = "eckit"
long_description = file: README.md
long_description_content_type = text/markdown
author = file: AUTHORS

0 comments on commit 00af3d0

Please sign in to comment.