-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4435 from ornladios/backport-spack-ci
Backport spack ci
- Loading branch information
Showing
27 changed files
with
637 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,16 @@ | ||
defaults: &defaults | ||
steps: | ||
- checkout: | ||
path: source | ||
- run: | ||
# https://discuss.circleci.com/t/circle-working-directory-doesnt-expand/17007 | ||
name: "Fix CIRCLE_WORKING_DIRECTORY" | ||
command: echo 'CIRCLE_WORKING_DIRECTORY="${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}"' >> $BASH_ENV | ||
- run: | ||
name: CDash | ||
command: bash source/scripts/ci/circle/postCDashStatus.sh | ||
- run: | ||
name: Update | ||
command: bash source/scripts/ci/circle/run.sh update | ||
- run: | ||
name: Configure | ||
command: bash source/scripts/ci/circle/run.sh configure | ||
- run: | ||
name: Build | ||
command: bash source/scripts/ci/circle/run.sh build | ||
- run: | ||
name: Sanitize | ||
command: bash source/scripts/ci/circle/run.sh memcheck | ||
|
||
version: 2 | ||
|
||
jobs: | ||
"fedora-ubsan": | ||
<<: *defaults | ||
docker: | ||
- image: ornladios/adios2:ci-fedora-ubsan | ||
"fedora-asan": | ||
<<: *defaults | ||
docker: | ||
- image: ornladios/adios2:ci-fedora-asan | ||
"fedora-msan": | ||
<<: *defaults | ||
docker: | ||
- image: ornladios/adios2:ci-fedora-msan | ||
"fedora-tsan": | ||
<<: *defaults | ||
"post-cdash-status": | ||
docker: | ||
- image: ornladios/adios2:ci-fedora-tsan | ||
- image: cimg/base:2024.12 | ||
steps: | ||
- checkout | ||
- run: | ||
name: CDash | ||
command: ./scripts/ci/circle/post-cdash-status | ||
|
||
workflows: | ||
version: 2 | ||
sanitizers: | ||
utils: | ||
jobs: | ||
- "fedora-ubsan" | ||
- "fedora-asan" | ||
- "fedora-msan" | ||
- "fedora-tsan" | ||
- "post-cdash-status" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# This file is used to define the GitLab CI/CD pipeline for the ADIOS2 project. | ||
default: | ||
interruptible: true | ||
tags: | ||
- medium | ||
- uo | ||
- public | ||
- x86_64 | ||
|
||
# This file is used to define the GitLab CI/CD pipeline for the ADIOS2 project. | ||
.common-sanitizer: | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE != "schedule"' | ||
when: on_success | ||
- when: never | ||
variables: | ||
GITLAB_SITE: "UO CI (gitlab.spack.io)" | ||
CI_BIN_DIR: "$CI_PROJECT_DIR/build" | ||
|
||
.common-build: | ||
extends: | ||
- .common-sanitizer | ||
stage: build | ||
script: | ||
- bash scripts/ci/gitlab-ci/run.sh update | ||
- bash scripts/ci/gitlab-ci/run.sh configure | ||
- bash scripts/ci/gitlab-ci/run.sh build | ||
artifacts: | ||
expire_in: 1 hours | ||
when: always | ||
paths: | ||
- $CI_BIN_DIR/bin/ | ||
- $CI_BIN_DIR/lib/ | ||
- $CI_BIN_DIR/lib64/ | ||
- $CI_BIN_DIR/thirdparty/**/lib64/ | ||
- $CI_BIN_DIR/testing/ | ||
- $CI_BIN_DIR/source/**/*.h | ||
- $CI_BIN_DIR/source/**/*.in | ||
- $CI_BIN_DIR/adios2_reorganize_wrapper | ||
|
||
# CTest and CMake install files. | ||
- $CI_BIN_DIR/CMakeCache.txt | ||
- $CI_BIN_DIR/**/*.cmake | ||
- $CI_BIN_DIR/Testing/ | ||
|
||
# CDash files. | ||
- $CI_BIN_DIR/DartConfiguration.tcl | ||
|
||
.common-test: | ||
extends: | ||
- .common-sanitizer | ||
stage: test | ||
script: | ||
- bash scripts/ci/gitlab-ci/run.sh memcheck | ||
|
||
#=============================================================================== | ||
|
||
build:uo-sanitizer-asan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-asan-20241205 | ||
extends: [.common-build] | ||
|
||
build:uo-sanitizer-msan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-msan-20241205 | ||
extends: [.common-build] | ||
|
||
build:uo-sanitizer-tsan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-tsan-20241205 | ||
extends: [.common-build] | ||
|
||
build:uo-sanitizer-ubsan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-ubsan-20241205 | ||
extends: [.common-build] | ||
|
||
test:uo-sanitizer-asan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-asan-20241205 | ||
extends: [.common-test] | ||
needs: [build:uo-sanitizer-asan] | ||
|
||
test:uo-sanitizer-msan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-msan-20241205 | ||
extends: [.common-test] | ||
needs: [build:uo-sanitizer-msan] | ||
|
||
test:uo-sanitizer-tsan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-tsan-20241205 | ||
extends: [.common-test] | ||
needs: [build:uo-sanitizer-tsan] | ||
|
||
test:uo-sanitizer-ubsan: | ||
image: ghcr.io/ornladios/adios2:ci-opensuse-tw-ubsan-20241205 | ||
extends: [.common-test] | ||
needs: [build:uo-sanitizer-ubsan] | ||
|
||
deploy:sync-ornl: | ||
environment: ornl | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
when: on_success | ||
- when: never | ||
image: ornladios/adios2:sync-20241206-b | ||
script: > | ||
.gitlab/config/SpackCIBridge.py | ||
ornladios/ADIOS2 | ||
git@code.ornl.gov:ecpcitest/adios2.git | ||
https://code.ornl.gov/ | ||
ecpcitest/adios2 | ||
--prereq-check=format | ||
--prereq-check=git_checks | ||
--disable-status-post | ||
dependencies: [] | ||
needs: [] | ||
|
||
deploy:sync-spack: | ||
environment: spackio | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
when: on_success | ||
- when: never | ||
image: ornladios/adios2:sync-20241206-b | ||
script: > | ||
.gitlab/config/SpackCIBridge.py | ||
ornladios/ADIOS2 | ||
git@ssh.gitlab.spack.io:adios2/adios2.git | ||
https://gitlab.spack.io/ | ||
adios2/ADIOS2 | ||
--prereq-check=format | ||
--prereq-check=git_checks | ||
--status-context="Frank CI (sanitizers)" | ||
dependencies: [] | ||
needs: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
readonly API_BASE="https://api.github.com/repos/ornladios/adios2" | ||
readonly USER=${STATUS_ROBOT_NAME} | ||
readonly TOKEN=${STATUS_ROBOT_KEY} | ||
readonly COMMIT=${CIRCLE_SHA1} | ||
readonly CDASH_STATUS_CONTEXT="cdash" | ||
|
||
#============================================================================== | ||
|
||
function build_status_body() { | ||
cat <<EOF | ||
{ | ||
"state": "success", | ||
"target_url": "https://open.cdash.org/index.php?compare1=61&filtercount=1&field1=revision&project=ADIOS&showfilters=0&limit=100&value1=${COMMIT}&showfeed=0", | ||
"description": "Build and test results available on CDash", | ||
"context": "${CDASH_STATUS_CONTEXT}" | ||
} | ||
EOF | ||
} | ||
|
||
#============================================================================== | ||
|
||
statuses=$(curl -q -s \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"${API_BASE}/commits/${COMMIT}/statuses" |\ | ||
jq -r '[.[].context] | @json') | ||
|
||
if jq -re 'all(. != "dash")' <<<"${statuses}"; then | ||
echo "Need to post a status for context ${CDASH_STATUS_CONTEXT}" | ||
|
||
postBody="$(build_status_body)" | ||
postUrl="${API_BASE}/statuses/${COMMIT}" | ||
|
||
curl -X POST -q -s \ | ||
-H "Authorization: Bearer ${TOKEN}" \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-d "${postBody}" "${postUrl}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.