From 936fe32186dd480cb09a6bf6157cf3e988c65144 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Mon, 29 May 2023 13:42:00 +0200 Subject: [PATCH 01/10] Add CI configuration --- .github/ci-config.yml | 5 +++++ .github/ci-hpc-config.yml | 7 ++++++ .github/workflows/ci.yml | 47 +++++++++++++++++++++------------------ 3 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 .github/ci-config.yml create mode 100644 .github/ci-hpc-config.yml diff --git a/.github/ci-config.yml b/.github/ci-config.yml new file mode 100644 index 00000000..004e8ab6 --- /dev/null +++ b/.github/ci-config.yml @@ -0,0 +1,5 @@ +dependencies: | + ecmwf/ecbuild + ecmwf/eckit +dependency_branch: develop +parallelism_factor: 8 diff --git a/.github/ci-hpc-config.yml b/.github/ci-hpc-config.yml new file mode 100644 index 00000000..76994016 --- /dev/null +++ b/.github/ci-hpc-config.yml @@ -0,0 +1,7 @@ +build: + modules: + - ninja + dependencies: + - ecmwf/ecbuild@develop + - ecmwf/eckit@develop + parallel: 64 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ba8966c..33e923c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,36 +1,39 @@ name: ci -# Controls when the workflow will run on: - - # Trigger the workflow on all pushes, except on tag creation + # Trigger the workflow on push to master or develop, except tag creation push: branches: - - '**' + - 'master' + - 'develop' tags-ignore: - - '**' + - '**' - # Trigger the workflow on all pull requests + # Trigger the workflow on pull request pull_request: ~ - # Allow workflow to be dispatched on demand + # Trigger the workflow manually workflow_dispatch: ~ + # 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@main + with: + odc: ecmwf/odc@${{ github.event.pull_request.head.sha || github.sha }} + secrets: inherit - # Calls a reusable CI workflow to build & test the current repository. - # It will pull in all needed dependencies and produce a code coverage report on success. - ci: - name: ci - uses: ecmwf-actions/reusable-workflows/.github/workflows/ci.yml@v1 + # 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@main with: - codecov_upload: true - notify_teams: true - build_package_inputs: | - self_coverage: true - dependencies: | - ecmwf/ecbuild - ecmwf/eckit - dependency_branch: develop - secrets: - incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} + odc: ecmwf/odc@${{ github.event.pull_request.head.sha || github.sha }} + secrets: inherit From fd46576c520b734e7b96ed87a5a6717318368875 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Sun, 4 Jun 2023 12:21:58 +0200 Subject: [PATCH 02/10] Add PR labeling wf --- .github/workflows/label-public-pr.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/label-public-pr.yml diff --git a/.github/workflows/label-public-pr.yml b/.github/workflows/label-public-pr.yml new file mode 100644 index 00000000..59b2bfa2 --- /dev/null +++ b/.github/workflows/label-public-pr.yml @@ -0,0 +1,10 @@ +# Manage labels of pull requests that originate from forks +name: label-public-pr + +on: + pull_request_target: + types: [opened, synchronize] + +jobs: + label: + uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2 From d22beff85d141aafac916a153c6a23efc2871702 Mon Sep 17 00:00:00 2001 From: Iain Russell <40060766+iainrussell@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:31:31 +0100 Subject: [PATCH 03/10] Fix include of cstdint for uint64_t for gcc 13.1 --- src/odc/api/StridedData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odc/api/StridedData.h b/src/odc/api/StridedData.h index b2dd2931..f139167c 100644 --- a/src/odc/api/StridedData.h +++ b/src/odc/api/StridedData.h @@ -15,7 +15,7 @@ #ifndef odc_api_StridedData_H #define odc_api_StridedData_H -#include +#include #include #include From 0303e605fcff64892ccba5e549c25eb678a19d70 Mon Sep 17 00:00:00 2001 From: DJDavies2 Date: Tue, 13 Jun 2023 17:31:44 +0100 Subject: [PATCH 04/10] Fix some transfer calls. --- src/fortran/legacy_fortran_api_examples.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fortran/legacy_fortran_api_examples.f90 b/src/fortran/legacy_fortran_api_examples.f90 index 23f29deb..784a9e24 100644 --- a/src/fortran/legacy_fortran_api_examples.f90 +++ b/src/fortran/legacy_fortran_api_examples.f90 @@ -94,7 +94,7 @@ subroutine example_fortran_api_append one_row(offsets(1)) = i one_row(offsets(2)) = i one_row(offsets(3)) = 5 - one_row(offsets(4):offsets(4)+3) = transfer(wigos, one_row(offsets(4):offsets(4)+3)) + one_row(offsets(4):offsets(4)+3) = transfer(wigos(1:32), one_row(offsets(4):offsets(4)+3)) one_row(offsets(5)) = transfer(expver, one_row(5)) one_row(offsets(6)) = 5 cerr = odb_write_set_next_row(odb_it, one_row, c_ncolumns) @@ -135,7 +135,7 @@ subroutine example_fortran_api_append one_row(offsets(1)) = i one_row(offsets(2)) = i one_row(offsets(3)) = 5 - one_row(offsets(4):offsets(4)+3) = transfer(wigos, one_row(offsets(4):offsets(4)+3)) + one_row(offsets(4):offsets(4)+3) = transfer(wigos(1:32), one_row(offsets(4):offsets(4)+3)) one_row(offsets(5)) = transfer(expver, one_row(5)) one_row(offsets(6)) = 5 cerr = odb_write_set_next_row(odb_it, one_row, c_ncolumns) @@ -197,7 +197,7 @@ subroutine example_fortran_api_setup one_row(offsets(1)) = i one_row(offsets(2)) = i one_row(offsets(3)) = 5 - one_row(offsets(4):offsets(4)+3) = transfer(wigos, one_row(offsets(4):offsets(4)+3)) + one_row(offsets(4):offsets(4)+3) = transfer(wigos(1:32), one_row(offsets(4):offsets(4)+3)) one_row(offsets(5)) = transfer(expver, one_row(5)) one_row(offsets(6)) = 5 cerr = odb_write_set_next_row(odb_it, one_row, c_ncolumns) From 2ba4a4d79b16657362a870d7aa2309b994771217 Mon Sep 17 00:00:00 2001 From: Simon Smart Date: Tue, 27 Jun 2023 09:58:18 +0100 Subject: [PATCH 05/10] Add new notifications to teams --- .github/workflows/notify-new-issue.yml | 15 +++++++++++++++ .github/workflows/notify-new-pr.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/notify-new-issue.yml create mode 100644 .github/workflows/notify-new-pr.yml diff --git a/.github/workflows/notify-new-issue.yml b/.github/workflows/notify-new-issue.yml new file mode 100644 index 00000000..384a3570 --- /dev/null +++ b/.github/workflows/notify-new-issue.yml @@ -0,0 +1,15 @@ +name: Notify new issue + +on: + issues: + types: + - "opened" + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify new issue + uses: ecmwf-actions/notify-teams-issue@v1 + with: + incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} diff --git a/.github/workflows/notify-new-pr.yml b/.github/workflows/notify-new-pr.yml new file mode 100644 index 00000000..911970e8 --- /dev/null +++ b/.github/workflows/notify-new-pr.yml @@ -0,0 +1,15 @@ +name: Notify new PR + +on: + pull_request: + types: + - "opened" + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify new PR + uses: ecmwf-actions/notify-teams-pr@v1 + with: + incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} From 3650277251189c6e3438f2381772f308bc1dd37b Mon Sep 17 00:00:00 2001 From: Daniel Tipping Date: Thu, 6 Jul 2023 12:35:19 +0100 Subject: [PATCH 06/10] Add workflow to sync to Bitbucket --- .github/workflows/sync.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 00000000..3deffa3b --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,24 @@ +name: sync + +# Controls when the workflow will run +on: + # Trigger the workflow on all pushes + push: + branches: + - "**" + tags: + - "**" + + # Trigger the workflow when a branch or tag is deleted + delete: ~ + +jobs: + # Calls a reusable CI workflow to sync the current with a remote repository. + # It will correctly handle addition of any new and removal of existing Git objects. + sync: + name: sync + uses: ecmwf-actions/reusable-workflows/.github/workflows/sync.yml@v2 + secrets: + target_repository: odb/odc + target_username: ClonedDuck + target_token: ${{ secrets.BITBUCKET_PAT }} From a0f6523e47c68f541c3f1972bb79ca06641138b2 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Wed, 26 Jul 2023 16:58:23 +0200 Subject: [PATCH 07/10] Add CD --- .github/workflows/cd.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..ef99a217 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,11 @@ +name: cd + +on: + push: + tags: + - '**' + +jobs: + deploy: + uses: ecmwf-actions/reusable-workflows/.github/workflows/create-package.yml@v2 + secrets: inherit From 6bc9fc10eadc0578e62e0085af15dbe9bf8c3948 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Wed, 26 Jul 2023 16:58:54 +0200 Subject: [PATCH 08/10] Add code coverage --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33e923c9..c50ce5d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main with: odc: ecmwf/odc@${{ github.event.pull_request.head.sha || github.sha }} + codecov_upload: true secrets: inherit # Build downstream packages on HPC From 0341b631dbab93f5243cad112be2e974594ef1f0 Mon Sep 17 00:00:00 2001 From: Philipp Geier Date: Wed, 25 Oct 2023 11:29:28 +0200 Subject: [PATCH 09/10] Use C++17 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b62225e3..14d2ed10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ find_package( ecbuild 3.4 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CUR project( odc LANGUAGES C CXX ) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ######################################################################################################################## From b487e8e8680a1a8e095e0460eddad3172f45939d Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Fri, 8 Dec 2023 14:15:44 +0000 Subject: [PATCH 10/10] version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c514bd85..bc80560f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.6 +1.5.0