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