From eef5d67850298c67904b7391070f9466f3c06699 Mon Sep 17 00:00:00 2001 From: Vojta Tuma Date: Mon, 9 Dec 2024 15:44:30 +0100 Subject: [PATCH] support dependency generation --- .github/workflows/build-wheel-linux.yml | 53 +++++++++++++++---------- README.md | 4 +- python_wrapper/buildconfig | 4 +- python_wrapper/setup.cfg | 1 + 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-wheel-linux.yml b/.github/workflows/build-wheel-linux.yml index 899c86971..c9e327640 100644 --- a/.github/workflows/build-wheel-linux.yml +++ b/.github/workflows/build-wheel-linux.yml @@ -19,21 +19,27 @@ on: # TODO automation trigger jobs: + preclean: + name: TmpFixclean + runs-on: [self-hosted, Linux, platform-builder-Rocky-8.6] + steps: + - run: docker system prune -af --volumes build: - + name: Build manylinux_2_28 + needs: preclean 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 - + container: + image: eccr.ecmwf.int/wheelmaker/2_28:0.5 + credentials: + username: ${{ secrets.ECMWF_DOCKER_REGISTRY_USERNAME }} + password: ${{ secrets.ECMWF_DOCKER_REGISTRY_ACCESS_TOKEN }} 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/checkout@v4 + - run: /buildscripts/prepare_deps.sh ./python_wrapper/buildconfig 3.11 + - run: /buildscripts/compile.sh ./python_wrapper/buildconfig + - run: /buildscripts/wheel-linux.sh ./python_wrapper/buildconfig 3.11 - uses: actions/upload-artifact@v4 name: Upload wheel 3.11 with: @@ -44,44 +50,47 @@ jobs: # NOTE if Matrix, then break into (compile) && (wheel & upload)@[matix] steps test: - + name: Test with ${{ matrix.python-version }} 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 + container: + image: eccr.ecmwf.int/wheelmaker/2_28:0.5 + credentials: + username: ${{ secrets.ECMWF_DOCKER_REGISTRY_USERNAME }} + password: ${{ secrets.ECMWF_DOCKER_REGISTRY_ACCESS_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: name: wheel-manylinux2_28-${{ matrix.python-version }} - run: /buildscripts/test-wheel.sh ${{ matrix.python-version }} deploy: - + name: Deploy wheel ${{ matrix.python-version }} 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 + container: + image: eccr.ecmwf.int/wheelmaker/2_28:0.5 + 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/checkout@v4 - 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 }} + - run: /buildsripts/upload-twine.sh artifact-${{ matrix.python-version }}/*.whl env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 424338622..65447cfe9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/python_wrapper/buildconfig b/python_wrapper/buildconfig index 95c47ea5a..2b0e4436d 100644 --- a/python_wrapper/buildconfig +++ b/python_wrapper/buildconfig @@ -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='[]' diff --git a/python_wrapper/setup.cfg b/python_wrapper/setup.cfg index 2c746b9b2..fda226b6e 100644 --- a/python_wrapper/setup.cfg +++ b/python_wrapper/setup.cfg @@ -1,4 +1,5 @@ [metadata] description = "eckit" long_description = file: README.md +long_description_content_type = text/markdown author = file: AUTHORS