xref: /freebsd/.cirrus.yml (revision b61a573019428cbdc38ed03be9ecd2482011ea66)
1# $FreeBSD$
2
3compute_engine_instance:
4  # Image list available via
5  # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
6  platform: freebsd
7  image_project: freebsd-org-cloud-dev
8  image: freebsd-13-2-release-amd64
9  cpu: 8
10  memory: 8G
11  disk: 40
12
13env:
14  PKG_FORMAT: tar
15
16task:
17  matrix:
18  - name: World and kernel amd64 build and boot smoke test
19    env:
20      TARGET: amd64
21      TARGET_ARCH: amd64
22      TOOLCHAIN_PKG: llvm15
23  - name: World and kernel arm64 build and boot smoke test
24    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
25    trigger_type: manual
26    env:
27      TARGET: arm64
28      TARGET_ARCH: aarch64
29      TOOLCHAIN_PKG: llvm15
30  - name: World and kernel gcc12 amd64 build and boot smoke test (manual)
31    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
32    trigger_type: manual
33    env:
34      TARGET: amd64
35      TARGET_ARCH: amd64
36      TOOLCHAIN_PKG: amd64-gcc12
37  - name: World and kernel gcc12 amd64 build and boot smoke test (FreeBSD repo)
38    only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src'
39    env:
40      TARGET: amd64
41      TARGET_ARCH: amd64
42      TOOLCHAIN_PKG: amd64-gcc12
43  timeout_in: 120m
44  install_script:
45  - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite
46
47  setup_script:
48  - uname -a
49  - gpart show
50  - df -m
51  - pkg --version
52  - pw useradd user
53  - mkdir -p /usr/obj/$(pwd -P)
54  - chown user:user /usr/obj/$(pwd -P)
55
56  script:
57  - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes buildworld buildkernel"
58
59  package_script:
60  - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes packages"
61
62  package_check_script:
63  - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG"
64
65  test_script:
66  - sh .cirrus-ci/pkg-install.sh qemu-nox11
67  - sh tools/boot/ci-qemu-test.sh
68
69  make_sysent_script:
70  # Check that make sysent results were committed if required
71  - make sysent
72  - if ! git diff --exit-code; then printf "\n>>> Generated sysent files not updated, run make sysent <<<\n"; false; fi
73
74  include_ldirs_script:
75  # Check that includes/Makefile refers to existing directories
76  - if ! make -C include/ check-ldirs; then printf "\n>>> include/Makefile lists nonexistant directories <<<\n"; false; fi
77
78  makeman_script:
79  # Check that the committed src.conf.5 matches the one generated by
80  # tools/build/options/makeman (modulo the date which always updates)
81  # XXX: This script is slow so keep it last
82  - (make makeman 2> /tmp/makeman.out); cat /tmp/makeman.out
83  - if ! git diff --exit-code --ignore-matching-lines "^.Dd" share/man/man5/src.conf.5; then printf "\n>>> src.conf.5 was not updated as required <<<\n"; false; fi
84  - if grep -q "no description found" /tmp/makeman.out; then printf "\n>>> Missing description files <<<\n"; false; fi
85
86  post_script:
87  - df -m
88  - du -m -s /usr/obj
89