xref: /src/.cirrus.yml (revision ea9bc84658308c8bdef94b2bda00781ef7c473a6)
19c0fe7f6SEd Maste
2cec2682cSEd Mastecompute_engine_instance:
3407abff2SEd Maste  # Image list available via
4407abff2SEd Maste  # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
5cec2682cSEd Maste  platform: freebsd
6cec2682cSEd Maste  image_project: freebsd-org-cloud-dev
72812c917SSiva Mahadevan  image: freebsd-15-0-release-amd64-ufs
89c0fe7f6SEd Maste  cpu: 8
9bbf70270SEd Maste  memory: 8G
10cec2682cSEd Maste  disk: 40
119c0fe7f6SEd Maste
1275baf376SEd Masteenv:
13ae5914c0SEd Maste  PKG_LEVEL: 1
1475baf376SEd Maste
159c0fe7f6SEd Mastetask:
168cba2003SEd Maste  matrix:
175c67180fSMuhammad Moinur Rahman  - name: amd64-llvm16 World and kernel build and boot smoke test (manual)
18171f1c1bSEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
19171f1c1bSEd Maste    trigger_type: manual
208cba2003SEd Maste    env:
218cba2003SEd Maste      TARGET: amd64
228cba2003SEd Maste      TARGET_ARCH: amd64
23df042dcfSEd Maste      TOOLCHAIN: llvm16
24df042dcfSEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
255c67180fSMuhammad Moinur Rahman  - name: amd64-llvm17 World and kernel build and boot smoke test (manual)
26e8b7c78cSEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
27e8b7c78cSEd Maste    trigger_type: manual
288cba2003SEd Maste    env:
2951c6bf04SEd Maste      TARGET: amd64
3051c6bf04SEd Maste      TARGET_ARCH: amd64
3151c6bf04SEd Maste      TOOLCHAIN: llvm17
3251c6bf04SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
335c67180fSMuhammad Moinur Rahman  - name: amd64-llvm18 World and kernel build and boot smoke test (manual)
345e310866SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
355e310866SEd Maste    trigger_type: manual
3624235654SEd Maste    env:
3724235654SEd Maste      TARGET: amd64
3824235654SEd Maste      TARGET_ARCH: amd64
3924235654SEd Maste      TOOLCHAIN: llvm18
4024235654SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
41944f45b8SEd Maste  - name: amd64-llvm19 World and kernel build and boot smoke test
425e310866SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
43944f45b8SEd Maste    env:
44944f45b8SEd Maste      TARGET: amd64
45944f45b8SEd Maste      TARGET_ARCH: amd64
46944f45b8SEd Maste      TOOLCHAIN: llvm19
47944f45b8SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}-lite
485c67180fSMuhammad Moinur Rahman  - name: arm64-llvm16 World and kernel build and boot smoke test (manual)
49df042dcfSEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
50df042dcfSEd Maste    trigger_type: manual
51df042dcfSEd Maste    env:
52df042dcfSEd Maste      TARGET: arm64
53df042dcfSEd Maste      TARGET_ARCH: aarch64
54df042dcfSEd Maste      TOOLCHAIN: llvm16
55df042dcfSEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
565c67180fSMuhammad Moinur Rahman  - name: arm64-llvm17 World and kernel build and boot smoke test (manual)
5751c6bf04SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
5851c6bf04SEd Maste    trigger_type: manual
5951c6bf04SEd Maste    env:
6051c6bf04SEd Maste      TARGET: arm64
6151c6bf04SEd Maste      TARGET_ARCH: aarch64
6251c6bf04SEd Maste      TOOLCHAIN: llvm17
6351c6bf04SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
645c67180fSMuhammad Moinur Rahman  - name: arm64-llvm18 World and kernel build and boot smoke test (manual)
6524235654SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
6624235654SEd Maste    trigger_type: manual
6724235654SEd Maste    env:
6824235654SEd Maste      TARGET: arm64
6924235654SEd Maste      TARGET_ARCH: aarch64
7024235654SEd Maste      TOOLCHAIN: llvm18
7124235654SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
725c67180fSMuhammad Moinur Rahman  - name: arm64-llvm19 World and kernel build and boot smoke test (manual)
73944f45b8SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
74944f45b8SEd Maste    trigger_type: manual
75944f45b8SEd Maste    env:
76944f45b8SEd Maste      TARGET: arm64
77944f45b8SEd Maste      TARGET_ARCH: aarch64
78944f45b8SEd Maste      TOOLCHAIN: llvm19
79944f45b8SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
8098c52118SEd Maste  - name: amd64-gcc12 World and kernel build and boot smoke test (manual)
819244506aSEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
8275e44873SEd Maste    trigger_type: manual
8375e44873SEd Maste    env:
8475e44873SEd Maste      TARGET: amd64
8575e44873SEd Maste      TARGET_ARCH: amd64
86f326a83cSEd Maste      TOOLCHAIN: amd64-gcc12
87f326a83cSEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
885f72ceb2SEd Maste      EXTRA_MAKE_FLAGS: -s
899101746aSJohn Baldwin  - name: amd64-gcc13 World and kernel build and boot smoke test (manual)
909101746aSJohn Baldwin    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
919101746aSJohn Baldwin    trigger_type: manual
929101746aSJohn Baldwin    env:
939101746aSJohn Baldwin      TARGET: amd64
949101746aSJohn Baldwin      TARGET_ARCH: amd64
959101746aSJohn Baldwin      TOOLCHAIN: amd64-gcc13
969101746aSJohn Baldwin      TOOLCHAIN_PKG: ${TOOLCHAIN}
979101746aSJohn Baldwin      EXTRA_MAKE_FLAGS: -s
9840ed89ffSJohn Baldwin  - name: amd64-gcc14 World and kernel build and boot smoke test (manual)
9940ed89ffSJohn Baldwin    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
10040ed89ffSJohn Baldwin    trigger_type: manual
10140ed89ffSJohn Baldwin    env:
10240ed89ffSJohn Baldwin      TARGET: amd64
10340ed89ffSJohn Baldwin      TARGET_ARCH: amd64
10440ed89ffSJohn Baldwin      TOOLCHAIN: amd64-gcc14
10540ed89ffSJohn Baldwin      TOOLCHAIN_PKG: ${TOOLCHAIN}
10640ed89ffSJohn Baldwin      EXTRA_MAKE_FLAGS: -s
1075ad6c907SEd Maste  - name: aarch64-gcc12 World and kernel build and boot smoke test (manual)
1085ad6c907SEd Maste    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
1095ad6c907SEd Maste    trigger_type: manual
1105ad6c907SEd Maste    env:
1115ad6c907SEd Maste      TARGET: arm64
1125ad6c907SEd Maste      TARGET_ARCH: aarch64
1135ad6c907SEd Maste      TOOLCHAIN: aarch64-gcc12
1145ad6c907SEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
1155f72ceb2SEd Maste      EXTRA_MAKE_FLAGS: -s
1169101746aSJohn Baldwin  - name: aarch64-gcc13 World and kernel build and boot smoke test (manual)
1179101746aSJohn Baldwin    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
1189101746aSJohn Baldwin    trigger_type: manual
1199101746aSJohn Baldwin    env:
1209101746aSJohn Baldwin      TARGET: arm64
1219101746aSJohn Baldwin      TARGET_ARCH: aarch64
1229101746aSJohn Baldwin      TOOLCHAIN: aarch64-gcc13
1239101746aSJohn Baldwin      TOOLCHAIN_PKG: ${TOOLCHAIN}
1249101746aSJohn Baldwin      EXTRA_MAKE_FLAGS: -s
12540ed89ffSJohn Baldwin  - name: aarch64-gcc14 World and kernel build and boot smoke test (manual)
12640ed89ffSJohn Baldwin    only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src'
12740ed89ffSJohn Baldwin    trigger_type: manual
12840ed89ffSJohn Baldwin    env:
12940ed89ffSJohn Baldwin      TARGET: arm64
13040ed89ffSJohn Baldwin      TARGET_ARCH: aarch64
13140ed89ffSJohn Baldwin      TOOLCHAIN: aarch64-gcc14
13240ed89ffSJohn Baldwin      TOOLCHAIN_PKG: ${TOOLCHAIN}
13340ed89ffSJohn Baldwin      EXTRA_MAKE_FLAGS: -s
134bd9709c2SJohn Baldwin  - name: amd64-gcc14 World and kernel build and boot smoke test (FreeBSD repo)
13557b9a104SJose Luis Duran    only_if: $CIRRUS_REPO_FULL_NAME == 'freebsd/freebsd-src' && $CIRRUS_BRANCH =~ 'pull/.*'
136f5f1b9a9SEd Maste    env:
137f5f1b9a9SEd Maste      TARGET: amd64
138f5f1b9a9SEd Maste      TARGET_ARCH: amd64
139bd9709c2SJohn Baldwin      TOOLCHAIN: amd64-gcc14
140f326a83cSEd Maste      TOOLCHAIN_PKG: ${TOOLCHAIN}
1415f72ceb2SEd Maste      EXTRA_MAKE_FLAGS: -s
1424d083e6dSEd Maste  timeout_in: 120m
1439c0fe7f6SEd Maste  install_script:
144b4373ce3SBrooks Davis  - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite
145260b2c51SBrooks Davis
146af11c202SEd Maste  setup_script:
147f2f24008SEd Maste  - uname -a
148170d1042SEd Maste  - gpart show
149f2f24008SEd Maste  - df -m
150a077a4e3SEd Maste  - pkg --version
151663e4fa3SBrooks Davis  - pw useradd -n user -m
152db853af6SEd Maste  - mkdir -p /usr/obj/$(pwd -P)
153db853af6SEd Maste  - chown user:user /usr/obj/$(pwd -P)
154663e4fa3SBrooks Davis  - su user -c "git config --global --add safe.directory $(pwd -P)"
155260b2c51SBrooks Davis
1566024564cSEd Maste  build_world_script:
1575bba547aSEd Maste  - su user -c "make -j$(nproc) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld"
1586024564cSEd Maste
1596024564cSEd Maste  build_kernel_script:
1605bba547aSEd Maste  - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel"
161260b2c51SBrooks Davis
162e1e9e084SEd Maste  package_script:
163e2796f03SEd Maste  - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages"
164260b2c51SBrooks Davis
165e1e9e084SEd Maste  test_script:
166612f254cSEd Maste  - sh .cirrus-ci/pkg-install.sh qemu-nox11
167e1e9e084SEd Maste  - sh tools/boot/ci-qemu-test.sh
168260b2c51SBrooks Davis
169*ea9bc846SBrooks Davis  package_check_script:
170*ea9bc846SBrooks Davis  - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG"
171*ea9bc846SBrooks Davis
172b4373ce3SBrooks Davis  make_sysent_script:
173b4373ce3SBrooks Davis  # Check that make sysent results were committed if required
174b4373ce3SBrooks Davis  - make sysent
175b4373ce3SBrooks Davis  - if ! git diff --exit-code; then printf "\n>>> Generated sysent files not updated, run make sysent <<<\n"; false; fi
176b4373ce3SBrooks Davis
1778cee0c9aSBrooks Davis  include_ldirs_script:
1788cee0c9aSBrooks Davis  # Check that includes/Makefile refers to existing directories
1798cee0c9aSBrooks Davis  - if ! make -C include/ check-ldirs; then printf "\n>>> include/Makefile lists nonexistant directories <<<\n"; false; fi
1808cee0c9aSBrooks Davis
18185e8c2a0SBrooks Davis  makeman_script:
18285e8c2a0SBrooks Davis  # Check that the committed src.conf.5 matches the one generated by
18385e8c2a0SBrooks Davis  # tools/build/options/makeman (modulo the date which always updates)
18485e8c2a0SBrooks Davis  # XXX: This script is slow so keep it last
18585e8c2a0SBrooks Davis  - (make makeman 2> /tmp/makeman.out); cat /tmp/makeman.out
18685e8c2a0SBrooks Davis  - 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
18785e8c2a0SBrooks Davis  - if grep -q "no description found" /tmp/makeman.out; then printf "\n>>> Missing description files <<<\n"; false; fi
18885e8c2a0SBrooks Davis
189f2f24008SEd Maste  post_script:
190f2f24008SEd Maste  - df -m
191f2f24008SEd Maste  - du -m -s /usr/obj
192539f84dbSMuhammad Moinur Rahman
193539f84dbSMuhammad Moinur Rahmanprecommit_task:
19441e9414eSMuhammad Moinur Rahman  persistent_worker:
19541e9414eSMuhammad Moinur Rahman    labels:
19641e9414eSMuhammad Moinur Rahman      jail: FreeBSD-src
197539f84dbSMuhammad Moinur Rahman  matrix:
198539f84dbSMuhammad Moinur Rahman    - name: amd64 smoke test using internal ci systems
199539f84dbSMuhammad Moinur Rahman      only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
200539f84dbSMuhammad Moinur Rahman      env:
201539f84dbSMuhammad Moinur Rahman        TARGET: amd64
202539f84dbSMuhammad Moinur Rahman        TARGET_ARCH: amd64
203539f84dbSMuhammad Moinur Rahman    - name: aarch64 smoke test using internal ci systems
204539f84dbSMuhammad Moinur Rahman      only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
205539f84dbSMuhammad Moinur Rahman      env:
206539f84dbSMuhammad Moinur Rahman        TARGET: arm64
207539f84dbSMuhammad Moinur Rahman        TARGET_ARCH: aarch64
208539f84dbSMuhammad Moinur Rahman  timeout_in: 120m
209539f84dbSMuhammad Moinur Rahman
210539f84dbSMuhammad Moinur Rahman  setup_script:
211539f84dbSMuhammad Moinur Rahman    - uname -a
212539f84dbSMuhammad Moinur Rahman    - gpart show
213539f84dbSMuhammad Moinur Rahman    - df -m
214539f84dbSMuhammad Moinur Rahman    - pkg --version
215539f84dbSMuhammad Moinur Rahman
216539f84dbSMuhammad Moinur Rahman  ci_script:
217676d64eeSMuhammad Moinur Rahman    - make -C tests/ci TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} CIENV=cirrus CITYPE=smoke ci
218539f84dbSMuhammad Moinur Rahman
219539f84dbSMuhammad Moinur Rahman  post_script:
220539f84dbSMuhammad Moinur Rahman    - df -m
221539f84dbSMuhammad Moinur Rahman    - du -m -s /usr/obj
222