1+ 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}
4+
5+ stages :
6+ - build_and_test
7+
8+
9+ # Build and test with ANOD
10+ # TODO: add a build and test based on Alire in parallel to this.
11+ build_and_test :
12+ services :
13+ - image:sandbox
14+ - cpu:8
15+ - mem:16
16+ stage : build_and_test
17+ script :
18+ - . ~/.aws_container_credentials
19+ - export PATH=/it/e3/bin:$PATH
20+
21+ # Setup the 'anod vcs' for this repo
22+ - cd /it/wave
23+ - anod vcs --add-repo ada_language_server $CI_PROJECT_DIR
24+
25+ # Figure out if we're on a sync branch
26+ - BRANCH=master
27+ - if [[ $CI_COMMIT_BRANCH =~ ^sync/ ]]; then
28+ BRANCH=$CI_COMMIT_BRANCH;
29+ elif [[ $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ ^sync/ ]]; then
30+ BRANCH=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME;
31+ fi
32+
33+ # Setup the 'anod vcs' for the other repos, if we're on
34+ # a "sync" branch.
35+ - if [ $BRANCH != master ]; then
36+ for subproject in vss spawn gnatdoc ; do
37+ cd /tmp ;
38+ git clone $GIT_CLONE_BASE/eng/ide/$subproject ;
39+ cd $subproject ;
40+ if `git show-ref $BRANCH > /dev/null` ; then
41+ git checkout $BRANCH ;
42+ cd /it/wave ;
43+ anod vcs --add-repo $subproject /tmp/$subproject ;
44+ fi ;
45+ done ;
46+ fi
47+
48+ # Build & test using anod
49+ - cd /it/wave
50+ - anod build als --minimal
51+ - anod test als --minimal
52+
53+ # Process the report
54+ - e3-testsuite-report
55+ --failure-exit-code 1
56+ --xunit-output $CI_PROJECT_DIR/xunit_output.xml
57+ x86_64-linux/als-test/results/new/ || FAILED=true
58+
59+ - if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
60+
61+ artifacts :
62+ paths :
63+ - xunit_output.xml
64+ reports :
65+ junit : xunit_output.xml
0 commit comments