From c55795cbf238f0e255e21db4df7b413591c02fc6 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 4 Nov 2024 11:50:03 -0800 Subject: [PATCH 1/8] include CODEOWNERS --- .github/CODEOWNERS | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..4db710f1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,13 @@ +# This is a comment. +# Each line is a file pattern followed by one or more owners. + +# For more info about this file, please see +# https://docs.github.com/en/enterprise/2.18/user/github/creating-cloning-and-archiving-repositories/about-code-owners + +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, + +* @hpc-io/pdc-developers + +# This directory controls the permissions/review requirements +.github/ @hpc-io/pdc \ No newline at end of file From 71937ca43ca44900ff4d255921946d2619527cc1 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Fri, 10 Jan 2025 09:21:47 -0800 Subject: [PATCH 2/8] include status messages --- .gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cdc68744..5091f34b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,17 +22,27 @@ stages: -H "Authorization: Bearer ${GITHUB_TOKEN}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \ - -d "{\"state\":\"${CI_JOB_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" + -d "{\"state\":\"${CI_JOB_NAME}\",\"description\":\"${STATUS_MESSAGE}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" pending: stage: .pre extends: - .report-status + script: + - echo "STATUS_MESSAGE='Waiting for approval to run on NERSC system...'" > .env + artifacts: + reports: + dotenv: .env success: stage: .post extends: - .report-status + script: + - echo "STATUS_MESSAGE='Successfully passed all tests on NERSC system!'" > .env + artifacts: + reports: + dotenv: .env failure: stage: .post @@ -40,6 +50,11 @@ failure: - .report-status rules: - when: on_failure + script: + - echo "STATUS_MESSAGE='Failed to pass all tests on NERSC system!'" > .env + artifacts: + reports: + dotenv: .env perlmutter-no-cache-build: stage: build From 1b3f03cb6e157a94ef8afc56601f345f5b124a35 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Fri, 10 Jan 2025 09:59:40 -0800 Subject: [PATCH 3/8] include status messages --- .gitlab-ci.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5091f34b..a6bec65f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,35 +26,26 @@ stages: pending: stage: .pre + variables: + STATUS_MESSAGE: "Waiting for manual approval to run on NERSC system..." extends: - .report-status - script: - - echo "STATUS_MESSAGE='Waiting for approval to run on NERSC system...'" > .env - artifacts: - reports: - dotenv: .env success: stage: .post + variables: + STATUS_MESSAGE: "Successfully passed all tests on NERSC system!" extends: - .report-status - script: - - echo "STATUS_MESSAGE='Successfully passed all tests on NERSC system!'" > .env - artifacts: - reports: - dotenv: .env failure: stage: .post + variables: + STATUS_MESSAGE: "Failed to pass all tests on NERSC system!" extends: - .report-status rules: - when: on_failure - script: - - echo "STATUS_MESSAGE='Failed to pass all tests on NERSC system!'" > .env - artifacts: - reports: - dotenv: .env perlmutter-no-cache-build: stage: build From 4ab6aad8fbf8cc3e5385d1433507acb5d5f7b4fe Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Fri, 10 Jan 2025 15:11:53 -0800 Subject: [PATCH 4/8] improve message --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6bec65f..0bd1a60d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ stages: pending: stage: .pre variables: - STATUS_MESSAGE: "Waiting for manual approval to run on NERSC system..." + STATUS_MESSAGE: "Waiting for manual approval..." extends: - .report-status @@ -62,6 +62,7 @@ perlmutter-no-cache-build: SCHEDULER_PARAMETERS: "-A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64 -N 1 -t 00:30:00" SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" + STATUS_MESSAGE: "" script: - module load libfabric - module list @@ -70,6 +71,8 @@ perlmutter-no-cache-build: - cmake ../../.. -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=OFF -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=cc -DMPI_RUN_CMD="srun -A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64" -DCMAKE_INSTALL_PREFIX=${PDC_INSTALL_PATH}/perlmutter/no-cache - make -j - make install + extends: + - .report-status artifacts: paths: - ${PDC_BUILD_PATH}/perlmutter/no-cache @@ -90,6 +93,7 @@ perlmutter-cache-build: SCHEDULER_PARAMETERS: "-A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64 -N 1 -t 00:30:00" SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" + STATUS_MESSAGE: "" script: - module load libfabric - module list @@ -98,6 +102,8 @@ perlmutter-cache-build: - cmake ../../.. -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=cc -DMPI_RUN_CMD="srun -A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64" -DCMAKE_INSTALL_PREFIX=${PDC_INSTALL_PATH}/perlmutter/cache - make -j - make install + extends: + - .report-status artifacts: paths: - ${PDC_BUILD_PATH}/perlmutter/cache From 534eee73ff0a2349f419e8c5653bbf38090fe756 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 13 Jan 2025 08:20:29 -0800 Subject: [PATCH 5/8] improve message --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bd1a60d..0a53c92c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,8 @@ perlmutter-no-cache-build: SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" STATUS_MESSAGE: "" + extends: + - .report-status script: - module load libfabric - module list @@ -71,8 +73,6 @@ perlmutter-no-cache-build: - cmake ../../.. -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=OFF -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=cc -DMPI_RUN_CMD="srun -A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64" -DCMAKE_INSTALL_PREFIX=${PDC_INSTALL_PATH}/perlmutter/no-cache - make -j - make install - extends: - - .report-status artifacts: paths: - ${PDC_BUILD_PATH}/perlmutter/no-cache @@ -94,6 +94,8 @@ perlmutter-cache-build: SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" STATUS_MESSAGE: "" + extends: + - .report-status script: - module load libfabric - module list @@ -102,8 +104,6 @@ perlmutter-cache-build: - cmake ../../.. -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=cc -DMPI_RUN_CMD="srun -A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64" -DCMAKE_INSTALL_PREFIX=${PDC_INSTALL_PATH}/perlmutter/cache - make -j - make install - extends: - - .report-status artifacts: paths: - ${PDC_BUILD_PATH}/perlmutter/cache From a55dac4e8e0e67199622fa4bf52b7d36c5fd69a9 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 13 Jan 2025 10:04:44 -0800 Subject: [PATCH 6/8] improve message --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a53c92c..da7c075d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,6 @@ variables: + STATUS_PROJECT: "hpc-io/pdc" + STATUS_NAME: "NERSC / Perlmutter" PDC_BUILD_PATH: "${CI_PROJECT_DIR}/build" PDC_INSTALL_PATH: "${CI_PROJECT_DIR}/install" GIT_CLONE_PATH: "${CI_BUILDS_DIR}/${CI_PROJECT_NAME}/${CI_JOB_ID}" @@ -9,9 +11,6 @@ stages: - metrics .report-status: - variables: - STATUS_PROJECT: "hpc-io/pdc" - STATUS_NAME: "NERSC / Perlmutter" script: # For complete details on the GitHub API please see: # https://developer.github.com/v3/repos/statuses @@ -62,7 +61,7 @@ perlmutter-no-cache-build: SCHEDULER_PARAMETERS: "-A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64 -N 1 -t 00:30:00" SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" - STATUS_MESSAGE: "" + STATUS_MESSAGE: " " extends: - .report-status script: From daac74eb8b3fada04409ca3165f7a49c3b5329ed Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 13 Jan 2025 10:17:55 -0800 Subject: [PATCH 7/8] improve message --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da7c075d..62e2600f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ stages: - metrics .report-status: - script: + before_script: # For complete details on the GitHub API please see: # https://developer.github.com/v3/repos/statuses - | @@ -62,8 +62,6 @@ perlmutter-no-cache-build: SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" STATUS_MESSAGE: " " - extends: - - .report-status script: - module load libfabric - module list From 42323792c3f85dabbc1f84a9546a54b3dc191415 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 13 Jan 2025 10:47:37 -0800 Subject: [PATCH 8/8] improve message --- .gitlab-ci.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62e2600f..d21ab1fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,13 @@ variables: GIT_CLONE_PATH: "${CI_BUILDS_DIR}/${CI_PROJECT_NAME}/${CI_JOB_ID}" stages: + - authorize - build - test - metrics .report-status: - before_script: + script: # For complete details on the GitHub API please see: # https://developer.github.com/v3/repos/statuses - | @@ -46,11 +47,25 @@ failure: rules: - when: on_failure -perlmutter-no-cache-build: - stage: build +perlmutter-authorize: + stage: authorize rules: - if: '$METRICS == null' when: manual + script: + - | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${GITHUB_TOKEN}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \ + -d "{\"state\":\"pending\",\"description\":\"Running...\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" + +perlmutter-no-cache-build: + stage: build + needs: + - perlmutter-authorize id_tokens: SITE_ID_TOKEN: aud: https://gitlab.com @@ -61,7 +76,6 @@ perlmutter-no-cache-build: SCHEDULER_PARAMETERS: "-A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64 -N 1 -t 00:30:00" SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" - STATUS_MESSAGE: " " script: - module load libfabric - module list @@ -77,9 +91,8 @@ perlmutter-no-cache-build: perlmutter-cache-build: stage: build - rules: - - if: '$METRICS == null' - when: manual + needs: + - perlmutter-authorize id_tokens: SITE_ID_TOKEN: aud: https://gitlab.com/ @@ -90,9 +103,6 @@ perlmutter-cache-build: SCHEDULER_PARAMETERS: "-A ${PDC_PROJECT} --qos=debug --constraint=cpu --tasks-per-node=64 -N 1 -t 00:30:00" SUPERCOMPUTER: "perlmutter" MERCURY_DIR: "/global/cfs/cdirs/${PDC_PROJECT}/pdc-perlmutter/mercury/install" - STATUS_MESSAGE: "" - extends: - - .report-status script: - module load libfabric - module list