xref: /freebsd/.cirrus.yml (revision dd21556857e8d40f66bf5ad54754d9d52669ebf7)
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-3-release-amd64
8  cpu: 8
9  memory: 8G
10  disk: 40
11
12env:
13  PKG_FORMAT: tar
14
15task:
16  matrix:
17  - name: amd64-llvm16 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: llvm16
24      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
25  - name: amd64-llvm17 World and kernel build and boot smoke test
26    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
27    trigger_type: manual
28    env:
29      TARGET: amd64
30      TARGET_ARCH: amd64
31      TOOLCHAIN: llvm17
32      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
33  - name: amd64-llvm18 World and kernel build and boot smoke test
34    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
35    trigger_type: manual
36    env:
37      TARGET: amd64
38      TARGET_ARCH: amd64
39      TOOLCHAIN: llvm18
40      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
41  - name: amd64-llvm19 World and kernel build and boot smoke test
42    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
43    env:
44      TARGET: amd64
45      TARGET_ARCH: amd64
46      TOOLCHAIN: llvm19
47      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
48  - name: arm64-llvm16 World and kernel build and boot smoke test
49    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
50    trigger_type: manual
51    env:
52      TARGET: arm64
53      TARGET_ARCH: aarch64
54      TOOLCHAIN: llvm16
55      TOOLCHAIN_PKG: ${TOOLCHAIN}
56  - name: arm64-llvm17 World and kernel build and boot smoke test
57    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
58    trigger_type: manual
59    env:
60      TARGET: arm64
61      TARGET_ARCH: aarch64
62      TOOLCHAIN: llvm17
63      TOOLCHAIN_PKG: ${TOOLCHAIN}
64  - name: arm64-llvm18 World and kernel build and boot smoke test
65    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
66    trigger_type: manual
67    env:
68      TARGET: arm64
69      TARGET_ARCH: aarch64
70      TOOLCHAIN: llvm18
71      TOOLCHAIN_PKG: ${TOOLCHAIN}
72  - name: arm64-llvm19 World and kernel build and boot smoke test
73    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
74    trigger_type: manual
75    env:
76      TARGET: arm64
77      TARGET_ARCH: aarch64
78      TOOLCHAIN: llvm19
79      TOOLCHAIN_PKG: ${TOOLCHAIN}
80  - name: amd64-gcc12 World and kernel build and boot smoke test (manual)
81    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
82    trigger_type: manual
83    env:
84      TARGET: amd64
85      TARGET_ARCH: amd64
86      TOOLCHAIN: amd64-gcc12
87      TOOLCHAIN_PKG: ${TOOLCHAIN}
88      EXTRA_MAKE_FLAGS: -s
89  - name: amd64-gcc13 World and kernel build and boot smoke test (manual)
90    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
91    trigger_type: manual
92    env:
93      TARGET: amd64
94      TARGET_ARCH: amd64
95      TOOLCHAIN: amd64-gcc13
96      TOOLCHAIN_PKG: ${TOOLCHAIN}
97      EXTRA_MAKE_FLAGS: -s
98  - name: amd64-gcc14 World and kernel build and boot smoke test (manual)
99    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
100    trigger_type: manual
101    env:
102      TARGET: amd64
103      TARGET_ARCH: amd64
104      TOOLCHAIN: amd64-gcc14
105      TOOLCHAIN_PKG: ${TOOLCHAIN}
106      EXTRA_MAKE_FLAGS: -s
107  - name: aarch64-gcc12 World and kernel build and boot smoke test (manual)
108    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
109    trigger_type: manual
110    env:
111      TARGET: arm64
112      TARGET_ARCH: aarch64
113      TOOLCHAIN: aarch64-gcc12
114      TOOLCHAIN_PKG: ${TOOLCHAIN}
115      EXTRA_MAKE_FLAGS: -s
116  - name: aarch64-gcc13 World and kernel build and boot smoke test (manual)
117    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
118    trigger_type: manual
119    env:
120      TARGET: arm64
121      TARGET_ARCH: aarch64
122      TOOLCHAIN: aarch64-gcc13
123      TOOLCHAIN_PKG: ${TOOLCHAIN}
124      EXTRA_MAKE_FLAGS: -s
125  - name: aarch64-gcc14 World and kernel build and boot smoke test (manual)
126    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
127    trigger_type: manual
128    env:
129      TARGET: arm64
130      TARGET_ARCH: aarch64
131      TOOLCHAIN: aarch64-gcc14
132      TOOLCHAIN_PKG: ${TOOLCHAIN}
133      EXTRA_MAKE_FLAGS: -s
134  - name: amd64-gcc13 World and kernel build and boot smoke test (FreeBSD repo)
135    only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' && $CIRRUS_BRANCH =~ 'pull/.*'
136    env:
137      TARGET: amd64
138      TARGET_ARCH: amd64
139      TOOLCHAIN: amd64-gcc13
140      TOOLCHAIN_PKG: ${TOOLCHAIN}
141      EXTRA_MAKE_FLAGS: -s
142  timeout_in: 120m
143  install_script:
144  - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite
145
146  setup_script:
147  - uname -a
148  - gpart show
149  - df -m
150  - pkg --version
151  - pw useradd -n user -m
152  - mkdir -p /usr/obj/$(pwd -P)
153  - chown user:user /usr/obj/$(pwd -P)
154  - su user -c "git config --global --add safe.directory $(pwd -P)"
155
156  build_world_script:
157  - su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld"
158
159  build_kernel_script:
160  - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel"
161
162  package_script:
163  - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages"
164
165  package_check_script:
166  - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG"
167
168  test_script:
169  - sh .cirrus-ci/pkg-install.sh qemu-nox11
170  - sh tools/boot/ci-qemu-test.sh
171
172  make_sysent_script:
173  # Check that make sysent results were committed if required
174  - make sysent
175  - if ! git diff --exit-code; then printf "\n>>> Generated sysent files not updated, run make sysent <<<\n"; false; fi
176
177  include_ldirs_script:
178  # Check that includes/Makefile refers to existing directories
179  - if ! make -C include/ check-ldirs; then printf "\n>>> include/Makefile lists nonexistant directories <<<\n"; false; fi
180
181  makeman_script:
182  # Check that the committed src.conf.5 matches the one generated by
183  # tools/build/options/makeman (modulo the date which always updates)
184  # XXX: This script is slow so keep it last
185  - (make makeman 2> /tmp/makeman.out); cat /tmp/makeman.out
186  - 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
187  - if grep -q "no description found" /tmp/makeman.out; then printf "\n>>> Missing description files <<<\n"; false; fi
188
189  post_script:
190  - df -m
191  - du -m -s /usr/obj
192