Skip to content

Commit 0a07af4

Browse files
author
Mark Miesch
authored
Merge pull request #1241 from JCSDA-internal/release/1.1.0
Release/1.1.0
2 parents 40e85e4 + f04e906 commit 0a07af4

File tree

736 files changed

+19711
-11730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

736 files changed

+19711
-11730
lines changed

.codecov.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ coverage:
66
precision: 2
77
round: down
88
range: "70...100"
9+
status:
10+
project:
11+
default:
12+
threshold: 0.05%
13+
patch:
14+
default:
15+
threshold: 2%
916

1017
ignore:
1118
- "src/test"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Use this template to report bugs
4+
title: "[Bug]"
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
## Current behavior (describe the bug)
11+
>[Be sure to add a Pipeline, Label, Estimate, Assignees, and Epic](https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/en/latest/inside/practices/issues.html)
12+
13+
## To Reproduce
14+
15+
> What computer are you running on?
16+
17+
> What compilers/modules are you using?
18+
19+
> Steps to reproduce the behavior
20+
21+
1.
22+
2.
23+
3.
24+
...
25+
26+
## Expected behavior
27+
28+
## Additional information (optional)

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: JCSDA
4+
url: https://jcsda.org/
5+
about: JCSDA web site
6+
- name: Forums
7+
url: https://forums.jcsda.org/
8+
about: JCSDA user/developer forums
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: General issue template
3+
about: Use this template for general issues
4+
title: "[New issue]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
>Provide a detailed description of this issue.
12+
>What problem needs to be fixed? What new capability needs to be added?
13+
>If this is a bug, describe the current behavior (or use the bug template).
14+
>[Be sure to add a Pipeline, Label, Estimate, Assignees, and Epic](https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/en/latest/inside/practices/issues.html)
15+
16+
## Requirements
17+
18+
>If this is a new feature: What does the new code need to accomplish? Does it require new software dependencies (e.g. new jedi-stack components or new python modules?)
19+
>If this is a bugfix: What is the expected behavior?
20+
21+
## Acceptance Criteria (Definition of Done)
22+
>What does it mean for this to be finished?
23+
24+
## Dependencies
25+
>What must be done before this can be done? Add issue dependencies in ZenHub as appropriate
26+
>Does this block progress on other issues? Add this issue as a dependency to other ZenHub issues as appropriate

CI/CMakeLists.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
# (C) Copyright 2017 UCAR
33
#
44
# This software is licensed under the terms of the Apache Licence Version 2.0
@@ -8,25 +8,21 @@
88
# OOPS bundle
99
#
1010

11-
project( oops-bundle C CXX Fortran )
11+
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
1212

13-
cmake_minimum_required( VERSION 3.3.2 FATAL_ERROR )
13+
project( oops-bundle VERSION 1.0.0 LANGUAGES C CXX Fortran )
1414

15-
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/ecbuild/cmake;${CMAKE_MODULE_PATH}")
15+
find_package(ecbuild REQUIRED)
16+
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
1617
include( ecbuild_bundle )
1718

1819
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )
1920

2021
ecbuild_bundle_initialize()
2122

22-
ecbuild_requires_macro_version( 2.7 )
23-
24-
ecbuild_add_option( FEATURE OMP
25-
DEFAULT ON
26-
DESCRIPTION "Use OpenMP" )
27-
28-
ecbuild_bundle( PROJECT fckit GIT "https://github.com/JCSDA/fckit.git" )
29-
ecbuild_bundle( PROJECT atlas GIT "https://github.com/JCSDA/atlas.git" )
30-
ecbuild_bundle( PROJECT oops GIT "https://github.com/JCSDA/oops.git" )
23+
ecbuild_bundle( PROJECT oops GIT "https://github.com/jcsda-internal/oops.git" )
3124

3225
ecbuild_bundle_finalize()
26+
27+
include(cmake/cdash-integration.cmake)
28+
include(CTest)

CI/buildspec_clang.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 0.2
22

33
env:
4+
shell: bash
45
parameter-store:
56
GIT_USER: "/CodeBuild/Git_USER"
67
GIT_PASS: "/CodeBuild/Git_PASS"
@@ -21,7 +22,15 @@ phases:
2122
- echo $CODEBUILD_WEBHOOK_TRIGGER
2223
- echo $CODEBUILD_WEBHOOK_BASE_REF
2324

24-
- if [ "$CODEBUILD_WEBHOOK_EVENT" = "PULL_REQUEST_MERGED" ];
25+
- gh_source=$(pwd)
26+
- echo ${gh_source}
27+
- echo $CODEBUILD_SRC_DIR
28+
29+
# Codebuild only runs on PUSH events if HEAD_REF
30+
# is refs/heads/develop (merge to develop). In this
31+
# case CODEBUILD_GIT_BRANCH="develop"
32+
33+
- if [ "$CODEBUILD_WEBHOOK_EVENT" = "PUSH" ];
2534
then export CODEBUILD_GIT_BRANCH="develop";
2635
echo "Merging to develop";
2736
else export CODEBUILD_GIT_BRANCH=${CODEBUILD_WEBHOOK_HEAD_REF#refs/heads/};
@@ -31,9 +40,9 @@ phases:
3140
- echo "CODEBUILD_SOURCE_VERSION=${CODEBUILD_SOURCE_VERSION}"
3241

3342
- echo "check for same branch names, except for develop"
34-
- if ! [ "$CODEBUILD_GIT_BRANCH" = "develop" ]; then
43+
- if ! [ "$CODEBUILD_GIT_BRANCH" = "develop" ]; then
3544
pip install boto3;
36-
pip install pygithub;
45+
pip install pygithub;
3746
python CI/update_webhook_branchname.py $CODEBUILD_GIT_BRANCH $CODEBUILD_RESOLVED_SOURCE_VERSION;
3847
fi
3948

@@ -45,15 +54,34 @@ phases:
4554
- echo ${CODEBUILD_RESOLVED_SOURCE_VERSION} > artifacts/commit_sha.txt
4655

4756
# get jedi-build-package
48-
- git clone https://$GIT_USER:[email protected]/jcsda-internal/jedi-build-package
57+
- git clone -b feature/ecbuild35 https://$GIT_USER:[email protected]/jcsda-internal/jedi-build-package
4958

5059
- cd jedi-build-package
5160
- pip install --user -e .
5261

53-
- ~/.local/bin/jedi-build --gh-token=$GIT_PASS -j 4 --env-id=docker-clang --branch-map atlas:release-stable fckit:release-stable -br ${CODEBUILD_GIT_BRANCH} -p oops -vvv -3 -u --submit-dashboard --site CodeBuild --abort-on-build-errors --abort-on-test-errors
62+
- ~/.local/bin/jedi-build --gh-token=$GIT_PASS -j 4 --env-id=docker-clang --branch-map atlas:release-stable fckit:release-stable -br ${CODEBUILD_GIT_BRANCH} -p oops -vvv -3 -u --submit-dashboard --site CodeBuild --abort-on-build-errors --abort-on-test-errors --cleanup=False 2>&1 | tee jedi_build_output.txt ; test ${PIPESTATUS[0]} -eq 0
63+
64+
#find CDASH URL
65+
- Done_path_line=$(grep 'Done.xml' jedi_build_output.txt | tail -1)
66+
- echo $Done_path_line
67+
- Done_path=$(echo ${Done_path_line} | sed 's/Uploaded://')
68+
- echo $Done_path
69+
- cat $Done_path
70+
# retrieve buildID from Done.xml
71+
- buildID=$(cat $Done_path | grep -o -P '(?<=buildId>).*(?=</build)')
72+
- echo ${buildID}
73+
- url=https://cdash.jcsda.org/buildSummary.php?buildid=${buildID}
74+
- echo ${url}
75+
76+
#create artifacts
77+
- mkdir -p /jcsda/artifacts/
78+
- echo ${url} > /jcsda/artifacts/cdash-url.txt
79+
- cat /jcsda/artifacts/cdash-url.txt
80+
- echo ${CODEBUILD_GIT_BRANCH} > /jcsda/artifacts/branch_name.txt
81+
- echo ${CODEBUILD_RESOLVED_SOURCE_VERSION} > /jcsda/artifacts/commit_sha.txt
82+
- ls /jcsda/artifacts/
5483

55-
5684
artifacts:
5785
files:
58-
- 'artifacts/*'
59-
name: artifact-oops-clang
86+
- '/jcsda/artifacts/*'
87+
name: oops-clang-url

CI/buildspec_gnu.yml

Lines changed: 71 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ phases:
1212

1313
- echo $CODEBUILD_RESOLVED_SOURCE_VERSION
1414
- echo $CODEBUILD_SOURCE_REPO_URL
15+
- org_name=$(echo $CODEBUILD_SOURCE_REPO_URL | awk '{split($0,org,"/"); print org[4]}')
16+
- echo $org_name
1517
- echo $CODEBUILD_SOURCE_VERSION
1618

1719
- echo $CODEBUILD_WEBHOOK_MERGE_COMMIT
@@ -22,7 +24,11 @@ phases:
2224
- echo $CODEBUILD_WEBHOOK_TRIGGER
2325
- echo $CODEBUILD_WEBHOOK_BASE_REF
2426

25-
- if [ "$CODEBUILD_WEBHOOK_EVENT" = "PULL_REQUEST_MERGED" ];
27+
# Codebuild only runs on PUSH events if HEAD_REF
28+
# is refs/heads/develop (merge to develop). In this
29+
# case CODEBUILD_GIT_BRANCH="develop"
30+
31+
- if [ "$CODEBUILD_WEBHOOK_EVENT" = "PUSH" ];
2632
then export CODEBUILD_GIT_BRANCH="develop";
2733
echo "Merging to develop";
2834
else export CODEBUILD_GIT_BRANCH=${CODEBUILD_WEBHOOK_HEAD_REF#refs/heads/};
@@ -31,102 +37,108 @@ phases:
3137
- echo "CODEBUILD_GIT_BRANCH=${CODEBUILD_GIT_BRANCH}"
3238
- echo "CODEBUILD_SOURCE_VERSION=${CODEBUILD_SOURCE_VERSION}"
3339

34-
- echo MPI setup for Docker
35-
- mkdir -p /var/run/sshd
36-
- ssh-keygen -A
37-
- sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config
38-
- sed -i 's/#RSAAuthentication yes/RSAAuthentication yes/g' /etc/ssh/sshd_config
39-
- sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
40-
41-
- groupadd jcsda -g 9999
42-
- useradd jcsdauser
43-
- mkdir -p /jcsda /build_container
44-
- chown -R jcsdauser:jcsda /build_container /usr/local
45-
- chmod 6755 /jcsda /build_container /usr/local
46-
47-
- mkdir /jcsda/.ssh ; echo "StrictHostKeyChecking no" > /jcsda/.ssh/config
48-
- mkdir -p /jcsda/.openmpi
49-
- mkdir -p /jcsda/oops-bundle
50-
- mkdir -p /home/jcsdauser/.openmpi
51-
52-
- cp CI/default-mca-params.conf /home/jcsdauser/.openmpi/mca-params.conf
53-
- cat /home/jcsdauser/.openmpi/mca-params.conf
54-
- chown -R jcsdauser:jcsda /jcsda/
55-
56-
- su - jcsdauser -c "ssh-keygen -f /jcsda/.ssh/id_rsa -t rsa -N ''
57-
&& chmod 600 /jcsda/.ssh/config
58-
&& chmod 700 /jcsda/.ssh
59-
&& cp /jcsda/.ssh/id_rsa.pub /jcsda/.ssh/authorized_keys
60-
&& echo MPI setup for Docker done"
61-
6240
pre_build:
6341
commands:
6442
- echo Executing pre_build phase
43+
- mkdir -p /jcsda/oops-bundle
6544

6645
- git lfs install
67-
- cp ~/.gitconfig /home/jcsdauser/
68-
- cp CI/CMakeLists.txt /jcsda/oops-bundle
69-
46+
- cp ~/.gitconfig /home/jedi/
7047
- cd CI
71-
48+
7249
- if [ "$CODEBUILD_GIT_BRANCH" = "develop" ];
7350
then export CODEBUILD_GIT_BRANCH_FORK="release-stable";
7451
else export CODEBUILD_GIT_BRANCH_FORK=${CODEBUILD_GIT_BRANCH};
7552
echo "CODEBUILD_GIT_BRANCH_FORK=${CODEBUILD_GIT_BRANCH_FORK}";
7653
fi
7754

55+
# Upload branch name and commit sha as CodeBuild artifact to S3
56+
- mkdir /jcsda/artifacts
57+
- echo ${CODEBUILD_GIT_BRANCH} > /jcsda/artifacts/branch_name.txt
58+
- echo ${CODEBUILD_RESOLVED_SOURCE_VERSION} > /jcsda/artifacts/commit_sha.txt
59+
7860
# oops
79-
- ./clone.sh $GIT_USER $GIT_PASS jcsda/oops $CODEBUILD_GIT_BRANCH oops /jcsda/oops-bundle develop
80-
# fckit
81-
- ./clone.sh $GIT_USER $GIT_PASS jcsda-internal/fckit $CODEBUILD_GIT_BRANCH_FORK fckit /jcsda/oops-bundle release-stable
82-
# atlas
83-
- ./clone.sh $GIT_USER $GIT_PASS jcsda-internal/atlas $CODEBUILD_GIT_BRANCH_FORK atlas /jcsda/oops-bundle release-stable
61+
- ./clone.sh $GIT_USER $GIT_PASS jcsda-internal/oops $CODEBUILD_GIT_BRANCH oops /jcsda/oops-bundle develop
62+
63+
# move CMakeLists.txt from oops/CI to bundle directory
64+
- cp CMakeLists.txt /jcsda/oops-bundle/CMakeLists.txt
65+
66+
# cdash upload setup
67+
- mkdir /jcsda/oops-bundle/cmake
68+
- cp cmake/CTestCustom.ctest.in /jcsda/oops-bundle/cmake/
69+
- cp cmake/cdash-integration.cmake /jcsda/oops-bundle/cmake/
70+
- cp cmake/CTestConfig.cmake /jcsda/oops-bundle/
8471

85-
- cd /jcsda/oops-bundle
86-
- ls
87-
8872
build:
73+
on-failure: CONTINUE
8974
commands:
9075
- echo Executing build phase
91-
- su - jcsdauser -c "cd /build_container
76+
- export BUILD_STATUS="0"
77+
- echo $BUILD_STATUS
78+
- echo $CODEBUILD_BUILD_SUCCEEDING
79+
80+
# configure and build
81+
- su - jedi -c "cd /home/jedi
9282
&& ls
9383
&& export FC=mpifort
9484
&& export CC=mpicc
9585
&& export CXX=mpicxx
96-
&& cmake -DCMAKE_MODULE_PATH=/usr/local/share/ecbuild/cmake/ -DCMAKE_BUILD_TYPE=Debug -DENABLE_GPROF=ON -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_Fortran_COMPILER=$(which gfortran) /jcsda/oops-bundle/
97-
&& cd oops
98-
&& make -j4"
86+
&& ecbuild -Wno-dev -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCDASH_OVERRIDE_GIT_BRANCH=$CODEBUILD_GIT_BRANCH -DCTEST_UPDATE_VERSION_ONLY=FALSE -DENABLE_GPROF=ON /jcsda/oops-bundle/"
9987

100-
- export BUILD_STATUS="0"
101-
- echo $BUILD_STATUS
102-
- echo $CODEBUILD_BUILD_SUCCEEDING
88+
- su - jedi -c "cd /home/jedi/oops
89+
&& export FC=mpifort
90+
&& export CC=mpicc
91+
&& export CXX=mpicxx
92+
&& cp ../DartConfiguration.tcl .
93+
&& sed -i 's/oops-bundle/oops-bundle\/oops/' DartConfiguration.tcl
94+
&& sed -i 's/jedi/jedi\/oops/' DartConfiguration.tcl
95+
&& cat DartConfiguration.tcl
96+
&& make -j4"
10397

10498
- if [ "$CODEBUILD_BUILD_SUCCEEDING" = "1" ];
10599
then export BUILD_STATUS="1";
106100
echo "Build passed";
107101
fi
108102
- echo $BUILD_STATUS
109103

110-
- su - jcsdauser -c "cd /build_container
111-
&& ls
104+
# run ctest and upload to cdash
105+
- su - jedi -c "cd /home/jedi/oops
106+
&& export FC=mpifort
107+
&& export CC=mpicc
108+
&& export CXX=mpicxx
109+
&& ctest -C RelWithDebInfo -D ExperimentalTest -E test_qg_4dvar_saddlepoint"
110+
111+
finally:
112+
- su - jedi -c "cd /home/jedi/oops
112113
&& export FC=mpifort
113114
&& export CC=mpicc
114115
&& export CXX=mpicxx
115-
&& cd oops
116-
&& ctest"
117-
116+
&& ctest -C RelWithDebInfo -D ExperimentalSubmit -M Continuous -- --track Continuous --group Continuous"
117+
118118
post_build:
119119
commands:
120120
- echo Executing post_build phase
121121
- echo $CODEBUILD_BUILD_SUCCEEDING
122-
- if [ "$BUILD_STATUS" = "1" ] && [ "$CODEBUILD_BUILD_SUCCEEDING" = "0" ];
123-
then echo "Build passed, rerun failed tests";
124-
su - jcsdauser -c "cd /build_container/oops
125-
&& ctest -VV --rerun-failed";
122+
- echo $BUILD_STATUS
123+
124+
# upload find cdash url and upload it as CodeBuild artifact to S3
125+
- if [ "$BUILD_STATUS" = "1" ];
126+
then echo "Build & tests passed, find cdash url";
127+
bash /jcsda/oops-bundle/oops/CI/cdash-url.sh /home/jedi/oops/Testing;
128+
url=$(bash /jcsda/oops-bundle/oops/CI/cdash-url.sh /home/jedi/oops/Testing);
129+
echo $url;
130+
echo ${url} > /jcsda/artifacts/cdash-url.txt;
131+
cat /jcsda/artifacts/cdash-url.txt;
126132
else echo "Build failed";
127133
fi
134+
128135
- echo 'Connect to CodeCov'
129-
- cd /build_container/oops
136+
- cd /home/jedi/oops
130137
- pwd
131138
- ls
132-
- bash /jcsda/oops-bundle/oops/CI/codecov_script.sh
139+
- bash /jcsda/oops-bundle/oops/CI/codecov_script_$org_name.sh
140+
141+
artifacts:
142+
files:
143+
- '/jcsda/artifacts/*'
144+
name: oops-gnu-url

0 commit comments

Comments
 (0)