From 83a948eb058879bc9a24efb9d24d5cd679d61c2b Mon Sep 17 00:00:00 2001 From: MinsukJi-NOAA Date: Mon, 23 Nov 2020 09:43:52 -0500 Subject: [PATCH] Update ci to use latest hpc-stack container (#240, #277). Update actions deprecated set-env commands --- .github/workflows/manage.yml | 8 ++++---- modulefiles/linux.gnu/fv3 | 6 +++--- tests/ci/Dockerfile | 11 +++++------ tests/ci/ci.sh | 2 +- tests/utest | 6 +++--- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/manage.yml b/.github/workflows/manage.yml index 9f12a8f372..c933b36e64 100644 --- a/.github/workflows/manage.yml +++ b/.github/workflows/manage.yml @@ -22,15 +22,15 @@ jobs: tr_id=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py get_trigger_id) tr_br=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py get_trigger_br) check=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py check_skip) - echo "::set-env name=TRIGGER_ID::${tr_id}" - echo "::set-env name=TRIGGER_BR::${tr_br}" + echo "TRIGGER_ID=${tr_id}" >> $GITHUB_ENV + echo "TRIGGER_BR=${tr_br}" >> $GITHUB_ENV echo "skip-ci: ${check}" if [[ $check == yes ]]; then echo "skip-ci is requested" - echo '::set-env name=CURR_JOB::cancelled' + echo "CURR_JOB=cancelled" >> $GITHUB_ENV curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" ${repo}/$tr_id/cancel else - echo '::set-env name=CURR_JOB::running' + echo "CURR_JOB=running" >> $GITHUB_ENV fi - name: Cancel redundant jobs diff --git a/modulefiles/linux.gnu/fv3 b/modulefiles/linux.gnu/fv3 index d29365a290..c93e096e2c 100755 --- a/modulefiles/linux.gnu/fv3 +++ b/modulefiles/linux.gnu/fv3 @@ -26,7 +26,7 @@ export CMAKE_Fortran_COMPILER=${FC} ## ## use own NetCDF library ## -export NETCDF=${NETCDF:-/usr/local} +export NETCDF=${NETCDF:-/home/builder/opt} ## ## use SIONlib library if installed and environment variable is set @@ -41,10 +41,10 @@ fi ## ## use pre-compiled EMSF library for above compiler / MPI combination ## -export ESMFMKFILE=${ESMFMKFILE:-/usr/local/lib/esmf.mk} +export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk} ## ## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs) ## -export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/usr/local/NCEPlibs} +export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt} export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR} diff --git a/tests/ci/Dockerfile b/tests/ci/Dockerfile index bb28d78247..3a8bd8ebf0 100644 --- a/tests/ci/Dockerfile +++ b/tests/ci/Dockerfile @@ -1,11 +1,10 @@ -From minsukjinoaa/ci-test-base:ubuntu20.04-v3.5 -#From minsukjinoaa/ci-test-base:centos7-v3.5 +From noaaemc/ubuntu-hpc:v1 -ENV HOME=/home/tester -COPY --chown=tester:tester . $HOME/ufs-weather-model +ENV HOME=/home/builder +COPY --chown=builder:builder . $HOME/ufs-weather-model -USER tester -ENV USER=tester +USER builder +ENV USER=builder ARG test_name ARG build_case ENV test_name=$test_name diff --git a/tests/ci/ci.sh b/tests/ci/ci.sh index d332078e5f..f37cbde0f8 100755 --- a/tests/ci/ci.sh +++ b/tests/ci/ci.sh @@ -75,7 +75,7 @@ if [ $BUILD = "true" ]; then elif [ $RUN == "true" ]; then sudo docker run -d --rm -v DataVolume:/tmp minsukjinoaa/fv3-input-data:develop-20200713 - sudo docker run -d -e test_case=${TEST_CASE} -v DataVolume:/home/tester/data/NEMSfv3gfs/develop-20200713 --name my-container ${IMG_NAME} + sudo docker run -d -e test_case=${TEST_CASE} -v DataVolume:/home/builder/data/NEMSfv3gfs/develop-20201118 --name my-container ${IMG_NAME} echo 'cache,rss,shmem' >memory_stat sleep 3 diff --git a/tests/utest b/tests/utest index 230ca8c9f9..fb0c4102b1 100755 --- a/tests/utest +++ b/tests/utest @@ -482,7 +482,7 @@ elif [[ $MACHINE_ID = linux.* ]]; then PARTITION= QUEUE= COMPILE_QUEUE= - dprefix=/home/tester + dprefix=/home/builder DISKNM=${dprefix}/data STMP=${dprefix}/stmp4 PTMP=${dprefix}/stmp2 @@ -711,9 +711,9 @@ fi mkdir -p ${STMP}/${USER} NEW_BASELINE=${STMP}/${USER}/FV3_UT/UNIT_TEST if [[ $MACHINE_ID == hera.* || $MACHINE_ID == orion.* ]]; then - baseline_location=$DISKNM/NEMSfv3gfs/develop-20200713/${RT_COMPILER^^} + baseline_location=$DISKNM/NEMSfv3gfs/develop-20201118/${RT_COMPILER^^} else - baseline_location=$DISKNM/NEMSfv3gfs/develop-20200713 + baseline_location=$DISKNM/NEMSfv3gfs/develop-20201118 fi RTPWD=$baseline_location