-
Notifications
You must be signed in to change notification settings - Fork 23
/
.gitlab-ci.yml
99 lines (95 loc) · 2.89 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
93
94
95
96
97
98
99
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
default:
tags:
- docker
- linux
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore"
stages:
- test
- build
- sync
do-test:
stage: test
image: rigby132/ug4-test:latest
timeout: 4 hours
variables:
CMAKE_C_COMPILER: gcc
CMAKE_CXX_COMPILER: g++
script:
- cd ..
- cp --update=none -R /opt/ug4/. .
- mkdir -p build
- cd build
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja
- ninja -j8
- cd ..
- cd apps/unit_tests/
- mkdir -p build
- cd build
- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja
- ninja -j8
- cd ../../..
- pwd
- ls -a
- source ugcore/scripts/shell/ugbash
- echo $UG4_ROOT
- "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml -- --name report"
- cat ug_test_numprocs_1.log
- mv ug_test_numprocs_1.log ugcore/test.log
- cat report.xml
- mv report.xml ugcore/report.xml
artifacts:
when: always
expire_in: 1 week
paths:
- report.xml
- test.log
reports:
junit: report.xml
build-clang:
stage: build
image: rigby132/ug4-minimal:latest
timeout: 4 hours
variables:
CMAKE_C_COMPILER: gcc
CMAKE_CXX_COMPILER: g++
CXX_FLAGS: "-O3 -fPIC"
before_script:
- docker info
- echo "$CI_REGISTRY"
- echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- cd ..
- cp --update=none -R /opt/ug4/. .
- mkdir -p build
- cd build
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja
- ninja -j8
- cd ..
- cd ..
- echo -e 'FROM ubuntu:latest\nENV DEBIAN_FRONTEND=noninteractive\nRUN apt-get update
&& apt-get install -y python3 \nADD ug4 /opt/ug4' > Dockerfile
- docker build -t registry.gitlab.com/ug4-project/ugcore .
- docker push registry.gitlab.com/ug4-project/ugcore
- cd ug4
- ls -a bin
- mv bin ugcore/bin
artifacts:
when: on_success
expire_in: 1 week
paths:
- bin/*
- bin/plugins/*
include:
- template: Jobs/SAST.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
# - local: '/.gitlab/mirror-main.yml' # Push mirror is disabled.
sast:
stage: test