Skip to content

Commit 0beb5ff

Browse files
committed
Use github.actor to store and retrieve container
1 parent 72dd763 commit 0beb5ff

File tree

4 files changed

+37
-21
lines changed

4 files changed

+37
-21
lines changed

.github/workflows/build_ci_image.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
# workflow builds.
1313
env:
1414
REGISTRY: ghcr.io
15-
IMAGE_NAME: darth/orca-jedi/ci-almalinux9
15+
IMAGE_NAME: ${{ github.actor }}/orca-jedi/ci-almalinux9
1616

1717
jobs:
1818
build-and-push-image:
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
registry: ${{ env.REGISTRY }}
3838
username: ${{ github.actor }}
39-
password: ${{ secrets.GH_PAT }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
4040
# This step uses
4141
# [docker/metadata-action](https://github.com/docker/metadata-action#about)
4242
# to extract tags and labels that will be applied to the specified image.

.github/workflows/ci.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
issues: read
15+
pull-requests: read
16+
packages: read
1217
steps:
1318
- name: checkout current repo
1419
uses: actions/checkout@v3
@@ -21,47 +26,51 @@ jobs:
2126
path: ci/jedicmake
2227
repository: JCSDA-internal/jedi-cmake
2328
submodules: true
24-
token: ${{ secrets.GH_PAT }}
29+
token: ${{ secrets.GITHUB_TOKEN }}
2530

2631
- name: checkout oops
2732
uses: actions/checkout@v3
2833
with:
2934
path: ci/oops
3035
repository: JCSDA-internal/oops
31-
token: ${{ secrets.GH_PAT }}
36+
token: ${{ secrets.GITHUB_TOKEN }}
3237

3338
- name: checkout ioda
3439
uses: actions/checkout@v3
3540
with:
3641
path: ci/ioda
3742
repository: JCSDA-internal/ioda
38-
token: ${{ secrets.GH_PAT }}
43+
token: ${{ secrets.GITHUB_TOKEN }}
3944

4045
- name: checkout ufo
4146
uses: actions/checkout@v3
4247
with:
4348
path: ci/ufo
4449
repository: JCSDA-internal/ufo
45-
token: ${{ secrets.GH_PAT }}
46-
47-
- name: checkout atlas-orca
48-
uses: actions/checkout@v3
49-
with:
50-
path: ci/atlas-orca
51-
repository: ECMWF/atlas-orca
50+
token: ${{ secrets.GITHUB_TOKEN }}
5251

5352
- name: checkout atlas-data
5453
uses: actions/checkout@v3
5554
with:
5655
path: ci/atlas-data
5756
repository: MetOffice/atlas-data
5857
lfs: true
59-
token: ${{ secrets.GH_PAT }}
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- name: Log in to GitHub Container Registry
61+
uses: docker/login-action@v3
62+
with:
63+
registry: ghcr.io
64+
username: darth
65+
password: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Pull Docker image
68+
run: docker pull ghcr.io/darth/orca-jedi/ci-almalinux9:develop
6069

6170
- name: build and test
6271
run: |
6372
docker run --rm \
6473
--entrypoint=/usr/local/src/orca-jedi/ci/build-and-test.sh \
6574
--workdir=/usr/local/src/orca-jedi/ci \
6675
--volume $PWD:/usr/local/src/orca-jedi \
67-
'jcsda/docker-gnu-openmpi-dev:latest'
76+
ghcr.io/${{ github.actor }}/orca-jedi/ci-almalinux9:v1.2.0

ci/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if(NOT DEFINED jedicmake_DIR)
1717
set(jedicmake_DIR "${CMAKE_BINARY_DIR}/jedicmake")
1818
endif()
1919

20-
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/atlas-orca" EXCLUDE_FROM_ALL)
2120
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/oops" EXCLUDE_FROM_ALL)
2221
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ioda" EXCLUDE_FROM_ALL)
2322
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ufo" EXCLUDE_FROM_ALL)

ci/build-and-test.sh

+14-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ trap finally EXIT
2020

2121
cd "${WORKD}"
2222

23-
source /opt/spack-environment/activate.sh
23+
if [[ -f /opt/spack-environment/activate.sh ]]; then
24+
source /opt/spack-environment/activate.sh
25+
fi
26+
27+
# -- Enable OpenMPI over subscription -----------------------------------------
28+
if command -v ompi_info &>/dev/null; then
29+
echo "Check support for MPI_THREAD_MULTIPLE"
30+
ompi_info | grep -i 'thread support'
31+
ompi_vn=$(ompi_info | awk '/Ident string:/ {print $3}')
32+
case $ompi_vn in
33+
4.*) export OMPI_MCA_rmaps_base_oversubscribe=1 ;;
34+
5.*) export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe ;;
35+
esac
36+
fi
2437

2538
echo "
2639
-------------------------------
@@ -41,11 +54,6 @@ ln -s '..' "${HERE}/orca-jedi"
4154
ecbuild -S "${HERE}"
4255
make -j "${NPROC}"
4356

44-
if [[ ! -f share/plugins/atlas-orca.yml ]]; then
45-
echo "ERROR atlas-orca.yml not found!" | tee >(cat >&2)
46-
exit 1
47-
fi
48-
4957
env OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
5058
ATLAS_TRACE=1 ATLAS_DEBUG=1 \
5159
LD_LIBRARY_PATH="${HERE}/lib:${LD_LIBRARY_PATH}" \

0 commit comments

Comments
 (0)