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