|
| 1 | +stages: |
| 2 | + - build |
| 3 | + - test-unit |
| 4 | + - test-integ |
| 5 | + |
| 6 | +cache: |
| 7 | + paths: |
| 8 | + - spack_ci/ |
| 9 | + |
| 10 | +##### Templates ##### |
| 11 | + |
| 12 | +.quartz-template: &quartz_template |
| 13 | + tags: |
| 14 | + - quartz |
| 15 | + - shell |
| 16 | + variables: |
| 17 | + LLNL_SERVICE_USER: "unifysrv" |
| 18 | + retry: |
| 19 | + max: 1 |
| 20 | + when: |
| 21 | + - unknown_failure |
| 22 | + - stuck_or_timeout_failure |
| 23 | + |
| 24 | +.butte-template: &butte_template |
| 25 | + tags: |
| 26 | + - butte |
| 27 | + - shell |
| 28 | + variables: |
| 29 | + LLNL_SERVICE_USER: "unifysrv" |
| 30 | + retry: |
| 31 | + max: 1 |
| 32 | + when: |
| 33 | + - unknown_failure |
| 34 | + - stuck_or_timeout_failure |
| 35 | + |
| 36 | +.build-template: &build_template |
| 37 | + stage: build |
| 38 | + script: |
| 39 | + - ./autogen.sh |
| 40 | + - mkdir -p unifyfs-build unifyfs-install && cd unifyfs-build |
| 41 | + - ../configure --prefix=$CI_PROJECT_DIR/unifyfs-install --enable-fortran --disable-silent-rules |
| 42 | + - make V=1 |
| 43 | + - make V=1 install |
| 44 | + artifacts: |
| 45 | + name: "${CI_JOB_NAME}-${CI_PIPELINE_ID}" |
| 46 | + untracked: true |
| 47 | + expire_in: 1 hour |
| 48 | + paths: |
| 49 | + - unifyfs-build/ |
| 50 | + - unifyfs-install/ |
| 51 | + |
| 52 | +.unit-test-template: &unit_test_template |
| 53 | + stage: test-unit |
| 54 | + script: |
| 55 | + - cd unifyfs-build/t && make check |
| 56 | + after_script: |
| 57 | + - rm -rf /tmp/unify* /tmp/tmp.* /tmp/mdhim* /tmp/na_sm |
| 58 | + |
| 59 | +.quartz-batch-variables: |
| 60 | + variables: &quartz_batch_variables |
| 61 | + LLNL_SLURM_SCHEDULER_PARAMETERS: "-N $NNODES -p pbatch -t $WALL_TIME" |
| 62 | + LLNL_SERVICE_USER: "unifysrv" |
| 63 | + CI_PROJDIR: "$CI_PROJECT_DIR" |
| 64 | + UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install" |
| 65 | + CI_NPROCS: "$NPROCS" |
| 66 | + |
| 67 | +.butte-batch-variables: |
| 68 | + variables: &butte_batch_variables |
| 69 | + LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes $NNODES -q pbatch -W $WALL_TIME" |
| 70 | + LLNL_SERVICE_USER: "unifysrv" |
| 71 | + CI_PROJDIR: "$CI_PROJECT_DIR" |
| 72 | + UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install" |
| 73 | + CI_NPROCS: "$NPROCS" |
| 74 | + |
| 75 | +##### Jobs ##### |
| 76 | + |
| 77 | +before_script: |
| 78 | + # HERE BE DRAGONS!: Since on HPC and running as user, Spack might already |
| 79 | + # exist and can get complicated if we install it again. |
| 80 | + # |
| 81 | + # check for sourced spack || check for unsourced spack in $HOME/spack and |
| 82 | + # source it || check for cached spack, clone if none, and source it |
| 83 | + - which spack || ((cd $HOME/spack && git describe) && . $HOME/spack/share/spack/setup-env.sh) || (((cd spack_ci && git describe) || git clone https://github.com/CamStan/spack spack_ci) && . spack_ci/share/spack/setup-env.sh) |
| 84 | + - SPACK_ARCH=$(spack arch) |
| 85 | + - spack install leveldb && spack load leveldb arch=$SPACK_ARCH |
| 86 | + - spack install [email protected] && spack load [email protected] arch=$SPACK_ARCH |
| 87 | + - spack install flatcc && spack load flatcc arch=$SPACK_ARCH |
| 88 | + - spack install margo^mercury+bmi~boostsys && spack load argobots arch=$SPACK_ARCH && spack load mercury arch=$SPACK_ARCH && spack load margo arch=$SPACK_ARCH |
| 89 | + |
| 90 | +build-quartz: |
| 91 | + <<: *quartz_template |
| 92 | + <<: *build_template |
| 93 | + |
| 94 | +build-butte: |
| 95 | + <<: *butte_template |
| 96 | + <<: *build_template |
| 97 | + |
| 98 | +unit-test-quartz: |
| 99 | + <<: *quartz_template |
| 100 | + <<: *unit_test_template |
| 101 | + dependencies: |
| 102 | + - build-quartz |
| 103 | + |
| 104 | +unit-test-butte: |
| 105 | + <<: *butte_template |
| 106 | + <<: *unit_test_template |
| 107 | + dependencies: |
| 108 | + - build-butte |
| 109 | + |
| 110 | +#integ-test-quartz: |
| 111 | +# <<: *quartz_template |
| 112 | +# stage: test-integ |
| 113 | +# tags: |
| 114 | +# - quartz |
| 115 | +# - batch |
| 116 | +# variables: *quartz_batch_variables |
| 117 | +# script: |
| 118 | +# - cd t/ci && prove -v RUN_CI_TESTS.sh |
| 119 | +# dependencies: |
| 120 | +# - build-quartz |
| 121 | + |
| 122 | +integ-test-butte: |
| 123 | + <<: *butte_template |
| 124 | + stage: test-integ |
| 125 | + tags: |
| 126 | + - butte |
| 127 | + - batch |
| 128 | + variables: *butte_batch_variables |
| 129 | + script: |
| 130 | + - cd t/ci && prove -v RUN_CI_TESTS.sh |
| 131 | + dependencies: |
| 132 | + - build-butte |
0 commit comments