public inbox for perfbook@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
@ 2023-02-01 20:15 Leonardo Bras
  2023-02-01 22:13 ` Paul E. McKenney
  0 siblings, 1 reply; 13+ messages in thread
From: Leonardo Bras @ 2023-02-01 20:15 UTC (permalink / raw)
  To: Paul E . McKenney; +Cc: Leonardo Bras, perfbook

Having this file merged on the main repository will trigger the Gitlab-CI
on the mirror: https://gitlab.com/linux-kernel/perfbook/ after each push.

The way it works:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
---
 .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..d131a4dc
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,34 @@
+image: archlinux:latest
+
+stages:
+  - test
+  - build
+
+test_codesamples:
+    stage: test
+
+    before_script:
+        - pacman --noconfirm -Sy make gcc liburcu
+
+    script:
+        - make -C CodeSamples/
+
+generate_pdfs:
+    stage: build
+
+    before_script:
+        - pacman --noconfirm -Sy texlive-most fig2dev ghostscript graphviz inkscape wget make which fontconfig git ttf-dejavu gnu-free-fonts
+        - mkdir -p ~/.local/share/fonts && cp fonts/steel-city-comic.regular.ttf ~/.local/share/fonts/ && fc-cache
+        - wget https://sourceforge.net/projects/fig2ps/files/latest/download -O /dev/shm/fig2ps.tbz
+        - mkdir /dev/shm/build && tar -xjf /dev/shm/fig2ps.tbz -C /dev/shm/build --strip-components=1
+        - make install -C /dev/shm/build
+
+    script:
+        - make perfbook.pdf perfbook-1c.pdf perfbook-eb.pdf
+
+    artifacts:
+      paths:
+          - perfbook.pdf
+          - perfbook-1c.pdf
+          - perfbook-eb.pdf
+
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-02-03  2:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 20:15 [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab Leonardo Bras
2023-02-01 22:13 ` Paul E. McKenney
2023-02-02  1:49   ` Akira Yokosawa
2023-02-02  1:53     ` Paul E. McKenney
2023-02-02  2:05       ` Leonardo Brás
2023-02-02  4:37         ` Leonardo Brás
2023-02-02 14:42           ` Akira Yokosawa
2023-02-02 16:52             ` Leonardo Brás
2023-02-02 23:23               ` Akira Yokosawa
2023-02-02 23:31                 ` Paul E. McKenney
2023-02-02 23:51                   ` Akira Yokosawa
2023-02-03  0:05                     ` Paul E. McKenney
2023-02-03  2:19                       ` Leonardo Brás

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox