-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
92 lines (84 loc) · 4.38 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
image: $CI_REGISTRY_IMAGE/taste-buster:latest
stages:
- build-test
- build-test-bundle
variables:
PROJECT_DIR: $CI_PROJECT_DIR
ENV_QT_VERSION: 6.6.0
ENV_QTC_VERSION: 12.0.1
ENV_DIR: /opt/spacecreator6
APP_DIR: $ENV_DIR/spacecreator.AppDir
ENV_QT_BASE_DIR: $ENV_DIR/Qt/$ENV_QT_VERSION/gcc_64
BUILD_DIR: $CI_PROJECT_DIR/spacecreator_build_qt6
DOWNLOAD_DIR: $CI_PROJECT_DIR/downloads12
default:
before_script:
- source $CI_PROJECT_DIR/scripts/timestamp.sh
# dependencies
- apt install -y build-essential git g++ cmake cmake-data ninja-build make gcovr lcov ccache cccc doxygen graphviz zip p7zip curl wget default-jre uuid-dev pkg-config fuse python3-pip clang-format spin python3-pygraphviz python3-singledispatch python3-stringtemplate3 python3-pexpect ansible
# Install dependencies for ansible script
- pip3 install aqtinstall py7zr==0.20.2 GitPython
# install modified xmldiff
- pip3 install git+https://github.com/Shoobx/[email protected]
# install OpenGEODE dependencies
# *Python (both for OpenGEODE and sdl2promela)
- pip3 install black==21.10b0 multipledispatch pyside6 pytest
# install newest OpenGEODE (must be installed in the same directory, removal is more robust than git clean/checkout/force)
- pushd $HOME/tool-src; rm -r opengeode ; git clone https://gitrepos.estec.esa.int/taste/opengeode.git ; cd opengeode ; make install; popd
# install newest version of Spin model checker
- pushd $HOME/tool-src; rm -rf Spin ; git clone https://github.com/n7space/Spin.git ; cd Spin ; make; popd ; mv $HOME/tool-src/Spin/Src/spin $HOME/.local/bin/n7s-spin
# install sdl2promela
- git clone https://github.com/n7space/sdl2promela.git
- pushd sdl2promela ; make install ; popd
# setup PATH for taste tools
- export PATH=$PATH:$ENV_DIR/asn1scc:/root/.local/bin
# CCache Config
- mkdir -p ccache
- export CCACHE_BASEDIR=$CI_PROJECT_DIR
- export CCACHE_DIR=$CI_PROJECT_DIR/ccache
- ccache -s ; df -h # show statistics before build
spacecreator-master:
stage: build-test-bundle
script:
- ansible-playbook $CI_PROJECT_DIR/scripts/Ansible_Scripts/build.yml -e env_dir=$ENV_DIR -e env_qt_version=$ENV_QT_VERSION -e qtc_version=$ENV_QTC_VERSION -e project_dir=$CI_PROJECT_DIR -e patch_version=$CI_JOB_ID -e download_dir=$DOWNLOAD_DIR
- python3 $CI_PROJECT_DIR/scripts/postbuild.py --project_dir $PROJECT_DIR --app_dir $APP_DIR --build_dir $BUILD_DIR # Copy the SpaceCreator-plugin to the plugin-directory of the QtCreator that is to load it.
- ./scripts/run_tests.sh $BUILD_DIR
- source ./VERSION # set $SC_VERSION. The version of the project is stored the shell script VERSION
- python3 $CI_PROJECT_DIR/scripts/create_appimage.py --output_dir $BUILD_DIR --project_dir $PROJECT_DIR --app_dir $APP_DIR --env_dir $ENV_DIR --project_version $SC_VERSION
- ccache -s ; df -h # show statistics after build
cache:
key: spacecreator_cache
paths:
- $BUILD_DIR/asn1scc_bin
- $DOWNLOAD_DIR
- ccache
artifacts:
reports:
junit: $BUILD_DIR/tst_*-result.xml
paths:
- "$BUILD_DIR/spacecreator*.AppImage"
expire_in: 3 days
rules:
- if: "$CI_COMMIT_BRANCH == 'master'"
spacecreator-feature:
stage: build-test
script:
- ansible-playbook $CI_PROJECT_DIR/scripts/Ansible_Scripts/build.yml -e env_dir=$ENV_DIR -e env_qt_version=$ENV_QT_VERSION -e qtc_version=$ENV_QTC_VERSION -e project_dir=$CI_PROJECT_DIR -e patch_version=$CI_JOB_ID -e download_dir=$DOWNLOAD_DIR
- python3 $CI_PROJECT_DIR/scripts/postbuild.py --project_dir $PROJECT_DIR --app_dir $APP_DIR --build_dir $BUILD_DIR # Copy the SpaceCreator-plugin to the plugin-directory of the QtCreator that is to load it.
- ./scripts/run_tests.sh $BUILD_DIR
#- source ./VERSION # set $SC_VERSION. The version of the project is stored the shell script VERSION
#- python3 $CI_PROJECT_DIR/scripts/create_appimage.py --output_dir $BUILD_DIR --project_dir $PROJECT_DIR --app_dir $APP_DIR --env_dir $ENV_DIR --project_version $SC_VERSION
- ccache -s ; df -h # show statistics after build
cache:
key: spacecreator_cache
paths:
- $BUILD_DIR/asn1scc_bin
- $DOWNLOAD_DIR
- ccache
artifacts:
reports:
junit: $BUILD_DIR/tst_*-result.xml
expire_in: 2 days
rules:
# For pipelines created when a merge request is created or updated
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"