Skip to content

Commit 64d5a01

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents a78b8cd + 2875743 commit 64d5a01

File tree

10 files changed

+360
-130
lines changed

10 files changed

+360
-130
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ indent_size = 4
1313

1414
[*.ts]
1515
indent_size = 4
16+
17+
[*.{yaml,yml}]
18+
indent_size = 2

.gitlab-ci.yml

Lines changed: 69 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
variables:
2-
# The common part of the URL for cloning from within a CI
3-
GIT_CLONE_BASE: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}
2+
# The common part of the URL for cloning from within a CI
3+
GIT_CLONE_BASE: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}
44

55
stages:
66
- build_and_test
77
- run_downstream_ci
88

99
.basic-setup:
10-
# Temporary: clone the specific branch of ci-fragments
11-
# TODO: remove the next 4 lines when this version of ci-fragments is available in the image
12-
- cd /tmp
13-
- git clone $GIT_CLONE_BASE/eng/it/ci-fragments -b topic/generic_ci_phase_2 --depth 1
14-
- export PATH=/tmp/ci-fragments:$PATH
15-
- cd -
16-
# Use generic_anod_ci here.
17-
- generic_anod_ci
18-
- cat /tmp/ci_env.sh
19-
- . /tmp/ci_env.sh
10+
# Temporary: clone the specific branch of ci-fragments
11+
# TODO: remove the next 4 lines when this version of ci-fragments is available in the image
12+
- cd /tmp
13+
- git clone $GIT_CLONE_BASE/eng/it/ci-fragments -b topic/generic_ci_phase_2 --depth 1
14+
- export PATH=/tmp/ci-fragments:$PATH
15+
- cd -
16+
# Use generic_anod_ci here.
17+
- generic_anod_ci
18+
- cat /tmp/ci_env.sh
19+
- . /tmp/ci_env.sh
2020

2121
# Build and test with ANOD
2222
# TODO: add a build and test based on Alire in parallel to this.
2323
build_and_test:
2424
services:
25-
- image:sandbox
26-
- cpu:8
27-
- mem:16
25+
- image:systemgtk
26+
- cpu:8
27+
- mem:16
28+
- run_as_root:false
2829
stage: build_and_test
2930
interruptible: true
3031
rules:
@@ -35,49 +36,77 @@ build_and_test:
3536
script:
3637
- !reference [.basic-setup]
3738

38-
# Build & test using anod
39+
- echo -e "\e[0Ksection_start:`date +%s`:build_als[collapsed=true]\r\e[0Kanod build als"
3940
- anod build als $ACI_TRACK_QUALIFIER --minimal
41+
- echo -e "\e[0Ksection_end:`date +%s`:build_als\r\e[0K"
4042

43+
- echo -e "\e[0Ksection_start:`date +%s`:build_vscode[collapsed=true]\r\e[0Kanod build vscode-extension"
4144
# We pass --latest here because the vscode-extension will try to download
4245
# the Windows binary (it's a multi-platform extension), and this binary
4346
# might not be available right away.
4447
- 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
4552
- anod test als $ACI_TRACK_QUALIFIER --minimal
4653

4754
# 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"
5058

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"
5665

66+
- echo -e "\e[0Ksection_start:`date +%s`:lsif[collapsed=true]\r\e[0KBuild lsif report"
5767
# Build the lsif report
5868
- anod install lsif-ada
5969
- ( cd $ANOD_DEFAULT_SANDBOX_DIR ;
60-
eval `anod printenv lsif-ada`;
61-
eval `anod printenv stable-gnat`;
62-
eval `anod printenv ada_libfswatch`;
63-
eval `anod printenv stable-templates_parser`;
64-
eval `anod printenv stable-langkit_support`;
65-
eval `anod printenv stable-libgpr2 --qualifier=bare`;
66-
eval `anod printenv stable-libadalang`;
67-
eval `anod printenv stable-libadalang-tools`;
68-
export GPR_PROJECT_PATH=` pwd `/x86_64-linux/als/src/subprojects/gnatdoc/gnat:$GPR_PROJECT_PATH;
69-
export GPR_PROJECT_PATH=` pwd `/x86_64-linux/als/src/subprojects/VSS/gnat:$GPR_PROJECT_PATH;
70-
cd $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/als/src;
71-
lsif-ada gnat/lsp_server.gpr > $CI_PROJECT_DIR/dump.lsif 2>/dev/null ||
72-
touch $CI_PROJECT_DIR/dump.lsif )
70+
eval `anod printenv lsif-ada`;
71+
eval `anod printenv stable-gnat`;
72+
eval `anod printenv ada_libfswatch`;
73+
eval `anod printenv stable-templates_parser`;
74+
eval `anod printenv stable-langkit_support`;
75+
eval `anod printenv stable-libgpr2 --qualifier=bare`;
76+
eval `anod printenv stable-libadalang`;
77+
eval `anod printenv stable-libadalang-tools`;
78+
export GPR_PROJECT_PATH=` pwd `/x86_64-linux/als/src/subprojects/gnatdoc/gnat:$GPR_PROJECT_PATH;
79+
export GPR_PROJECT_PATH=` pwd `/x86_64-linux/als/src/subprojects/VSS/gnat:$GPR_PROJECT_PATH;
80+
cd $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/als/src;
81+
lsif-ada gnat/lsp_server.gpr > $CI_PROJECT_DIR/dump.lsif 2>/dev/null ||
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"
73102

74103
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
75104

76105
artifacts:
77-
when: always # Upload on errors too
78-
reports:
79-
junit: xunit_output.xml
80-
lsif: dump.lsif
106+
when: always # Upload on errors too
107+
reports:
108+
junit: [als_xunit_output.xml, vscode_xunit_output.xml]
109+
lsif: dump.lsif
81110

82111
.run_ci_common: &run_ci_common
83112
stage: run_downstream_ci

.vscode/settings.json.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
// Use the same line length as black and flake8
2222
"vim.textwidth": 88
2323
},
24+
"[yaml]": {
25+
"editor.defaultFormatter": "esbenp.prettier-vscode"
26+
},
2427
"terminal.integrated.env.osx": {
2528
// Dependencies can be provided under the subprojects/ directory. They
2629
// would automatically be included in GPR_PROJECT_PATH by the following
@@ -60,5 +63,7 @@
6063
"editor.detectIndentation": false,
6164
"files.trimFinalNewlines": true,
6265
"files.trimTrailingWhitespace": true
63-
}
66+
},
67+
// Allow GitLab-specific Yaml tags in .gitlab-ci.yml
68+
"yaml.customTags": ["!reference sequence"]
6469
}

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ ifneq ($(npm_config_offline),true)
128128
cd integration/vscode/ada; LD_LIBRARY_PATH= npm install --no-audit
129129
cd integration/vscode/ada; LD_LIBRARY_PATH= npm run check-licenses
130130
endif
131+
cd integration/vscode/ada; LD_LIBRARY_PATH= npm run cilint
131132
cd integration/vscode/ada; LD_LIBRARY_PATH= npm run compile
132133
@echo Now run:
133134
@echo code --extensionDevelopmentPath=`pwd`/integration/vscode/ada/ `pwd`

0 commit comments

Comments
 (0)