Skip to content
Snippets Groups Projects
Unverified Commit b34b65a1 authored by Harmen Stoppels's avatar Harmen Stoppels Committed by GitHub
Browse files

Move .gitlab-ci.yml inside the repo (#1029)

* Move .gitlab-ci.yml inside the repo
* Remove submodule with gitlab pipeline
parent 96aae9e1
No related branches found
No related tags found
No related merge requests found
stages:
- build
- test
.kubernetes:
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ""
DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
image: docker:stable
only:
- master
- staging
- trying
tags:
- kubernetes
services:
- docker:19.03.1-dind # Important to keep the patch version here!
# Builds a docker image on kubernetes
build:
extends: .kubernetes
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -f docker/build-env/Dockerfile --network=host --cache-from $CI_REGISTRY_IMAGE/build-env:latest --build-arg BUILDKIT_INLINE_CACHE=1 -t $CI_REGISTRY_IMAGE/build-env:latest .
- docker push $CI_REGISTRY_IMAGE/build-env:latest
- docker build -f docker/deploy/Dockerfile --network=host --build-arg BUILD_ENV=$CI_REGISTRY_IMAGE/build-env:latest -t $CI_REGISTRY_IMAGE/deploy:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE/deploy:$CI_COMMIT_SHA
# Executes the docker image on Daint via Sarus
.daint-common:
variables:
CRAY_CUDA_MPS: 1
only:
- master
- staging
- trying
tags:
- daint
test:
stage: test
extends: .daint-common
before_script:
- export IMAGE=$CI_REGISTRY_IMAGE/deploy:$CI_COMMIT_SHA
- module load sarus daint-gpu
- sarus pull $IMAGE
- salloc --no-shell --job-name=arbor-ci-$CI_JOB_ID -N 2 -n 2 -C gpu -p normal
- export JOBID=$(squeue -h --name=arbor-ci-$CI_JOB_ID --format=%A)
script:
- srun --jobid=$JOBID -N 1 -n 1 -J arbor-ci-$CI_JOB_ID-unit sarus run --mpi --mount=type=bind,source=$PWD,destination=/arbor $IMAGE unit
- srun --jobid=$JOBID -N 2 -n 2 -J arbor-ci-$CI_JOB_ID-unit-mpi sarus run --mpi --mount=type=bind,source=$PWD,destination=/arbor $IMAGE unit-mpi
- srun --jobid=$JOBID -N 1 -n 1 -J arbor-ci-$CI_JOB_ID-unit-local sarus run --mpi --mount=type=bind,source=$PWD,destination=/arbor $IMAGE unit-local
- srun --jobid=$JOBID -N 1 -n 1 -J arbor-ci-$CI_JOB_ID-unit-modcc sarus run --mpi --mount=type=bind,source=$PWD,destination=/arbor $IMAGE unit-modcc
after_script:
- export IMAGE=$CI_REGISTRY_IMAGE/deploy:$CI_COMMIT_SHA
- export JOBID=$(squeue -h --name=arbor-ci-$CI_JOB_ID --format=%A)
- scancel $JOBID
- module load sarus
- sarus rmi $IMAGE
...@@ -7,6 +7,3 @@ ...@@ -7,6 +7,3 @@
[submodule "python/pybind11"] [submodule "python/pybind11"]
path = python/pybind11 path = python/pybind11
url = https://github.com/pybind/pybind11.git url = https://github.com/pybind/pybind11.git
[submodule "ci"]
path = ext/ci
url = https://gitlab.com/cscs-ci/arbor-sim/arbor-ci.git
ci @ 042c9ed9
Subproject commit 042c9ed94a681cbaf2b2d1fcae4b9942cdb2f720
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment