archiso/.gitlab-ci.yml
Kristian Klausen a2e886b4b9
Use VM runners[1] for building
Building inside a TCG accelerated qemu VM is slow and painful, but it is
the only option when running in a non-privileged container.

arch-boxes has been built inside a KVM accelerated VMs ("VM runner") for
over 11 months[2] and recently the MR[1] was merged into the
infrastructure repo. With it now being a official part of arch's
infrastructure we should switch to it and get much faster builds.

Doing some quick testing, the whole pipeline is now roughly ~29-84
minutes faster (taking between 7-9 minutes, instead of 36-93 minutes).

[1] https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/385
[2] 3bda5b26a6

Fix #161
2022-08-21 19:24:47 +02:00

71 lines
1.7 KiB
YAML

---
#
# SPDX-License-Identifier: GPL-3.0-or-later
stages:
- check
- build
check:
before_script:
# NOTE: Install latest archlinux-keyring before upgrading system. In the
# future this should not be needed anymore when we can guarantee a valid
# keyring for longer:
# https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/4
- pacman -Sy --needed --noconfirm archlinux-keyring
- pacman --noconfirm -Syu --needed make shellcheck
script:
- make check
stage: check
interruptible: true
.build:
artifacts:
reports:
metrics: output/metrics.txt
before_script:
- pacman -Sy --needed --noconfirm archlinux-keyring
- pacman -Syu --needed --noconfirm arch-install-scripts bash dosfstools e2fsprogs erofs-utils gnupg grub jq libarchive libisoburn mtools openssl qemu-headless squashfs-tools zsync
script:
- ./.gitlab/ci/build_archiso.sh ${BUILD_SCRIPT_ARGS}
stage: build
tags:
- vm
build_short:
extends: .build
parallel:
matrix:
- BUILD_SCRIPT_ARGS: baseline bootstrap
- BUILD_SCRIPT_ARGS: releng bootstrap
only:
refs:
- master
- merge_requests
changes:
- archiso/*
- configs/**/*
- Makefile
- .gitlab-ci.yml
- .gitlab/ci/*
interruptible: true
build_long:
extends: .build
parallel:
matrix:
- BUILD_SCRIPT_ARGS: baseline iso
- BUILD_SCRIPT_ARGS: baseline netboot
- BUILD_SCRIPT_ARGS: releng iso
- BUILD_SCRIPT_ARGS: releng netboot
only:
refs:
- master
- merge_requests
changes:
- archiso/*
- configs/**/*
- Makefile
- .gitlab-ci.yml
- .gitlab/ci/*
interruptible: true