gitlab-ci: Include from ci-scripts
.gitlab-ci.yml: Include a gitlab CI yaml file from the ci-scripts repository, that replaces the build-host.sh script and abstracts the .build target. Move all variables to top-level as they are useful in all build targets. Remove unnecessary before_script definitions because they are abstracted away by ci-scripts.
This commit is contained in:
parent
e0514b1d2e
commit
d56cbd9537
@ -2,43 +2,30 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
default:
|
# NOTE: most functionality (apart from building) is abstracted by this include
|
||||||
image: "archlinux:latest"
|
include:
|
||||||
|
- project: 'archlinux/ci-scripts'
|
||||||
|
ref: master
|
||||||
|
file: '/prepare_archiso_vm.yml'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
BUILD_SCRIPT: ./.gitlab/ci/build_archiso.sh
|
BUILD_SCRIPT: ./.gitlab/ci/build_archiso.sh
|
||||||
|
PACKAGE_LIST: dosfstools e2fsprogs erofs-utils jq libisoburn mtools openssl qemu-headless squashfs-tools zsync
|
||||||
QEMU_BUILD_TIMEOUT: 2400
|
QEMU_BUILD_TIMEOUT: 2400
|
||||||
|
QEMU_COPY_ARTIFACTS_TIMEOUT: 120
|
||||||
QEMU_VM_MEMORY: 3072
|
QEMU_VM_MEMORY: 3072
|
||||||
ARCHISO_COW_SPACE_SIZE: 2g
|
ARCHISO_COW_SPACE_SIZE: 2g
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- lint
|
- check
|
||||||
- build
|
- build
|
||||||
|
|
||||||
shellcheck:
|
check:
|
||||||
stage: lint
|
|
||||||
before_script:
|
before_script:
|
||||||
- pacman --noconfirm -Syu --needed make shellcheck
|
- pacman --noconfirm -Syu --needed make shellcheck
|
||||||
script:
|
script:
|
||||||
- make lint
|
- make lint
|
||||||
|
stage: check
|
||||||
.build:
|
|
||||||
variables:
|
|
||||||
PACKAGE_LIST: dosfstools e2fsprogs erofs-utils jq libisoburn mtools openssl qemu-headless squashfs-tools zsync
|
|
||||||
stage: build
|
|
||||||
before_script:
|
|
||||||
- pacman -Syu --needed --noconfirm qemu-headless
|
|
||||||
script:
|
|
||||||
- ./.gitlab/ci/build-host.sh
|
|
||||||
after_script:
|
|
||||||
- PROFILE=($BUILD_SCRIPT_ARGS) && cp -- "output/${PROFILE[0]}/metrics.txt" .
|
|
||||||
artifacts:
|
|
||||||
name: "output"
|
|
||||||
paths:
|
|
||||||
- "output/*/*"
|
|
||||||
expire_in: 2d
|
|
||||||
reports:
|
|
||||||
metrics: metrics.txt
|
|
||||||
|
|
||||||
build_short:
|
build_short:
|
||||||
extends: .build
|
extends: .build
|
||||||
@ -49,11 +36,11 @@ build_short:
|
|||||||
|
|
||||||
build_long:
|
build_long:
|
||||||
extends: .build
|
extends: .build
|
||||||
tags:
|
|
||||||
- fast-single-thread
|
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- BUILD_SCRIPT_ARGS: baseline iso
|
- BUILD_SCRIPT_ARGS: baseline iso
|
||||||
- BUILD_SCRIPT_ARGS: baseline netboot
|
- BUILD_SCRIPT_ARGS: baseline netboot
|
||||||
- BUILD_SCRIPT_ARGS: releng iso
|
- BUILD_SCRIPT_ARGS: releng iso
|
||||||
- BUILD_SCRIPT_ARGS: releng netboot
|
- BUILD_SCRIPT_ARGS: releng netboot
|
||||||
|
tags:
|
||||||
|
- fast-single-thread
|
||||||
|
Loading…
Reference in New Issue
Block a user