forked from AdaCore/gnatstudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (48 loc) · 1.87 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
variables:
# The common part of the URL for cloning from within a CI
GIT_CLONE_BASE: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}
stages:
- build_and_test
.basic-setup:
# Temporary: clone the specific branch of ci-fragments
# TODO: remove the next 4 lines when this version of ci-fragments is available in the image
- cd /tmp
- git clone $GIT_CLONE_BASE/eng/it/ci-fragments -b topic/generic_ci_phase_2 --depth 1
- export PATH=/tmp/ci-fragments:$PATH
- cd -
# Use generic_anod_ci here.
- generic_anod_ci
--add-dep eng/ide/gnatstudio-internal
- cat /tmp/ci_env.sh
- . /tmp/ci_env.sh
build_and_test:
services:
- image:gtk-deps
- cpu:8
- mem:16
- run_as_root:false
stage: build_and_test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_PIPELINE_SOURCE == 'pipeline'
script:
- !reference [.basic-setup]
# Build & test using anod
- anod build gps $ACI_TRACK_QUALIFIER --minimal --latest
- anod build gps_testsuite_drivers $ACI_TRACK_QUALIFIER --minimal --latest
# Set this to deactivate some event-synth tests
- export GITLAB_CI=1
# Pass --latest to the test command to ensure the CI remains
# available even if a dependency is not available.
- anod test gps $ACI_TRACK_QUALIFIER -Qcodepeer --minimal --latest
# Process the report
- BUILD_SPACE_NAME=`anod eval gps build_space_name --primitive test $ACI_TRACK_QUALIFIER -Qcodepeer | tr -d "'"`
- SB_BASE=$ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/$BUILD_SPACE_NAME
- e3-testsuite-report
--failure-exit-code 1
--xunit-output $CI_PROJECT_DIR/xunit_output.xml
$SB_BASE//results/new/ || FAILED=true
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
artifacts:
reports:
junit: xunit_output.xml