Skip to contentSkip to conversation

Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.

PATCH Applied Leonardo Bras 3 participants 5 messages Feb 3, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.

For Gitlab repositories mirroring the original repository, trigger the Gitlab-CI after every push to the original repo.

For the pipeline to run, the Gitlab repo needs to configure:
- Settings -> CI/CD -> General Pipelines -> CI/CD configuration file to utilities/gitlab-ci.yml

What the pipeline does:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

---
 utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 utilities/gitlab-ci.yml
utilities/gitlab-ci.yml new file +33 -0
new file mode 100644
index 00000000..acc12fb2
@@ -0,0 +1,33 @@
+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
Signature · 1 line
2.39.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Leonardo Bras

For Gitlab repositories mirroring the original repository, trigger the Gitlab-CI after every push to the original repo.

For the pipeline to run, the Gitlab repo needs to configure:
- Settings -> CI/CD -> General Pipelines -> CI/CD configuration file to utilities/gitlab-ci.yml

What the pipeline does:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

Quoted 5 lines
---
 utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 utilities/gitlab-ci.yml
Quoted 40 lines
utilities/gitlab-ci.yml new file +33 -0
new file mode 100644
index 00000000..acc12fb2
@@ -0,0 +1,33 @@
+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 lore raw
Quoted 12 lines · Akira Yokosawa
Quoted 11 lines · Leonardo Bras

For Gitlab repositories mirroring the original repository, trigger the Gitlab-CI after every push to the original repo.

For the pipeline to run, the Gitlab repo needs to configure:
- Settings -> CI/CD -> General Pipelines -> CI/CD configuration file to utilities/gitlab-ci.yml

What the pipeline does:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

Quoted 7 lines
Quoted 5 lines
---
 utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 utilities/gitlab-ci.yml

Queued and pushed, thank you both!

Thanx, Paul

Quoted 41 lines
Quoted 39 lines
utilities/gitlab-ci.yml new file +33 -0
new file mode 100644
index 00000000..acc12fb2
@@ -0,0 +1,33 @@
+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
#3 lore raw
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Akira Yokosawa
Quoted 16 lines · Leonardo Bras

For Gitlab repositories mirroring the original repository, trigger the Gitlab-CI after every push to the original repo.

For the pipeline to run, the Gitlab repo needs to configure:
- Settings -> CI/CD -> General Pipelines -> CI/CD configuration file to utilities/gitlab-ci.yml

What the pipeline does:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

---
 utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 utilities/gitlab-ci.yml
Quoted 4 lines
Quoted 1 line

Queued and pushed, thank you both!

Thank you guys for accepting it!

The last commit automatically got mirrored to my Gitlab repo, and triggered the pipeline, which succeed.

The following link points all pipelines ran and their results:
https://gitlab.com/linux-kernel/perfbook/-/pipelines

For downloading the pdfs generated, you only need to click the rightmost button for the pipeline, then "generate_pdfs:archive".

I just checked and the commit number seems correct now with the full git clone.

Best regards,
Leo

Quoted 43 lines

Thanx, Paul

Quoted 41 lines
Quoted 39 lines
utilities/gitlab-ci.yml new file +33 -0
new file mode 100644
index 00000000..acc12fb2
@@ -0,0 +1,33 @@
+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
#4 lore raw
Quoted 30 lines · Leonardo Brás
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Akira Yokosawa
Quoted 16 lines · Leonardo Bras

For Gitlab repositories mirroring the original repository, trigger the Gitlab-CI after every push to the original repo.

For the pipeline to run, the Gitlab repo needs to configure:
- Settings -> CI/CD -> General Pipelines -> CI/CD configuration file to utilities/gitlab-ci.yml

What the pipeline does:
- Compile-test CodeSamples
- IF pass, build PDFs: regular, 1c, eb

---
 utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 utilities/gitlab-ci.yml
Quoted 4 lines
Quoted 1 line

Queued and pushed, thank you both!

Thank you guys for accepting it!

The last commit automatically got mirrored to my Gitlab repo, and triggered the pipeline, which succeed.

Quoted 7 lines

The following link points all pipelines ran and their results:
https://gitlab.com/linux-kernel/perfbook/-/pipelines

For downloading the pdfs generated, you only need to click the rightmost button for the pipeline, then "generate_pdfs:archive".

I just checked and the commit number seems correct now with the full git clone.

Good to hear!

Thanx, Paul

Quoted 47 lines

Best regards,
Leo

Quoted 43 lines

Thanx, Paul

Quoted 41 lines
Quoted 39 lines
utilities/gitlab-ci.yml new file +33 -0
new file mode 100644
index 00000000..acc12fb2
@@ -0,0 +1,33 @@
+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