-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI using JCSDA docker image. -------- Co-authored-by: Yaswant Pradhan <[email protected]>
- Loading branch information
Showing
5 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
pull_request: | ||
branches: [develop] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout current repo | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: checkout jedicmake | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/jedicmake | ||
repository: JCSDA-internal/jedi-cmake | ||
submodules: true | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: checkout oops | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/oops | ||
repository: JCSDA-internal/oops | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: checkout ioda | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/ioda | ||
repository: JCSDA-internal/ioda | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: checkout ufo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/ufo | ||
repository: JCSDA-internal/ufo | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: checkout atlas-orca | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/atlas-orca | ||
repository: ECMWF/atlas-orca | ||
|
||
- name: checkout atlas-data | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ci/atlas-data | ||
repository: MetOffice/atlas-data | ||
lfs: true | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: build and test | ||
run: | | ||
docker run --rm \ | ||
--entrypoint=/usr/local/src/orca-jedi/ci/build-and-test.sh \ | ||
--workdir=/usr/local/src/orca-jedi/ci \ | ||
--volume $PWD:/usr/local/src/orca-jedi \ | ||
'jcsda/docker-gnu-openmpi-dev:latest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. image:: https://github.com/MetOffice/orca-jedi/actions/workflows/ci.yml/badge.svg | ||
|
||
orca-jedi | ||
========= | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# (C) Copyright 2022 Met Office | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
|
||
cmake_minimum_required( VERSION 3.18 FATAL_ERROR ) | ||
|
||
project( orca-jedi-ci VERSION 1.0 LANGUAGES C CXX Fortran ) | ||
|
||
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" ) | ||
set( ENABLE_OMP ON CACHE BOOL "Compile with OpenMP" ) | ||
|
||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/jedicmake" EXCLUDE_FROM_ALL) | ||
if(NOT DEFINED jedicmake_DIR) | ||
set(jedicmake_DIR "${CMAKE_BINARY_DIR}/jedicmake") | ||
endif() | ||
|
||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/atlas-orca" EXCLUDE_FROM_ALL) | ||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/oops" EXCLUDE_FROM_ALL) | ||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ioda" EXCLUDE_FROM_ALL) | ||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ufo" EXCLUDE_FROM_ALL) | ||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/orca-jedi") | ||
enable_testing() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
finally() { | ||
trap '' ERR | ||
trap '' EXIT | ||
if [[ -d "${WORKD:-}" ]]; then | ||
cd / | ||
rm -fr "${WORKD}" | ||
fi | ||
} | ||
|
||
HERE="$(cd "$(dirname "$0")" && pwd)" | ||
THIS="$(basename "$0")" | ||
NPROC=${NPROC:-2} | ||
WORKD="$(mktemp -d "${THIS}-XXXXXX" -t)" | ||
|
||
trap finally ERR | ||
trap finally EXIT | ||
|
||
cd "${WORKD}" | ||
|
||
source /opt/spack-environment/activate.sh | ||
|
||
echo " | ||
------------------------------- | ||
gcc version $(gcc -dumpversion ||:) | ||
$(ecbuild --version ||:) | ||
atlas version $(atlas --version ||:) | ||
eckit version $(eckit-version ||:) | ||
ectrans version $(ectrans --version ||:) | ||
fckit version $(fckit --version ||:) | ||
fiat version $(fiat --version ||:) | ||
lz4 version $(lz4 --version ||:) | ||
odc version $(odc --version ||:) | ||
------------------------------- | ||
" | ||
|
||
rm -f "${HERE}/orca-jedi" | ||
ln -s '..' "${HERE}/orca-jedi" | ||
ecbuild -S "${HERE}" | ||
make -j "${NPROC}" | ||
|
||
if [[ ! -f share/plugins/atlas-orca.yml ]]; then | ||
echo "ERROR atlas-orca.yml not found!" | tee >(cat >&2) | ||
exit 1 | ||
fi | ||
|
||
env OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \ | ||
ATLAS_TRACE=1 ATLAS_DEBUG=1 \ | ||
LD_LIBRARY_PATH="${HERE}/lib:${LD_LIBRARY_PATH}" \ | ||
ATLAS_DATA_PATH="${HERE}/atlas-data" \ | ||
ctest -j "${NPROC}" -V --output-on-failure --test-dir "./orca-jedi" | ||
|
||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters