Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2021-01-31 16:28:57 +0100
committerDavid Runge <dvzrv@archlinux.org>2021-01-31 23:25:22 +0100
commit428bf47370bcef0a8d7be662592876b0aed4103a (patch)
tree3429524121130a93408a06d6604c962274dc96fe
parent2a24429404f06c5ca20fe70a8d11656fac9c3b7d (diff)
Add build stage for continuous integration
.gitlab-ci.yml: Add a build stage to the gitlab CI, that facilitates the scripts below .gitlab/ci/, building the baseline and releng profiles in parallel. Distinguish the use-case in which builds are done for master, schedules and tags in a secure environment and any other where builds just have to be fast (for ensuring nothing is broken). Use MiB as block size for the du call when generating data for the metrics file.
-rw-r--r--.gitlab-ci.yml49
1 files changed, 45 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dbb2dde..a768c0f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,11 +3,52 @@
# SPDX-License-Identifier: GPL-3.0-or-later
default:
- image: archlinux:latest
+ image: "archlinux:latest"
+
+stages:
+ - lint
+ - build
+
+shellcheck:
+ stage: lint
before_script:
- - pacman --noconfirm -Syu --needed base-devel shellcheck
+ - pacman --noconfirm -Syu --needed make shellcheck
+ script:
+ - make lint
-lint:
+.build:
stage: build
+ before_script:
+ - pacman -Syu --needed --noconfirm qemu-headless libisoburn
script:
- - make lint
+ - ./.gitlab/ci/build-host.sh
+ after_script:
+ - echo "image_size_megabytes{image=\"${PROFILE}\"} $(du --block-size=MiB -- output/${PROFILE}/*iso)" > metrics.txt
+ parallel:
+ matrix:
+ - PROFILE: [baseline, releng]
+ artifacts:
+ name: "output"
+ paths:
+ - "output/*/*"
+ expire_in: 2d
+ reports:
+ metrics: metrics.txt
+
+build:
+ extends: .build
+ tags:
+ - fast-single-thread
+ except:
+ - master
+ - schedules
+ - tags
+
+build:secure:
+ extends: .build
+ tags:
+ - secure
+ only:
+ - master
+ - schedules
+ - tags