]>
Commit | Line | Data |
---|---|---|
1 | # Jobs that we delegate to Cirrus CI because they require an operating | |
2 | # system other than Linux. These jobs will only run if the required | |
3 | # setup has been performed on the GitLab account. | |
4 | # | |
5 | # The Cirrus CI configuration is generated by replacing target-specific | |
6 | # variables in a generic template: some of these variables are provided | |
7 | # when the GitLab CI job is defined, others are taken from a shell | |
8 | # snippet generated using lcitool. | |
9 | # | |
10 | # Note that the $PATH environment variable has to be treated with | |
11 | # special care, because we can't just override it at the GitLab CI job | |
12 | # definition level or we risk breaking it completely. | |
13 | .cirrus_build_job: | |
14 | stage: build | |
15 | image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master | |
16 | needs: [] | |
17 | timeout: 80m | |
18 | allow_failure: true | |
19 | script: | |
20 | - source .gitlab-ci.d/cirrus/$NAME.vars | |
21 | - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g" | |
22 | -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g" | |
23 | -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g" | |
24 | -e "s|[@]CIRRUS_VM_INSTANCE_TYPE@|$CIRRUS_VM_INSTANCE_TYPE|g" | |
25 | -e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g" | |
26 | -e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g" | |
27 | -e "s|[@]CIRRUS_VM_CPUS@|$CIRRUS_VM_CPUS|g" | |
28 | -e "s|[@]CIRRUS_VM_RAM@|$CIRRUS_VM_RAM|g" | |
29 | -e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g" | |
30 | -e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g" | |
31 | -e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g" | |
32 | -e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g" | |
33 | -e "s|[@]PKGS@|$PKGS|g" | |
34 | -e "s|[@]MAKE@|$MAKE|g" | |
35 | -e "s|[@]PYTHON@|$PYTHON|g" | |
36 | -e "s|[@]PIP3@|$PIP3|g" | |
37 | -e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g" | |
38 | -e "s|[@]CONFIGURE_ARGS@|$CONFIGURE_ARGS|g" | |
39 | -e "s|[@]TEST_TARGETS@|$TEST_TARGETS|g" | |
40 | <.gitlab-ci.d/cirrus/build.yml >.gitlab-ci.d/cirrus/$NAME.yml | |
41 | - cat .gitlab-ci.d/cirrus/$NAME.yml | |
42 | - cirrus-run -v --show-build-log always .gitlab-ci.d/cirrus/$NAME.yml | |
43 | rules: | |
44 | # Allow on 'staging' branch and 'stable-X.Y-staging' branches only | |
45 | - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' | |
46 | when: never | |
47 | - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" | |
48 | ||
49 | x64-freebsd-12-build: | |
50 | extends: .cirrus_build_job | |
51 | variables: | |
52 | NAME: freebsd-12 | |
53 | CIRRUS_VM_INSTANCE_TYPE: freebsd_instance | |
54 | CIRRUS_VM_IMAGE_SELECTOR: image_family | |
55 | CIRRUS_VM_IMAGE_NAME: freebsd-12-3 | |
56 | CIRRUS_VM_CPUS: 8 | |
57 | CIRRUS_VM_RAM: 8G | |
58 | UPDATE_COMMAND: pkg update | |
59 | INSTALL_COMMAND: pkg install -y | |
60 | TEST_TARGETS: check | |
61 | ||
62 | x64-freebsd-13-build: | |
63 | extends: .cirrus_build_job | |
64 | variables: | |
65 | NAME: freebsd-13 | |
66 | CIRRUS_VM_INSTANCE_TYPE: freebsd_instance | |
67 | CIRRUS_VM_IMAGE_SELECTOR: image_family | |
68 | CIRRUS_VM_IMAGE_NAME: freebsd-13-0 | |
69 | CIRRUS_VM_CPUS: 8 | |
70 | CIRRUS_VM_RAM: 8G | |
71 | UPDATE_COMMAND: pkg update | |
72 | INSTALL_COMMAND: pkg install -y | |
73 | TEST_TARGETS: check | |
74 | ||
75 | x64-macos-11-base-build: | |
76 | extends: .cirrus_build_job | |
77 | variables: | |
78 | NAME: macos-11 | |
79 | CIRRUS_VM_INSTANCE_TYPE: osx_instance | |
80 | CIRRUS_VM_IMAGE_SELECTOR: image | |
81 | CIRRUS_VM_IMAGE_NAME: big-sur-base | |
82 | CIRRUS_VM_CPUS: 12 | |
83 | CIRRUS_VM_RAM: 24G | |
84 | UPDATE_COMMAND: brew update | |
85 | INSTALL_COMMAND: brew install | |
86 | PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin | |
87 | PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig | |
88 | TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64 | |
89 | ||
90 | ||
91 | # The following jobs run VM-based tests via KVM on a Linux-based Cirrus-CI job | |
92 | .cirrus_kvm_job: | |
93 | stage: build | |
94 | image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master | |
95 | needs: [] | |
96 | timeout: 80m | |
97 | allow_failure: true | |
98 | script: | |
99 | - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g" | |
100 | -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g" | |
101 | -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g" | |
102 | -e "s|[@]NAME@|$NAME|g" | |
103 | -e "s|[@]CONFIGURE_ARGS@|$CONFIGURE_ARGS|g" | |
104 | -e "s|[@]TEST_TARGETS@|$TEST_TARGETS|g" | |
105 | <.gitlab-ci.d/cirrus/kvm-build.yml >.gitlab-ci.d/cirrus/$NAME.yml | |
106 | - cat .gitlab-ci.d/cirrus/$NAME.yml | |
107 | - cirrus-run -v --show-build-log always .gitlab-ci.d/cirrus/$NAME.yml | |
108 | rules: | |
109 | - when: manual | |
110 | ||
111 | x86-netbsd: | |
112 | extends: .cirrus_kvm_job | |
113 | variables: | |
114 | NAME: netbsd | |
115 | CONFIGURE_ARGS: --target-list=x86_64-softmmu,ppc64-softmmu,aarch64-softmmu | |
116 | TEST_TARGETS: check | |
117 | ||
118 | x86-openbsd: | |
119 | extends: .cirrus_kvm_job | |
120 | variables: | |
121 | NAME: openbsd | |
122 | CONFIGURE_ARGS: --target-list=i386-softmmu,riscv64-softmmu,mips64-softmmu | |
123 | TEST_TARGETS: check |