Skip to content

update ci workflow #231

update ci workflow

update ci workflow #231

Workflow file for this run

# ci.yml
---
name: CI
on:
pull_request:
branches: [develop]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
env:
REPO: ${{ github.event.repository.name }}
PR: pr-${{ github.event.number }}
GH_TOKEN: ${{ secrets.GH_PAT }}
jobs:
build1:
if: |
( github.repository_owner == 'MetOffice' && github.event.pull_request.draft == false )
name: gnu-openmpi (UKMO)
runs-on: jedi-self-hosted-rg
steps:
- name: Pre-submit cleanup
run: |
rm -fr ./${{ env.PR }} || true
ls -la ./
- name: Checkout ${{ env.REPO }}
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/${{ env.REPO }}
- name: Initiate bundle
working-directory: ./${{ env.PR }}
run: ln -sf ./${{ env.REPO }}/ci/* .
- name: Checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}
- name: Checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: Check build-group for oops
if: github.event_name == 'pull_request'
run: ./${{ env.PR }}/check-build-group.sh ./${{ env.PR }}/oops
- name: Build and Test
env:
WORKDIR: /var/tmp/${{ env.REPO }}/${{ env.PR }}
MOBB_DATA: /var/tmp/mobb-data
shell: bash
run: |
az acr login --name ngmssboxjediacr
ln -sf /testdata/mobb-data -t ${{ github.workspace }}
docker run --rm \
--name ${REPO}_${PR}_${GITHUB_SHA::7} \
--volume ${{ github.workspace }}/${PR}:${WORKDIR} \
--volume ${{ github.workspace }}/mobb-data:${MOBB_DATA} \
--env MOBB_DATA=${MOBB_DATA} \
--env CI_TESTS=1 \
--workdir=${WORKDIR} \
--entrypoint=${WORKDIR}/build-and-test.sh \
'ngmssboxjediacr.azurecr.io/jedibase:alma9'
- name: Cleanup
working-directory: ${{github.workspace}}
run: rm -fr ${{ env.PR }} || true
build2:
if: |
( github.repository_owner == 'MetOffice' && github.event.pull_request.draft == false )
name: gnu-openmpi (JCSDA)
runs-on: ubuntu-latest
steps:
- name: checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/${{ env.REPO }}
- name: Initiate bundle
run: cp ./${{ env.PR }}/${{ env.REPO }}/ci/* ./${{ env.PR }}/
- name: checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: recursive
token: ${{ secrets.GH_PAT }}
- name: checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: Check build-group for oops
if: github.event_name == 'pull_request'
run: ./${{ env.PR }}/check-build-group.sh ./${{ env.PR }}/oops
- name: Build and Lint
env:
WORKDIR: /usr/local/src/${{ env.REPO }}/${{ env.PR }}
run: |
docker run --rm \
--volume ${PWD}/${PR}:${WORKDIR} \
--env CI_TESTS=0 \
--workdir=${WORKDIR} \
--entrypoint=${WORKDIR}/build-and-test.sh \
'jcsda/docker-gnu-openmpi-dev:latest'
build3:
if: |
( github.repository_owner == 'MetOffice' && github.event.pull_request.draft == false )
name: clang-mpich (JCSDA)
runs-on: ubuntu-latest
steps:
- name: checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/${{ env.REPO }}
- name: initiate PR
run: cp ./${{ env.PR }}/${{ env.REPO }}/ci/* ./${{ env.PR }}/
- name: checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: recursive
token: ${{ secrets.GH_PAT }}
- name: Checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.PR }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: Check build-group for oops
if: github.event_name == 'pull_request'
run: ./${{ env.PR }}/check-build-group.sh ./${{ env.PR }}/oops
- name: Build and Lint
env:
WORKDIR: /usr/local/src/${{ env.REPO }}/${{ env.PR }}
run: |
docker run --rm \
--volume ${PWD}/${PR}:${WORKDIR} \
--env CI_TESTS=0 \
--workdir=${WORKDIR} \
--entrypoint=${WORKDIR}/build-and-test.sh \
'jcsda/docker-clang-mpich-dev:latest'