All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.
@ 2023-02-03  2:18 Leonardo Bras
  2023-02-03  3:03 ` Akira Yokosawa
  0 siblings, 1 reply; 5+ messages in thread
From: Leonardo Bras @ 2023-02-03  2:18 UTC (permalink / raw)
  To: Paul E . McKenney; +Cc: Leonardo Bras, Akira Yokosawa, perfbook

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

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

diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
new file mode 100644
index 00000000..acc12fb2
--- /dev/null
+++ b/utilities/gitlab-ci.yml
@@ -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.39.1


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

* Re: [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.
  2023-02-03  2:18 [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab Leonardo Bras
@ 2023-02-03  3:03 ` Akira Yokosawa
  2023-02-03  4:48   ` Paul E. McKenney
  0 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2023-02-03  3:03 UTC (permalink / raw)
  To: Leonardo Bras, Paul E . McKenney; +Cc: perfbook, Akira Yokosawa

On Thu,  2 Feb 2023 23:18:55 -0300, Leonardo Bras wrote:
> 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
> 
> Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
> ---
>  utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 utilities/gitlab-ci.yml

Reviewed-by: Akira Yokosawa <akiyks@gmail.com>

> 
> diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
> new file mode 100644
> index 00000000..acc12fb2
> --- /dev/null
> +++ b/utilities/gitlab-ci.yml
> @@ -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



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

* Re: [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.
  2023-02-03  3:03 ` Akira Yokosawa
@ 2023-02-03  4:48   ` Paul E. McKenney
  2023-02-03  5:30     ` Leonardo Brás
  0 siblings, 1 reply; 5+ messages in thread
From: Paul E. McKenney @ 2023-02-03  4:48 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: Leonardo Bras, perfbook

On Fri, Feb 03, 2023 at 12:03:18PM +0900, Akira Yokosawa wrote:
> On Thu,  2 Feb 2023 23:18:55 -0300, Leonardo Bras wrote:
> > 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
> > 
> > Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
> > ---
> >  utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >  create mode 100644 utilities/gitlab-ci.yml
> 
> Reviewed-by: Akira Yokosawa <akiyks@gmail.com>

Queued and pushed, thank you both!

							Thanx, Paul

> > diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
> > new file mode 100644
> > index 00000000..acc12fb2
> > --- /dev/null
> > +++ b/utilities/gitlab-ci.yml
> > @@ -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
> 
> 

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

* Re: [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.
  2023-02-03  4:48   ` Paul E. McKenney
@ 2023-02-03  5:30     ` Leonardo Brás
  2023-02-03  5:43       ` Paul E. McKenney
  0 siblings, 1 reply; 5+ messages in thread
From: Leonardo Brás @ 2023-02-03  5:30 UTC (permalink / raw)
  To: paulmck, Akira Yokosawa; +Cc: perfbook

On Thu, 2023-02-02 at 20:48 -0800, Paul E. McKenney wrote:
> On Fri, Feb 03, 2023 at 12:03:18PM +0900, Akira Yokosawa wrote:
> > On Thu,  2 Feb 2023 23:18:55 -0300, Leonardo Bras wrote:
> > > 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
> > > 
> > > Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
> > > ---
> > >  utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
> > >  1 file changed, 33 insertions(+)
> > >  create mode 100644 utilities/gitlab-ci.yml
> > 
> > Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
> 
> 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

> 							Thanx, Paul
> 
> > > diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
> > > new file mode 100644
> > > index 00000000..acc12fb2
> > > --- /dev/null
> > > +++ b/utilities/gitlab-ci.yml
> > > @@ -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
> > 
> > 


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

* Re: [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab.
  2023-02-03  5:30     ` Leonardo Brás
@ 2023-02-03  5:43       ` Paul E. McKenney
  0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2023-02-03  5:43 UTC (permalink / raw)
  To: Leonardo Brás; +Cc: Akira Yokosawa, perfbook

On Fri, Feb 03, 2023 at 02:30:04AM -0300, Leonardo Brás wrote:
> On Thu, 2023-02-02 at 20:48 -0800, Paul E. McKenney wrote:
> > On Fri, Feb 03, 2023 at 12:03:18PM +0900, Akira Yokosawa wrote:
> > > On Thu,  2 Feb 2023 23:18:55 -0300, Leonardo Bras wrote:
> > > > 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
> > > > 
> > > > Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
> > > > ---
> > > >  utilities/gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++
> > > >  1 file changed, 33 insertions(+)
> > > >  create mode 100644 utilities/gitlab-ci.yml
> > > 
> > > Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
> > 
> > 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.

Good to hear!

							Thanx, Paul

> Best regards,
> Leo
> 
> > 							Thanx, Paul
> > 
> > > > diff --git a/utilities/gitlab-ci.yml b/utilities/gitlab-ci.yml
> > > > new file mode 100644
> > > > index 00000000..acc12fb2
> > > > --- /dev/null
> > > > +++ b/utilities/gitlab-ci.yml
> > > > @@ -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
> > > 
> > > 
> 

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03  2:18 [PATCH v2] Add utilities/gitlab-ci.yml for pdf generation and testing on Gitlab Leonardo Bras
2023-02-03  3:03 ` Akira Yokosawa
2023-02-03  4:48   ` Paul E. McKenney
2023-02-03  5:30     ` Leonardo Brás
2023-02-03  5:43       ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.