@@ -22,9 +22,10 @@ stages:
22
22
# TODO: add a build and test based on Alire in parallel to this.
23
23
build_and_test :
24
24
services :
25
- - image:sandbox
25
+ - image:systemgtk
26
26
- cpu:8
27
27
- mem:16
28
+ - run_as_root:false
28
29
stage : build_and_test
29
30
interruptible : true
30
31
rules :
@@ -35,25 +36,34 @@ build_and_test:
35
36
script :
36
37
- !reference [.basic-setup]
37
38
38
- # Build & test using anod
39
+ - echo -e "\e[0Ksection_start:`date +%s`:build_als[collapsed=true]\r\e[0Kanod build als"
39
40
- anod build als $ACI_TRACK_QUALIFIER --minimal
41
+ - echo -e "\e[0Ksection_end:`date +%s`:build_als\r\e[0K"
40
42
43
+ - echo -e "\e[0Ksection_start:`date +%s`:build_vscode[collapsed=true]\r\e[0Kanod build vscode-extension"
41
44
# We pass --latest here because the vscode-extension will try to download
42
45
# the Windows binary (it's a multi-platform extension), and this binary
43
46
# might not be available right away.
44
47
- anod build vscode-extension $ACI_TRACK_QUALIFIER --minimal --latest
48
+ - echo -e "\e[0Ksection_end:`date +%s`:build_vscode\r\e[0K"
49
+
50
+ - echo -e "\e[0Ksection_start:`date +%s`:test_als[collapsed=true]\r\e[0Kanod test als"
51
+ # Run ALS tests
45
52
- anod test als $ACI_TRACK_QUALIFIER --minimal
46
53
47
54
# TODO: it would be nice to have a simpler way of getting this info
48
- - BUILD_SPACE=`anod eval als --primitive test build_space_name $ACI_TRACK_QUALIFIER | tr -d "'"`
49
- - SB_BASE=$ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/$BUILD_SPACE
55
+ - ALS_BUILD_SPACE_NAME=`anod eval als --primitive test build_space_name $ACI_TRACK_QUALIFIER | tr -d "'"`
56
+ - ALS_BUILD_SPACE=$ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/$ALS_BUILD_SPACE_NAME
57
+ - echo -e "\e[0Ksection_end:`date +%s`:test_als\r\e[0K"
50
58
51
- # Process the report
52
- - e3-testsuite-report
53
- --failure-exit-code 1
54
- --xunit-output $CI_PROJECT_DIR/xunit_output.xml
55
- $SB_BASE/results/new/ || FAILED=true
59
+ - echo -e "\e[0Ksection_start:`date +%s`:test_vscode[collapsed=true]\r\e[0Kanod test vscode-extension"
60
+ # Run VSCode tests
61
+ - anod test vscode-extension --qualifier=$ACI_TRACK_QUALIFIER --minimal
62
+ - VSCODE_BUILD_SPACE_NAME=`anod eval --primitive test --qualifier=$ACI_TRACK_QUALIFIER vscode-extension build_space_name | tr -d "'"`
63
+ - VSCODE_BUILD_SPACE=$ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/$VSCODE_BUILD_SPACE_NAME
64
+ - echo -e "\e[0Ksection_end:`date +%s`:test_vscode\r\e[0K"
56
65
66
+ - echo -e "\e[0Ksection_start:`date +%s`:lsif[collapsed=true]\r\e[0KBuild lsif report"
57
67
# Build the lsif report
58
68
- anod install lsif-ada
59
69
- ( cd $ANOD_DEFAULT_SANDBOX_DIR ;
@@ -70,13 +80,32 @@ build_and_test:
70
80
cd $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/als/src;
71
81
lsif-ada gnat/lsp_server.gpr > $CI_PROJECT_DIR/dump.lsif 2>/dev/null ||
72
82
touch $CI_PROJECT_DIR/dump.lsif )
83
+ - echo -e "\e[0Ksection_end:`date +%s`:lsif\r\e[0K"
84
+
85
+ # Job artifacts must be produced in the project directory, so we do it at
86
+ # the end of the job to avoid changing Anod checkouts halfway through the
87
+ # job and triggering useless rebuilds.
88
+ - echo -e "\e[0Ksection_start:`date +%s`:prepare_artifacts[collapsed=true]\r\e[0KPrepare job artifacts"
89
+ # Process the als test report
90
+ - e3-testsuite-report
91
+ --failure-exit-code 1
92
+ --xunit-output $CI_PROJECT_DIR/als_xunit_output.xml
93
+ $ALS_BUILD_SPACE/results/new/ || FAILED=true
94
+ # Process the vscode-extension test report
95
+ - e3-testsuite-report
96
+ --failure-exit-code 1
97
+ --xunit-output $CI_PROJECT_DIR/vscode_xunit_output.xml
98
+ $VSCODE_BUILD_SPACE/results/new/ || FAILED=true
99
+ # Include Anod logs
100
+ - cp -r $ANOD_DEFAULT_SANDBOX_DIR/log $CI_PROJECT_DIR/anod-logs
101
+ - echo -e "\e[0Ksection_end:`date +%s`:prepare_artifacts\r\e[0K"
73
102
74
103
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
75
104
76
105
artifacts :
77
106
when : always # Upload on errors too
78
107
reports :
79
- junit : xunit_output .xml
108
+ junit : [als_xunit_output .xml, vscode_xunit_output.xml]
80
109
lsif : dump.lsif
81
110
82
111
.run_ci_common : &run_ci_common
0 commit comments