From c785f7cb8ddbfff1d5d3f55fc5bf9125d3400acd Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 29 Oct 2024 14:33:14 +0100 Subject: [PATCH] add gitlab CI pipeline The current pipeline (from Mobian) just doesn't work, we should get to a more efficient, simpler one. With the `clang-format` config now in place, this pipeline has 2 jobs: * ensure the code is properly formatted * run a test build to make sure it won't break --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..66f82cb --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +stages: + - build + - check + +variables: + CLANG_VERSION: 19 + BUILD_DEPS_NO_MM: "build-essential libcurl4-openssl-dev libgpiod-dev libgudev-1.0-dev libusb-1.0-0-dev meson scdoc" + BUILD_DEPS: "${BUILD_DEPS_NO_MM} libmm-glib-dev" + +image: debian:unstable-slim + +build: + stage: build + script: + - apt-get update + - apt-get -y install ${BUILD_DEPS} + - meson build + - meson compile -C build + artifacts: + paths: + - build + +# ModemManager is an optional dependency, let's ensure eg25-manager still builds fine without it +build-no-mm: + stage: build + script: + - apt-get update + - apt-get -y install ${BUILD_DEPS_NO_MM} + - meson build + - meson compile -C build + +format: + stage: check + dependencies: + - build + script: + - apt-get update + - apt-get -y install ${BUILD_DEPS} clang-format-${CLANG_VERSION} + - ninja -C build clang-format-check