migration: modify test_multifd_tcp_none() to use new QAPI syntax.
[qemu/kevin.git] / .gitlab-ci.d / buildtest-template.yml
blob4fbfeb6667429840b46731e4e7d19bbdf194446f
1 .native_build_job_template:
2   extends: .base_job_template
3   stage: build
4   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
5   cache:
6     paths:
7       - ccache
8     key: "$CI_JOB_NAME"
9     when: always
10   before_script:
11     - JOBS=$(expr $(nproc) + 1)
12   script:
13     - export CCACHE_BASEDIR="$(pwd)"
14     - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
15     - export CCACHE_MAXSIZE="500M"
16     - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
17     - mkdir build
18     - cd build
19     - ccache --zero-stats
20     - ../configure --enable-werror --disable-docs --enable-fdt=system
21           ${TARGETS:+--target-list="$TARGETS"}
22           $CONFIGURE_ARGS ||
23       { cat config.log meson-logs/meson-log.txt && exit 1; }
24     - if test -n "$LD_JOBS";
25       then
26         pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
27       fi || exit 1;
28     - make -j"$JOBS"
29     - if test -n "$MAKE_CHECK_ARGS";
30       then
31         make -j"$JOBS" $MAKE_CHECK_ARGS ;
32       fi
33     - ccache --show-stats
35 # We jump some hoops in common_test_job_template to avoid
36 # rebuilding all the object files we skip in the artifacts
37 .native_build_artifact_template:
38   artifacts:
39     when: on_success
40     expire_in: 2 days
41     paths:
42       - build
43       - .git-submodule-status
44     exclude:
45       - build/**/*.p
46       - build/**/*.a.p
47       - build/**/*.fa.p
48       - build/**/*.c.o
49       - build/**/*.c.o.d
50       - build/**/*.fa
52 .common_test_job_template:
53   extends: .base_job_template
54   stage: test
55   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
56   script:
57     - scripts/git-submodule.sh update roms/SLOF
58     - meson subprojects download $(cd build/subprojects && echo *)
59     - cd build
60     - find . -type f -exec touch {} +
61     # Avoid recompiling by hiding ninja with NINJA=":"
62     - make NINJA=":" $MAKE_CHECK_ARGS
64 .native_test_job_template:
65   extends: .common_test_job_template
66   artifacts:
67     name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
68     when: always
69     expire_in: 7 days
70     paths:
71       - build/meson-logs/testlog.txt
72     reports:
73       junit: build/meson-logs/testlog.junit.xml
75 .avocado_test_job_template:
76   extends: .common_test_job_template
77   cache:
78     key: "${CI_JOB_NAME}-cache"
79     paths:
80       - ${CI_PROJECT_DIR}/avocado-cache
81     policy: pull-push
82   artifacts:
83     name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
84     when: always
85     expire_in: 7 days
86     paths:
87       - build/tests/results/latest/results.xml
88       - build/tests/results/latest/test-results
89     reports:
90       junit: build/tests/results/latest/results.xml
91   before_script:
92     - mkdir -p ~/.config/avocado
93     - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
94     - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
95            >> ~/.config/avocado/avocado.conf
96     - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
97            >> ~/.config/avocado/avocado.conf
98     - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
99         du -chs ${CI_PROJECT_DIR}/avocado-cache ;
100       fi
101     - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
102   after_script:
103     - cd build
104     - du -chs ${CI_PROJECT_DIR}/avocado-cache
105   variables:
106     QEMU_JOB_AVOCADO: 1