birb/birb

de1f67d75292
Parents cf56f5acf278
Children bfc924c97a93
Add all the convey stuff so we can build the docs

Testing Done:
Built the image and ran `convey run docs` locally.

Reviewed at https://reviews.imfreedom.org/r/2876/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/containers/Dockerfile.debian-trixie-amd64 Tue Dec 19 01:14:43 2023 -0600
@@ -0,0 +1,27 @@
+FROM docker.io/debian:trixie-slim
+
+RUN set -ex && \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ build-essential \
+ ca-certificates \
+ gettext \
+ git \
+ gobject-introspection \
+ libgirepository1.0-dev \
+ libglib2.0-dev \
+ mercurial \
+ meson \
+ python3-jinja2 \
+ python3-packaging \
+ python3-pygments \
+ python3-toml \
+ python3-typogrify \
+ zip \
+ && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists
+
+COPY meson-build.sh /build.sh
+
+CMD ["/build.sh"]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/containers/convey.yaml Tue Dec 19 01:14:43 2023 -0600
@@ -0,0 +1,61 @@
+---
+environment:
+ - REPO=rwgrim/birb-builders
+ - REGISTRY=docker.io
+ - REGISTRY_USERNAME
+ - REGISTRY_PASSWORD
+tasks:
+ build:
+ type: docker/build
+ dockerfile: Dockerfile.${TARGET}
+ tag: ${REGISTRY}/${REPO}:${TARGET}
+ files: .:.
+ labels:
+ - COMMIT=${HG_COMMIT}
+
+ clean:
+ type: docker/remove
+ quiet: true
+ images:
+ - ${REGISTRY}/${REPO}/${TARGET}
+
+ import:
+ type: docker/import
+ files:
+ - .:.
+
+ login:
+ type: docker/login
+ username: ${REGISTRY_USERNAME}
+ password: ${REGISTRY_PASSWORD}
+ server: ${REGISTRY}
+
+ logout:
+ type: docker/logout
+ server: ${REGISTRY}
+
+ publish:
+ type: docker/push
+ image: ${REGISTRY}/${REPO}:${TARGET}
+
+plans:
+ clean:
+ stages:
+ - tasks: clean
+
+ build:
+ stages:
+ - tasks: [import, build]
+
+ publish:
+ environment: [REGISTRY_USERNAME, REGISTRY_PASSWORD]
+ stages:
+ - tasks: [login, publish]
+ - tasks: [logout]
+ run: always
+
+ debian-trixie-amd64:
+ environment:
+ - TARGET=debian-trixie-amd64
+ stages:
+ - tasks: [import, build]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/containers/meson-build.sh Tue Dec 19 01:14:43 2023 -0600
@@ -0,0 +1,9 @@
+#!/bin/sh -ex
+
+cd ${CONVEY_WORKSPACE}
+
+BUILD_DIR=${TARGET:-_build}
+
+meson setup ${MESON_OPTIONS} "${BUILD_DIR}"
+meson compile -C "${BUILD_DIR}"
+meson test --verbose -C "${BUILD_DIR}"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convey.yaml Tue Dec 19 01:14:43 2023 -0600
@@ -0,0 +1,74 @@
+environment:
+ - BUILD_NUMBER
+ - REPOSITORY=rwgrim/birb-builders
+ - REGISTRY=docker.io
+ - REGISTRY_USERNAME
+ - REGISTRY_PASSWORD
+ - DOCS_BUILD_IMAGE=${REGISTRY}/${REPOSITORY}:debian-trixie-amd64
+
+tasks:
+ clean:
+ type: convey/clean
+ files:
+ - debian-trixie-amd64
+
+ import:
+ type: docker/import
+ files: .:.
+
+ build:
+ type: docker/run
+ image: ${REGISTRY}/${REPOSITORY}:${TARGET}
+
+ export:
+ type: docker/export
+ files: ${TARGET}
+
+ login:
+ type: docker/login
+ server: ${REGISTRY}
+ username: ${REGISTRY_USERNAME}
+ password: ${REGISTRY_PASSWORD}
+
+ logout:
+ type: docker/logout
+ server: ${REGISTRY}
+
+ docs-clean:
+ type: convey/clean
+ files:
+ - birb-docs.zip
+ docs-build:
+ type: docker/run
+ image: ${DOCS_BUILD_IMAGE}
+ workdir: ${CONVEY_WORKSPACE}
+ script:
+ - set -ex
+ - rm -rf build-docs
+ - meson setup build-docs -Ddoc=true
+ - ninja -C build-docs doc
+ - cd build-docs/birb/reference
+ - zip -9r birb-docs.zip birb
+ docs-export:
+ type: docker/export
+ files:
+ - build-docs/birb/reference/birb-docs.zip:birb-docs.zip
+
+plans:
+ clean:
+ stages:
+ - tasks:
+ - clean
+ - docs-clean
+
+ debian-trixie-amd64:
+ environment: TARGET=debian-trixie-amd64
+ stages:
+ - tasks: [import, build]
+ - tasks: [export]
+ run: always
+
+ docs:
+ stages:
+ - tasks: [docs-clean, import, docs-build, docs-export]
+