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.
This commit is contained in:
parent
2a24429404
commit
428bf47370
@ -3,11 +3,52 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
default:
|
||||
image: archlinux:latest
|
||||
before_script:
|
||||
- pacman --noconfirm -Syu --needed base-devel shellcheck
|
||||
image: "archlinux:latest"
|
||||
|
||||
lint:
|
||||
stage: build
|
||||
stages:
|
||||
- lint
|
||||
- build
|
||||
|
||||
shellcheck:
|
||||
stage: lint
|
||||
before_script:
|
||||
- pacman --noconfirm -Syu --needed make shellcheck
|
||||
script:
|
||||
- make lint
|
||||
|
||||
.build:
|
||||
stage: build
|
||||
before_script:
|
||||
- pacman -Syu --needed --noconfirm qemu-headless libisoburn
|
||||
script:
|
||||
- ./.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
|
||||
|
Loading…
Reference in New Issue
Block a user