diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb4fd2554..0f2475523 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,119 @@ -dummy: +include: + - project: hpc/gitlab-pipelines + file: + - spack-build-components.gitlab-ci.yml + - github-project-pipelines.gitlab-ci.yml + - project: hpc/gitlab-upload-logs + file: enable-upload.yml + +variables: + CVF_BRANCH: + description: Branch of the channel validation framework (CVF) to trigger the CI of + value: main + SPACK_BRANCH: + description: Branch of BlueBrain Spack to use for the CI pipeline + value: develop + BLUECONFIGS_BRANCH: + description: Branch of blueconfigs to trigger the simulation stack pipeline from + value: main + NEURON_BRANCH: + description: Branch of neuron to build BlueBrain models against in the simulation stack pipeline (NEURON_COMMIT and NEURON_TAG also possible) + value: master + LIBSONATA_REPORT_BRANCH: + description: Branch of libsonata-report to build BlueBrain models against in the simulation stack pipeline (LIBSONATA_REPORT_COMMIT and LIBSONATA_REPORT_TAG also possible) + value: master + SPACK_DEPLOYMENT_SUFFIX: + description: Extra path component used when finding deployed software. Set to something like `pulls/1497` use software built for https://github.com/BlueBrain/spack/pull/1497. You probably want to set SPACK_BRANCH to the branch used in the relevant PR if you set this. + value: '' + +trigger cvf: + # Stop the globally-defined CVF_BRANCH above from being set in the child pipeline + inherit: + variables: false + needs: [spack_setup] # for SPACK_SETUP_COMMIT_MAPPING_URL + stage: .pre + rules: + # Don't run on PRs targeting the LLVM development branch + - if: '$CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME == "llvm"' + when: never + # Otherwise always run this + - when: always + trigger: + branch: ${CVF_BRANCH} + project: hpc/cvf + # Make the NMODL CI status depend on the CVF CI status + strategy: depend + variables: + # Tell CVF to use the same commits/branches as NMODL. + SPACK_ENV_FILE_URL: $SPACK_SETUP_COMMIT_MAPPING_URL + +simulation_stack: + stage: .pre + # Take advantage of GitHub PR description parsing in the spack_setup job. + needs: [spack_setup] + trigger: + branch: ${BLUECONFIGS_BRANCH} + project: hpc/sim/blueconfigs + # NMODL CI status depends on the BlueConfigs CI status. + strategy: depend + variables: + SPACK_ENV_FILE_URL: $SPACK_SETUP_COMMIT_MAPPING_URL + NMODL_RUN: "true" + # SPACK_SETUP_IGNORE_PACKAGE_VARIABLES needs to be set for + # the blueconfigs CI as well to let it know about both CVF + # and BLUECONFIGS + SPACK_SETUP_IGNORE_PACKAGE_VARIABLES: "CVF BLUECONFIGS" + +.spack_nmodl: + variables: + SPACK_PACKAGE: nmodl + SPACK_PACKAGE_SPEC: +python+tests + +spack_setup: + extends: .spack_setup_ccache script: - - echo "Temporarily disabled." + - !reference [.spack_setup_ccache, script] + # Setting {CVF, BLUECONFIGS}_BRANCH in the PR description will cause them to + # be set in the environment of this job, but because we put CVF and BLUECONFIGS + # in SPACK_SETUP_IGNORE_PACKAGE_VARIABLES then nothing will be done with it. + - echo "CVF_BRANCH=${CVF_BRANCH}" >> spack_clone_variables.env + - echo "BLUECONFIGS_BRANCH=${BLUECONFIGS_BRANCH}" >> spack_clone_variables.env + variables: + NMODL_COMMIT: ${CI_COMMIT_SHA} + # Enable fetching GitHub PR descriptions and parsing them to find out what + # branches to build of other projects. + PARSE_GITHUB_PR_DESCRIPTIONS: "true" + # Ignore CVF ang BLUECONFIGS branches since those don't have a spack package + SPACK_SETUP_IGNORE_PACKAGE_VARIABLES: "CVF BLUECONFIGS" + +build:intel: + extends: + - .spack_build + - .spack_nmodl + variables: + SPACK_PACKAGE_COMPILER: oneapi + +build:nvhpc: + extends: + - .spack_build + - .spack_nmodl + variables: + SPACK_PACKAGE_COMPILER: nvhpc + SPACK_PACKAGE_DEPENDENCIES: ^bison%gcc^flex%gcc^py-jinja2%gcc^py-sympy%gcc^py-pyyaml%gcc + +.nmodl_tests: + variables: + # https://github.com/BlueBrain/nmodl/issues/737 + bb5_ntasks: 1 + +test:intel: + extends: + - .ctest + - .nmodl_tests + needs: ["build:intel"] + +test:nvhpc: + extends: + - .ctest + - .nmodl_tests + needs: ["build:nvhpc"]