Skip to content
Merged
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
74 changes: 3 additions & 71 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,76 +17,8 @@ env:

jobs:
build1:
name: gnu 11.3.1 (UKMO)
if: github.repository_owner == 'MetOffice'
runs-on: jedi-self-hosted-rg

steps:
- name: Pre-submit cleanup
run: |
rm -fr ./${{ env.BUNDLE }} || true
ls -lgo ./
- name: Checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/${{ env.REPO }}
- name: Initiate bundle
run: cp ./${{ env.BUNDLE }}/${{ env.REPO }}/ci/* ./${{ env.BUNDLE }}/

- name: Checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}

- name: Checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for oops@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/oops

- name: Checkout ioda
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/ioda
repository: JCSDA-internal/ioda
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for ioda@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/ioda

- name: Checkout ufo
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/ufo
repository: JCSDA-internal/ufo
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for ufo@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/ufo

- name: Build and Test
run: |
az acr login --name ngmssboxjediacr
docker run --rm \
--entrypoint=/usr/local/src/${REPO}/${BUNDLE}/build-and-test \
--workdir=/usr/local/src/${REPO}/${BUNDLE} \
--volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
'ngmssboxjediacr.azurecr.io/jedibase:alma9'

- name: Cleanup workspace
working-directory: ${{github.workspace}}
run: rm -fr ${{ env.BUNDLE }} || true

build2:
name: gnu 9.4.0 (JCSDA)
if: github.repository_owner == 'MetOffice'
name: gnu-openmpi (JCSDA)
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -143,9 +75,9 @@ jobs:
--volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
'jcsda/docker-gnu-openmpi-dev:latest'

build3:
name: clang 10.0.0 (JCSDA)
build2:
if: github.repository_owner == 'MetOffice'
name: clang-mpich (JCSDA)
runs-on: ubuntu-latest

steps:
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: UKMO Container (Manual)

on:
workflow_dispatch:


concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

env:
REPO: ${{ github.event.repository.name }}
BUNDLE: pr-${{ github.event.number }}

jobs:
build1:
if: github.repository_owner == 'MetOffice'
name: gnu-openmpi (UKMO)
runs-on: jedi-self-hosted-rg

steps:
- name: Pre-submit cleanup
run: |
rm -fr ./${{ env.BUNDLE }} || true
ls -lgo ./
- name: Checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/${{ env.REPO }}
- name: Initiate bundle
run: cp ./${{ env.BUNDLE }}/${{ env.REPO }}/ci/* ./${{ env.BUNDLE }}/

- name: Checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}

- name: Checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for oops@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/oops

- name: Checkout ioda
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/ioda
repository: JCSDA-internal/ioda
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for ioda@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/ioda

- name: Checkout ufo
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/ufo
repository: JCSDA-internal/ufo
token: ${{ secrets.GH_PAT }}
- name: Checkout attempt for ufo@${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/ufo

- name: Build and Test
run: |
az acr login --name ngmssboxjediacr
docker run --rm \
--entrypoint=/usr/local/src/${REPO}/${BUNDLE}/build-and-test \
--workdir=/usr/local/src/${REPO}/${BUNDLE} \
--volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
'ngmssboxjediacr.azurecr.io/jedibase:alma9'

- name: Cleanup workspace
working-directory: ${{github.workspace}}
run: rm -fr ${{ env.BUNDLE }} || true
12 changes: 6 additions & 6 deletions ci/build-and-test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# (C) Crown Copyright 2023, the Met Office. All rights reserved.
# (C) Crown Copyright 2024, the Met Office. All rights reserved.
#
# shellcheck disable=SC2317
# shellcheck source=/dev/null
Expand Down Expand Up @@ -28,6 +28,8 @@ GENERATOR=Unix\ Makefiles
if command -v ninja &>/dev/null; then GENERATOR=Ninja; fi
BASE="${HERE%/*}"
TESTDIR="${BASE##*/}"
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_MCA_rmaps_base_oversubscribe=true

trap finally ERR EXIT
Expand All @@ -40,15 +42,13 @@ if [[ -f /opt/spack-environment/activate.sh ]]; then
fi

# -- Configure
cmake -B . -S "${HERE}" -G "${GENERATOR}" -DCMAKE_BUILD_TYPE=Debug
cmake -B . -S "${HERE}" -G "${GENERATOR}" -DCMAKE_BUILD_TYPE=Release

# -- Build
cmake --build . -j "${NPROC}"

# -- Test
env OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
ctest -j"${NPROC}" --test-dir "${TESTDIR}" || \
env OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
ctest --test-dir "${TESTDIR}" --rerun-failed -V
ctest -j"${NPROC}" --test-dir "${TESTDIR}" || \
ctest --test-dir "${TESTDIR}" --rerun-failed -V

exit
Loading