]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.d/buildtest-template.yml
hw/arm: add PCIe to Freescale i.MX6
[mirror_qemu.git] / .gitlab-ci.d / buildtest-template.yml
CommitLineData
6cd5251b 1.native_build_job_template:
e312d1fd 2 extends: .base_job_template
6cd5251b 3 stage: build
d4c7a565 4 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
2f7350cd
DB
5 cache:
6 paths:
7 - ccache
8 key: "$CI_JOB_NAME"
9 when: always
6cd5251b
PMD
10 before_script:
11 - JOBS=$(expr $(nproc) + 1)
12 script:
2f7350cd
DB
13 - export CCACHE_BASEDIR="$(pwd)"
14 - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
15 - export CCACHE_MAXSIZE="500M"
16 - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
6cd5251b
PMD
17 - mkdir build
18 - cd build
2f7350cd 19 - ccache --zero-stats
eda2321d 20 - ../configure --enable-werror --disable-docs --enable-fdt=system
66e2c6cb 21 ${TARGETS:+--target-list="$TARGETS"}
22ebcba0
TH
22 $CONFIGURE_ARGS ||
23 { cat config.log meson-logs/meson-log.txt && exit 1; }
6cd5251b
PMD
24 - if test -n "$LD_JOBS";
25 then
66e2c6cb 26 pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
6cd5251b
PMD
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
2f7350cd 33 - ccache --show-stats
6cd5251b 34
88b19e4e
AB
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:
cef63308 39 when: on_success
88b19e4e
AB
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
51
29a49376 52.common_test_job_template:
e312d1fd 53 extends: .base_job_template
6cd5251b 54 stage: test
d4c7a565 55 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
6cd5251b 56 script:
1f468152 57 - scripts/git-submodule.sh update roms/SLOF
2019cabf 58 - meson subprojects download $(cd build/subprojects && echo *)
6cd5251b
PMD
59 - cd build
60 - find . -type f -exec touch {} +
61 # Avoid recompiling by hiding ninja with NINJA=":"
62 - make NINJA=":" $MAKE_CHECK_ARGS
63
29a49376
DB
64.native_test_job_template:
65 extends: .common_test_job_template
66 artifacts:
67 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
cef63308 68 when: always
29a49376
DB
69 expire_in: 7 days
70 paths:
71 - build/meson-logs/testlog.txt
861dca37
MAL
72 reports:
73 junit: build/meson-logs/testlog.junit.xml
29a49376 74
bbbd9b6e 75.avocado_test_job_template:
29a49376 76 extends: .common_test_job_template
6cd5251b
PMD
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"
cef63308 84 when: always
f230dba7 85 expire_in: 7 days
6cd5251b
PMD
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
e312d1fd
DB
105 variables:
106 QEMU_JOB_AVOCADO: 1