xref: /openbmc/qemu/.gitlab-ci.d/cirrus.yml (revision 65e728a2)
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  allow_failure: true
18  script:
19    - source .gitlab-ci.d/cirrus/$NAME.vars
20    - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
21          -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
22          -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
23          -e "s|[@]CIRRUS_VM_INSTANCE_TYPE@|$CIRRUS_VM_INSTANCE_TYPE|g"
24          -e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
25          -e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
26          -e "s|[@]CIRRUS_VM_CPUS@|$CIRRUS_VM_CPUS|g"
27          -e "s|[@]CIRRUS_VM_RAM@|$CIRRUS_VM_RAM|g"
28          -e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
29          -e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
30          -e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
31          -e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
32          -e "s|[@]PKGS@|$PKGS|g"
33          -e "s|[@]MAKE@|$MAKE|g"
34          -e "s|[@]PYTHON@|$PYTHON|g"
35          -e "s|[@]PIP3@|$PIP3|g"
36          -e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g"
37          -e "s|[@]CONFIGURE_ARGS@|$CONFIGURE_ARGS|g"
38          -e "s|[@]TEST_TARGETSS@|$TEST_TARGETSS|g"
39      <.gitlab-ci.d/cirrus/build.yml >.gitlab-ci.d/cirrus/$NAME.yml
40    - cat .gitlab-ci.d/cirrus/$NAME.yml
41    - cirrus-run -v --show-build-log always .gitlab-ci.d/cirrus/$NAME.yml
42  rules:
43    - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN"
44
45x64-freebsd-12-build:
46  extends: .cirrus_build_job
47  variables:
48    NAME: freebsd-12
49    CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
50    CIRRUS_VM_IMAGE_SELECTOR: image_family
51    CIRRUS_VM_IMAGE_NAME: freebsd-12-2
52    CIRRUS_VM_CPUS: 8
53    CIRRUS_VM_RAM: 8G
54    UPDATE_COMMAND: pkg update
55    INSTALL_COMMAND: pkg install -y
56    # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed
57    # See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71
58    CONFIGURE_ARGS: --disable-gnutls
59    TEST_TARGETS: check
60
61x64-freebsd-13-build:
62  extends: .cirrus_build_job
63  variables:
64    NAME: freebsd-13
65    CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
66    CIRRUS_VM_IMAGE_SELECTOR: image_family
67    CIRRUS_VM_IMAGE_NAME: freebsd-13-0
68    CIRRUS_VM_CPUS: 8
69    CIRRUS_VM_RAM: 8G
70    UPDATE_COMMAND: pkg update
71    INSTALL_COMMAND: pkg install -y
72    TEST_TARGETS: check
73
74x64-macos-11-base-build:
75  extends: .cirrus_build_job
76  variables:
77    NAME: macos-11
78    CIRRUS_VM_INSTANCE_TYPE: osx_instance
79    CIRRUS_VM_IMAGE_SELECTOR: image
80    CIRRUS_VM_IMAGE_NAME: big-sur-base
81    CIRRUS_VM_CPUS: 12
82    CIRRUS_VM_RAM: 24G
83    UPDATE_COMMAND: brew update
84    INSTALL_COMMAND: brew install
85    PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin
86    PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
87    TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64
88