From b30cb135b10dd3d22eaef32ce271546792fcddec Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 20 Sep 2022 08:44:44 -0500 Subject: [PATCH] ci: Add a README for the CI stuff and script to install CI fairy. --- .gitlab-ci/README.md | 38 +++++++++++++++++++ .../i386_and_proclamation_container_prep.sh | 4 +- .gitlab-ci/install-ci-fairy.sh | 11 ++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci/README.md create mode 100755 .gitlab-ci/install-ci-fairy.sh diff --git a/.gitlab-ci/README.md b/.gitlab-ci/README.md new file mode 100644 index 000000000..f76122255 --- /dev/null +++ b/.gitlab-ci/README.md @@ -0,0 +1,38 @@ +# CI and Generated Stuff Readme + + + +We use the FreeDesktop +["CI Templates"](https://freedesktop.pages.freedesktop.org/ci-templates) to +maintain build containers using code in this repo, storing the images in GitLab +Registry. Our CI files (and some other files) are auto-generated from Jinja +templates and `config.yml`, using +[ci-fairy](https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html). +You can install it with: + + +```sh +python3 -m pip install git+https://gitlab.freedesktop.org/freedesktop/ci-templates@d5aa3941aa03c2f716595116354fb81eb8012acb +``` + +On Windows you will also need to have GNU make and busybox installed, such as with: + +```pwsh +scoop install make busybox +``` + +To re-generate files, from the root directory, run: + +```sh +make -f .gitlab-ci/ci-scripts.mk +``` + +If you really want to force rebuilding, you can build the clean target first: + +```sh +make -f .gitlab-ci/ci-scripts.mk clean all +``` diff --git a/.gitlab-ci/i386_and_proclamation_container_prep.sh b/.gitlab-ci/i386_and_proclamation_container_prep.sh index fa6d693dc..d13b90327 100755 --- a/.gitlab-ci/i386_and_proclamation_container_prep.sh +++ b/.gitlab-ci/i386_and_proclamation_container_prep.sh @@ -1,10 +1,12 @@ #!/bin/bash -# Copyright 2018-2021, Collabora, Ltd. and the Monado contributors +# Copyright 2018-2022, Collabora, Ltd. and the Monado contributors # SPDX-License-Identifier: BSL-1.0 ( cd $(dirname $0) bash ./install-cross.sh + # Using this script "follows the instructions" for some testing of our instructions. + bash ./install-ci-fairy.sh ) python3 -m pip install proclamation cmakelang diff --git a/.gitlab-ci/install-ci-fairy.sh b/.gitlab-ci/install-ci-fairy.sh new file mode 100755 index 000000000..bb6e3392b --- /dev/null +++ b/.gitlab-ci/install-ci-fairy.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# SPDX-License-Identifier: CC0-1.0 +# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors + +# This runs the command in the README as an extra bit of continuous integration. +set -e + +( + cd "$(dirname "$0")" + sh -c "$(grep '^python3 -m pip' README.md)" +)