variables: RSYNC_OPTS: --recursive --ignore-missing-args --chown ${DEPLOY_USER}:${DEPLOY_USER} DOCKER_TAG: ${CI_COMMIT_REF_NAME} DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME} DOCKER_IMAGE: rwthacs/dpsim DOCKER_IMAGE_DEV: rwthacs/dpsim-dev before_script: - git config --local core.longpaths true - git submodule sync --recursive - git submodule update --init --recursive stages: - prepare - build - test - generate - deploy #- post-all - trigger docker: stage: prepare script: - docker build --file Packaging/Docker/Dockerfile.dev --tag ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} --tag ${DOCKER_IMAGE_DEV}:latest . tags: - shell build:linux: stage: build script: - mkdir -p build - cd build - cmake .. - make -j 32 image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} cache: paths: - build key: build-linux artifacts: paths: - build tags: - docker test:pytest: stage: test variables: PYTHONPATH: "build/Source/Python:Source/Python" script: - pytest -v image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} dependencies: - build:linux tags: - docker generate:docs: stage: generate script: - make -C build docs - make -C build docs_cxx image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} dependencies: - build:linux artifacts: paths: - build/Documentation/html - build/Documentation/Cxx/html tags: - docker generate:packages: stage: generate script: - make -C build package only: - tags tags: - docker image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} dependencies: - build:linux artifacts: paths: - build/*.rpm - build/*.tar.gz build:docker: stage: build script: - docker build --file Packaging/Docker/Dockerfile --build-arg DOCKER_TAG=${DOCKER_TAG} --build-arg CI=1 --build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --build-arg CI_COMMIT_TAG=${CI_COMMIT_TAG} --tag ${DOCKER_IMAGE}:${DOCKER_TAG} --tag ${DOCKER_IMAGE}:latest . tags: - shell only: - tags test:jupyter: stage: test script: - cd build - cmake .. - make -j32 notebooks image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} dependencies: - build:linux artifacts: paths: - build/Examples/Notebooks/ tags: - docker deploy:docker: stage: deploy script: - docker push ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} - docker push ${DOCKER_IMAGE_DEV}:latest - docker push ${DOCKER_IMAGE}:${DOCKER_TAG} - docker push ${DOCKER_IMAGE}:latest dependencies: - build:docker tags: - shell only: - tags deploy:docs: stage: deploy script: - ssh ${DEPLOY_USER}@${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}/doc/${CI_BUILD_REF_NAME}/{sphinx,doxygen} - rsync ${RSYNC_OPTS} --delete build/Documentation/html/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/doc/${CI_BUILD_REF_NAME}/sphinx - rsync ${RSYNC_OPTS} --delete build/Documentation/Cxx/html/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/doc/${CI_BUILD_REF_NAME}/doxygen dependencies: - generate:docs only: - tags - master - development tags: - fein-deploy tags: - shell deploy:packages: stage: deploy script: - rsync ${RSYNC_OPTS} build/*.rpm ${DEPLOY_USER}@${DEPLOY_HOST}:/var/www/packages/redhat/x86_64 - rsync ${RSYNC_OPTS} build/*.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:/var/www/dpsim/src - ssh ${DEPLOY_USER}@${DEPLOY_HOST} createrepo /var/www/packages/redhat dependencies: - generate:packages only: - tags tags: - fein-deploy tags: - shell # We run the windows build at last as it takes ages to finish #build:windows: # stage: post-all # script: # - rmdir build /s # - mkdir build # - cd build # - cmake -G "Visual Studio 15 2017 Win64" .. # - cmake --build . # tags: # - windows trigger:jupyter: stage: trigger only: - tags script: - curl -X POST -F token=e9751bbb33e68c8206046d0062b5ff -F ref=kubernetes https://git.rwth-aachen.de/api/v4/projects/13613/trigger/pipeline