]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
CI: split make gitlab to local and venv variant
authorMaria Matejka <mq@ucw.cz>
Thu, 19 Jun 2025 16:40:23 +0000 (18:40 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 19 Jun 2025 16:40:42 +0000 (18:40 +0200)
If you prefer to install python3-jinja2 and pyaml yourself,
run gitlab-local. If you prefer the thing to create a venv
and pip3 all the dependencies, run gitlab-venv.

Makefile.in

index 96a5b6eba60afd911af5f416efe760416bcb9d14..4429ee9fd3c9044320306b01e5232818e6e7a9ea 100644 (file)
@@ -204,15 +204,21 @@ cscope:
        cd $(srcdir) ; find $(dirs) -name '*.[chY]' > cscope.files ; cscope -b
 
 # Gitlab CI tests
-gitlab: .gitlab-ci.yml
+gitlab-venv: .gitlab-ci.yml
+gitlab-venv: USE_VENV := VENV
+
+gitlab-local: .gitlab-ci.yml
+gitlab-local: USE_VENV :=
+
 .gitlab-ci.yml: $(addprefix misc/gitlab/,pipeline.py data.yml.j2 template.yml.j2)
-       ( \
+       ($(if $(USE_VENV),\
                VENV=$$(mktemp -d); \
                python3 -m venv $$VENV; \
                . $$VENV/bin/activate; \
                pip3 install jinja2 pyaml; \
-               python3 misc/gitlab/pipeline.py > $@ \
-               rm -rf $$VENV \
+               ,) \
+               python3 misc/gitlab/pipeline.py > $@; \
+               $(if $(USE_VENV),rm -rf $$VENV,) \
                )
 
 # Install