Skip to content

add ecmwf ci github actions #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/ci-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dependency_cmake_options: |
# ecmwf/ecflow: "-DENABLE_ALL_TESTS=ON -DBOOST_ROOT=${BOOST_ROOT_DIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDE_DIR} -DBOOST_LIBRARYDIR=${BOOST_LIB_DIR} -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -DENABLE_STATIC_BOOST_LIBS=OFF"
dependencies: |
ecmwf/ecbuild
ecmwf/ecflow
ecmwf/pyflow
dependency_branch: develop
parallelism_factor: 8
self_build: false # Only for python packages
11 changes: 11 additions & 0 deletions .github/ci-hpc-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build:
modules:
- boost
- ninja
- python3
- qt
dependencies:
- ecmwf/ecbuild@develop
- ecmwf/ecflow@develop
- ecmwf/pyflow@develop
parallel: 64
60 changes: 60 additions & 0 deletions .github/workflows/ci-legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: ci-wellies

# Controls when the workflow will run
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]

jobs:
qa:
name: qa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- run: pip install flake8 isort[pyproject]
- run: isort --check .
- run: flake8 .

setup:
name: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install .

test:
name: pytest
env:
GIT_PYTHON_TRACE: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: wellies-test
mamba-version: "*"
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Dummy User"
- name: Conda check
shell: bash -l {0}
run: |
conda info
conda list
- name: Install wellies and run tests
shell: bash -l {0} # required to load conda I think
run: |
python -m pip install .[test]
pytest .
88 changes: 34 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,40 @@
name: ci-wellies
name: ci

# Controls when the workflow will run
on:
# Trigger the workflow on push to master or develop, except tag creation
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
branches:
- 'master'
- 'develop'
tags-ignore:
- '**'

jobs:
qa:
name: qa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# Trigger the workflow on pull request
pull_request: ~

# Trigger the workflow manually
workflow_dispatch: ~

- run: pip install flake8 isort[pyproject]
- run: isort --check .
- run: flake8 .
# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]

jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
name: downstream-ci
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@feature/pyflow
with:
pyflow-wellies: ecmwf/pyflow-wellies@${{ github.event.pull_request.head.sha || github.sha }}
python_qa: true
secrets: inherit

setup:
name: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install .

test:
name: pytest
env:
GIT_PYTHON_TRACE: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: wellies-test
mamba-version: "*"
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Dummy User"
- name: Conda check
shell: bash -l {0}
run: |
conda info
conda list
- name: Install wellies and run tests
shell: bash -l {0} # required to load conda I think
run: |
python -m pip install .[test]
pytest .
# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@feature/pyflow
with:
pyflow-wellies: ecmwf/pyflow-wellies@${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit
Loading