From b72a9ac49ff30f4661f8b1b53b23b93ad8d67d79 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Wed, 24 Apr 2024 13:16:48 +0200 Subject: [PATCH] Add python requirements path for HPC wf --- .github/workflows/downstream-ci-hpc.yml | 4 ++++ generate-workflows.py | 31 ++++++++++++------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/downstream-ci-hpc.yml b/.github/workflows/downstream-ci-hpc.yml index ca029fc..bf2f413 100644 --- a/.github/workflows/downstream-ci-hpc.yml +++ b/.github/workflows/downstream-ci-hpc.yml @@ -362,6 +362,7 @@ jobs: build_config: ${{ matrix.config_path }} dependencies: ${{ inputs.eccodes }} python_dependencies: ${{ inputs.eccodes-python }} + python_requirements: ci/requirements-tests.in earthkit-data: name: earthkit-data needs: @@ -402,6 +403,7 @@ jobs: ${{ inputs.pdbufr }} ${{ inputs.eccodes-python }} ${{ inputs.pyodc }} + python_requirements: tests/downstream-ci-requirements.txt earthkit-meteo: name: earthkit-meteo needs: @@ -426,6 +428,7 @@ jobs: build_config: ${{ matrix.config_path }} dependencies: '' python_dependencies: '' + python_requirements: tests/downstream-ci-requirements.txt eccodes: name: eccodes needs: @@ -738,6 +741,7 @@ jobs: build_config: ${{ matrix.config_path }} dependencies: ${{ inputs.eccodes }} python_dependencies: ${{ inputs.eccodes-python }} + python_requirements: tests/downstream-ci-requirements.txt plume: name: plume needs: diff --git a/generate-workflows.py b/generate-workflows.py index 6b3f445..e37cd5c 100644 --- a/generate-workflows.py +++ b/generate-workflows.py @@ -295,22 +295,21 @@ def generate_package_jobs(self, dep_tree: dict): "linux", "hpc", ] - steps.append( - { - "uses": "ecmwf-actions/reusable-workflows/ci-hpc@v2", - "with": { - "github_user": ( - "${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }}" - ), - "github_token": "${{ secrets.GH_REPO_READ_TOKEN }}", - "troika_user": "${{ secrets.HPC_CI_SSH_USER }}", - "repository": "${{ matrix.owner_repo_ref }}", - "build_config": "${{ matrix.config_path }}", - "dependencies": "\n".join(cmake_deps), - "python_dependencies": "\n".join(python_deps), - }, - } - ) + s = { + "uses": "ecmwf-actions/reusable-workflows/ci-hpc@v2", + "with": { + "github_user": ("${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }}"), + "github_token": "${{ secrets.GH_REPO_READ_TOKEN }}", + "troika_user": "${{ secrets.HPC_CI_SSH_USER }}", + "repository": "${{ matrix.owner_repo_ref }}", + "build_config": "${{ matrix.config_path }}", + "dependencies": "\n".join(cmake_deps), + "python_dependencies": "\n".join(python_deps), + }, + } + if pkg_conf.get("requirements_path"): + s["with"]["python_requirements"] = pkg_conf.get("requirements_path") + steps.append(s) self.add_job(Job(package, needs, condition, strategy, env, runs_on, steps)) def generate_setup_job(self, dep_tree: dict, wf_config: dict):