* [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
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
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
0 siblings, 1 reply; 13+ messages in thread
From: Paul E. McKenney @ 2023-02-01 22:13 UTC (permalink / raw)
To: Leonardo Bras; +Cc: perfbook
On Wed, Feb 01, 2023 at 05:15:29PM -0300, Leonardo Bras wrote:
> 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>
Queued and pushed, thank you! Let's see how github (as oppoed to your
gitlab) reacts to this. ;-)
Thanx, Paul
> ---
> .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 [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-01 22:13 ` Paul E. McKenney
@ 2023-02-02 1:49 ` Akira Yokosawa
2023-02-02 1:53 ` Paul E. McKenney
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-02-02 1:49 UTC (permalink / raw)
To: paulmck, Leonardo Bras; +Cc: perfbook
Hi,
On Wed, 1 Feb 2023 14:13:02 -0800, Paul E. McKenney wrote:
> On Wed, Feb 01, 2023 at 05:15:29PM -0300, Leonardo Bras wrote:
>> 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>
>
> Queued and pushed, thank you! Let's see how github (as oppoed to your
> gitlab) reacts to this. ;-)
I happen to have a perfbook repo at gitlab where CI is not set up.
When I pushed this change, I got a mail from gitlab saying:
> Subject: perfbook | Failed pipeline for gitlab-ci | 55c81b9b
>
> Pipeline #764856510 has failed!
I don't think it is reasonable for Paul's repo to have gitlab
specific settings like this.
Paul, can you please revert this?
Thanks, Akira
>
> Thanx, Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 1:49 ` Akira Yokosawa
@ 2023-02-02 1:53 ` Paul E. McKenney
2023-02-02 2:05 ` Leonardo Brás
0 siblings, 1 reply; 13+ messages in thread
From: Paul E. McKenney @ 2023-02-02 1:53 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: Leonardo Bras, perfbook
On Thu, Feb 02, 2023 at 10:49:15AM +0900, Akira Yokosawa wrote:
> Hi,
>
> On Wed, 1 Feb 2023 14:13:02 -0800, Paul E. McKenney wrote:
> > On Wed, Feb 01, 2023 at 05:15:29PM -0300, Leonardo Bras wrote:
> >> 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>
> >
> > Queued and pushed, thank you! Let's see how github (as oppoed to your
> > gitlab) reacts to this. ;-)
>
> I happen to have a perfbook repo at gitlab where CI is not set up.
> When I pushed this change, I got a mail from gitlab saying:
>
> > Subject: perfbook | Failed pipeline for gitlab-ci | 55c81b9b
> >
> > Pipeline #764856510 has failed!
>
> I don't think it is reasonable for Paul's repo to have gitlab
> specific settings like this.
>
> Paul, can you please revert this?
Done, and apologies!
Leonardo, would another approach be to create a separate branch in your
repo that contained this file, then automatically cherry-pick or merge it
with each perfbook update?
Thanx, Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 1:53 ` Paul E. McKenney
@ 2023-02-02 2:05 ` Leonardo Brás
2023-02-02 4:37 ` Leonardo Brás
0 siblings, 1 reply; 13+ messages in thread
From: Leonardo Brás @ 2023-02-02 2:05 UTC (permalink / raw)
To: paulmck, Akira Yokosawa; +Cc: perfbook
On Wed, 2023-02-01 at 17:53 -0800, Paul E. McKenney wrote:
> On Thu, Feb 02, 2023 at 10:49:15AM +0900, Akira Yokosawa wrote:
> > Hi,
> >
> > On Wed, 1 Feb 2023 14:13:02 -0800, Paul E. McKenney wrote:
> > > On Wed, Feb 01, 2023 at 05:15:29PM -0300, Leonardo Bras wrote:
> > > > 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>
> > >
> > > Queued and pushed, thank you! Let's see how github (as oppoed to your
> > > gitlab) reacts to this. ;-)
> >
> > I happen to have a perfbook repo at gitlab where CI is not set up.
> > When I pushed this change, I got a mail from gitlab saying:
> >
> > > Subject: perfbook | Failed pipeline for gitlab-ci | 55c81b9b
> > >
> > > Pipeline #764856510 has failed!
That's odd, I wonder why have it failed.
> >
> > I don't think it is reasonable for Paul's repo to have gitlab
> > specific settings like this.
> >
> > Paul, can you please revert this?
>
> Done, and apologies!
>
> Leonardo, would another approach be to create a separate branch in your
> repo that contained this file, then automatically cherry-pick or merge it
> with each perfbook update?
>
> Thanx, Paul
Sure, that would work much better, but I need to find out how to do this on
Gitlab side.
I will reply here when I find any answers.
Thanks!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 2:05 ` Leonardo Brás
@ 2023-02-02 4:37 ` Leonardo Brás
2023-02-02 14:42 ` Akira Yokosawa
0 siblings, 1 reply; 13+ messages in thread
From: Leonardo Brás @ 2023-02-02 4:37 UTC (permalink / raw)
To: paulmck, Akira Yokosawa; +Cc: perfbook
On Wed, 2023-02-01 at 23:05 -0300, Leonardo Brás wrote:
> On Wed, 2023-02-01 at 17:53 -0800, Paul E. McKenney wrote:
> > On Thu, Feb 02, 2023 at 10:49:15AM +0900, Akira Yokosawa wrote:
> > > Hi,
> > >
> > > On Wed, 1 Feb 2023 14:13:02 -0800, Paul E. McKenney wrote:
> > > > On Wed, Feb 01, 2023 at 05:15:29PM -0300, Leonardo Bras wrote:
> > > > > 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>
> > > >
> > > > Queued and pushed, thank you! Let's see how github (as oppoed to your
> > > > gitlab) reacts to this. ;-)
> > >
> > > I happen to have a perfbook repo at gitlab where CI is not set up.
> > > When I pushed this change, I got a mail from gitlab saying:
> > >
> > > > Subject: perfbook | Failed pipeline for gitlab-ci | 55c81b9b
> > > >
> > > > Pipeline #764856510 has failed!
>
> That's odd, I wonder why have it failed.
>
> > >
> > > I don't think it is reasonable for Paul's repo to have gitlab
> > > specific settings like this.
> > >
> > > Paul, can you please revert this?
> >
> > Done, and apologies!
> >
> > Leonardo, would another approach be to create a separate branch in your
> > repo that contained this file, then automatically cherry-pick or merge it
> > with each perfbook update?
> >
> > Thanx, Paul
>
> Sure, that would work much better, but I need to find out how to do this on
> Gitlab side.
>
> I will reply here when I find any answers.
>
> Thanks!
>
It looks like it can be done by "Running CI/CD for external repositories".
I removed my previous repository and then imported perfbook again using the
above mentioned mode. According to the man page, it will run CI for the project
whenever a new push to the referenced repository happens.
So it's just a matter of waiting a new commit getting push'ed to see if it will
be working.
Best regards,
Leo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 4:37 ` Leonardo Brás
@ 2023-02-02 14:42 ` Akira Yokosawa
2023-02-02 16:52 ` Leonardo Brás
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-02-02 14:42 UTC (permalink / raw)
To: Leonardo Brás; +Cc: perfbook, paulmck
On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
[...]
>
> It looks like it can be done by "Running CI/CD for external repositories".
>
> I removed my previous repository and then imported perfbook again using the
> above mentioned mode. According to the man page, it will run CI for the project
> whenever a new push to the referenced repository happens.
>
> So it's just a matter of waiting a new commit getting push'ed to see if it will
> be working.
Hi Leonardo,
I noticed a minor glitch in the generated PDFs.
They don't have Git commit info in the title page and footer area of
pages.
I can't tell what went wrong, but expected autodate.tex should look like:
-----
\date{February 1, 2023 \\ Commit: \texttt{v2022.09.25a-81-g4327c1f3809e}}
\newcommand{\commityear}{2023}
\newcommand{\commitid}{v2022.09.25a-81-g4327c1f3809e}
\IfQqzBg{}{\setboolean{qqzbg}{false}}
% tcolorbox version: 5.1
\tcbsetforeverylayer{autoparskip}
-----
It is not kept in the artifact, so I'm just guessing.
I guess utilities/autodate.sh failed to see .git/ in the build directory
and generated the following based on the build date instead:
-----
\date{February 2, 2023 }
\newcommand{\commityear}{2023}
\newcommand{\commitid}{}
\IfQqzBg{}{\setboolean{qqzbg}{false}}
% tcolorbox version: 5.1
\tcbsetforeverylayer{autoparskip}
-----
Not a big deal, but can you look into this?
BTW, I just requested a permission for accessing your repo.
Thanks, Akira
>
> Best regards,
> Leo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 14:42 ` Akira Yokosawa
@ 2023-02-02 16:52 ` Leonardo Brás
2023-02-02 23:23 ` Akira Yokosawa
0 siblings, 1 reply; 13+ messages in thread
From: Leonardo Brás @ 2023-02-02 16:52 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook, paulmck
On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
> On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
> [...]
> >
> > It looks like it can be done by "Running CI/CD for external repositories".
Nah, it looks like this won't work either. After my patch on top of master, it's
already warning about diverging repositories when I try to sync.
Another solution I could find:
- Change the patch I sent before to keep the file on another directory, even
with a different name: this will not trigger the build for anyone.
- Change my repository config to trigger the CI from that file.
The file would only be a random YML file in the repo.
Would that be ok?
> >
> > I removed my previous repository and then imported perfbook again using the
> > above mentioned mode. According to the man page, it will run CI for the project
> > whenever a new push to the referenced repository happens.
> >
> > So it's just a matter of waiting a new commit getting push'ed to see if it will
> > be working.
>
> Hi Leonardo,
>
> I noticed a minor glitch in the generated PDFs.
> They don't have Git commit info in the title page and footer area of
> pages.
>
> I can't tell what went wrong, but expected autodate.tex should look like:
I found it out: gitlab was doing a shallow clone, and the previous tag was not
in the commits, so I modified the Gitlab config so it does a complete clone of
the repository instead.
The last output of the pipeline seems to have been correct, please check:
https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
>
> -----
> \date{February 1, 2023 \\ Commit: \texttt{v2022.09.25a-81-g4327c1f3809e}}
> \newcommand{\commityear}{2023}
> \newcommand{\commitid}{v2022.09.25a-81-g4327c1f3809e}
> \IfQqzBg{}{\setboolean{qqzbg}{false}}
> % tcolorbox version: 5.1
> \tcbsetforeverylayer{autoparskip}
> -----
>
> It is not kept in the artifact, so I'm just guessing.
> I guess utilities/autodate.sh failed to see .git/ in the build directory
> and generated the following based on the build date instead:
>
> -----
> \date{February 2, 2023 }
> \newcommand{\commityear}{2023}
> \newcommand{\commitid}{}
> \IfQqzBg{}{\setboolean{qqzbg}{false}}
> % tcolorbox version: 5.1
> \tcbsetforeverylayer{autoparskip}
> -----
>
> Not a big deal, but can you look into this?
>
> BTW, I just requested a permission for accessing your repo.
Let's put that on hold: I think it will be necessary to delete this repo and
import again from kernel.org if the pipeline don't work fine for next commits.
>
> Thanks, Akira
>
>
Thank you for reporting the issue!
Best regards,
Leo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 16:52 ` Leonardo Brás
@ 2023-02-02 23:23 ` Akira Yokosawa
2023-02-02 23:31 ` Paul E. McKenney
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-02-02 23:23 UTC (permalink / raw)
To: Leonardo Brás; +Cc: perfbook, paulmck
Hi,
On Thu, 02 Feb 2023 13:52:08 -0300, Leonardo Brás wrote:
> On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
>> On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
>> [...]
>>>
>>> It looks like it can be done by "Running CI/CD for external repositories".
>
> Nah, it looks like this won't work either. After my patch on top of master, it's
> already warning about diverging repositories when I try to sync.
>
> Another solution I could find:
> - Change the patch I sent before to keep the file on another directory, even
> with a different name: this will not trigger the build for anyone.
> - Change my repository config to trigger the CI from that file.
>
> The file would only be a random YML file in the repo.
> Would that be ok?
Hmm, yes, I think I can live with it.
>
>>>
>>> I removed my previous repository and then imported perfbook again using the
>>> above mentioned mode. According to the man page, it will run CI for the project
>>> whenever a new push to the referenced repository happens.
>>>
>>> So it's just a matter of waiting a new commit getting push'ed to see if it will
>>> be working.
>>
>> Hi Leonardo,
>>
>> I noticed a minor glitch in the generated PDFs.
>> They don't have Git commit info in the title page and footer area of
>> pages.
>>
>> I can't tell what went wrong, but expected autodate.tex should look like:
>
> I found it out: gitlab was doing a shallow clone, and the previous tag was not
> in the commits, so I modified the Gitlab config so it does a complete clone of
> the repository instead.
Aha! The script has never tested under a shallow clone...
Let me see if I can improve its behavior.
> The last output of the pipeline seems to have been correct, please check:
> https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
Apparently, the commit id does not make sense in Paul's repo.
But the random YML file approach should resolve it.
Thanks, Akira
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 23:23 ` Akira Yokosawa
@ 2023-02-02 23:31 ` Paul E. McKenney
2023-02-02 23:51 ` Akira Yokosawa
0 siblings, 1 reply; 13+ messages in thread
From: Paul E. McKenney @ 2023-02-02 23:31 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: Leonardo Brás, perfbook
On Fri, Feb 03, 2023 at 08:23:05AM +0900, Akira Yokosawa wrote:
> Hi,
>
> On Thu, 02 Feb 2023 13:52:08 -0300, Leonardo Brás wrote:
> > On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
> >> On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
> >> [...]
> >>>
> >>> It looks like it can be done by "Running CI/CD for external repositories".
> >
> > Nah, it looks like this won't work either. After my patch on top of master, it's
> > already warning about diverging repositories when I try to sync.
> >
> > Another solution I could find:
> > - Change the patch I sent before to keep the file on another directory, even
> > with a different name: this will not trigger the build for anyone.
> > - Change my repository config to trigger the CI from that file.
> >
> > The file would only be a random YML file in the repo.
> > Would that be ok?
>
> Hmm, yes, I think I can live with it.
>
> >
> >>>
> >>> I removed my previous repository and then imported perfbook again using the
> >>> above mentioned mode. According to the man page, it will run CI for the project
> >>> whenever a new push to the referenced repository happens.
> >>>
> >>> So it's just a matter of waiting a new commit getting push'ed to see if it will
> >>> be working.
> >>
> >> Hi Leonardo,
> >>
> >> I noticed a minor glitch in the generated PDFs.
> >> They don't have Git commit info in the title page and footer area of
> >> pages.
> >>
> >> I can't tell what went wrong, but expected autodate.tex should look like:
> >
> > I found it out: gitlab was doing a shallow clone, and the previous tag was not
> > in the commits, so I modified the Gitlab config so it does a complete clone of
> > the repository instead.
>
> Aha! The script has never tested under a shallow clone...
> Let me see if I can improve its behavior.
>
> > The last output of the pipeline seems to have been correct, please check:
> > https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
>
> Apparently, the commit id does not make sense in Paul's repo.
> But the random YML file approach should resolve it.
Apologies, I left it untracked. There is now a Leonardo.2023.02.01a
branch that references it.
Thanx, Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 23:31 ` Paul E. McKenney
@ 2023-02-02 23:51 ` Akira Yokosawa
2023-02-03 0:05 ` Paul E. McKenney
0 siblings, 1 reply; 13+ messages in thread
From: Akira Yokosawa @ 2023-02-02 23:51 UTC (permalink / raw)
To: paulmck; +Cc: Leonardo Brás, perfbook
On Thu, 2 Feb 2023 15:31:27 -0800, Paul E. McKenney wrote:
> On Fri, Feb 03, 2023 at 08:23:05AM +0900, Akira Yokosawa wrote:
>> Hi,
>>
>> On Thu, 02 Feb 2023 13:52:08 -0300, Leonardo Brás wrote:
>>> On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
>>>> On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
>>>> [...]
>>>>>
>>>>> It looks like it can be done by "Running CI/CD for external repositories".
>>>
>>> Nah, it looks like this won't work either. After my patch on top of master, it's
>>> already warning about diverging repositories when I try to sync.
>>>
>>> Another solution I could find:
>>> - Change the patch I sent before to keep the file on another directory, even
>>> with a different name: this will not trigger the build for anyone.
>>> - Change my repository config to trigger the CI from that file.
>>>
>>> The file would only be a random YML file in the repo.
>>> Would that be ok?
>>
>> Hmm, yes, I think I can live with it.
>>
>>>
>>>>>
>>>>> I removed my previous repository and then imported perfbook again using the
>>>>> above mentioned mode. According to the man page, it will run CI for the project
>>>>> whenever a new push to the referenced repository happens.
>>>>>
>>>>> So it's just a matter of waiting a new commit getting push'ed to see if it will
>>>>> be working.
>>>>
>>>> Hi Leonardo,
>>>>
>>>> I noticed a minor glitch in the generated PDFs.
>>>> They don't have Git commit info in the title page and footer area of
>>>> pages.
>>>>
>>>> I can't tell what went wrong, but expected autodate.tex should look like:
>>>
>>> I found it out: gitlab was doing a shallow clone, and the previous tag was not
>>> in the commits, so I modified the Gitlab config so it does a complete clone of
>>> the repository instead.
>>
>> Aha! The script has never tested under a shallow clone...
>> Let me see if I can improve its behavior.
>>
>>> The last output of the pipeline seems to have been correct, please check:
>>> https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
>>
>> Apparently, the commit id does not make sense in Paul's repo.
>> But the random YML file approach should resolve it.
>
> Apologies, I left it untracked. There is now a Leonardo.2023.02.01a
> branch that references it.
I mean the commit id 81974e57 presented in the artifacts is of the commit
Leonardo made on his own:
https://gitlab.com/linux-kernel/perfbook/-/commit/81974e57bed4
Thanks, Akira
>
> Thanx, Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-02 23:51 ` Akira Yokosawa
@ 2023-02-03 0:05 ` Paul E. McKenney
2023-02-03 2:19 ` Leonardo Brás
0 siblings, 1 reply; 13+ messages in thread
From: Paul E. McKenney @ 2023-02-03 0:05 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: Leonardo Brás, perfbook
On Fri, Feb 03, 2023 at 08:51:04AM +0900, Akira Yokosawa wrote:
> On Thu, 2 Feb 2023 15:31:27 -0800, Paul E. McKenney wrote:
> > On Fri, Feb 03, 2023 at 08:23:05AM +0900, Akira Yokosawa wrote:
> >> Hi,
> >>
> >> On Thu, 02 Feb 2023 13:52:08 -0300, Leonardo Brás wrote:
> >>> On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
> >>>> On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
> >>>> [...]
> >>>>>
> >>>>> It looks like it can be done by "Running CI/CD for external repositories".
> >>>
> >>> Nah, it looks like this won't work either. After my patch on top of master, it's
> >>> already warning about diverging repositories when I try to sync.
> >>>
> >>> Another solution I could find:
> >>> - Change the patch I sent before to keep the file on another directory, even
> >>> with a different name: this will not trigger the build for anyone.
> >>> - Change my repository config to trigger the CI from that file.
> >>>
> >>> The file would only be a random YML file in the repo.
> >>> Would that be ok?
> >>
> >> Hmm, yes, I think I can live with it.
> >>
> >>>
> >>>>>
> >>>>> I removed my previous repository and then imported perfbook again using the
> >>>>> above mentioned mode. According to the man page, it will run CI for the project
> >>>>> whenever a new push to the referenced repository happens.
> >>>>>
> >>>>> So it's just a matter of waiting a new commit getting push'ed to see if it will
> >>>>> be working.
> >>>>
> >>>> Hi Leonardo,
> >>>>
> >>>> I noticed a minor glitch in the generated PDFs.
> >>>> They don't have Git commit info in the title page and footer area of
> >>>> pages.
> >>>>
> >>>> I can't tell what went wrong, but expected autodate.tex should look like:
> >>>
> >>> I found it out: gitlab was doing a shallow clone, and the previous tag was not
> >>> in the commits, so I modified the Gitlab config so it does a complete clone of
> >>> the repository instead.
> >>
> >> Aha! The script has never tested under a shallow clone...
> >> Let me see if I can improve its behavior.
> >>
> >>> The last output of the pipeline seems to have been correct, please check:
> >>> https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
> >>
> >> Apparently, the commit id does not make sense in Paul's repo.
> >> But the random YML file approach should resolve it.
> >
> > Apologies, I left it untracked. There is now a Leonardo.2023.02.01a
> > branch that references it.
>
> I mean the commit id 81974e57 presented in the artifacts is of the commit
> Leonardo made on his own:
>
> https://gitlab.com/linux-kernel/perfbook/-/commit/81974e57bed4
You are right, that is not the Leonardo.2023.02.01a commit. Apologies
for my confusion!
Thanx, Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Add .gitlab-ci.yml for pdf generation and testing on Gitlab.
2023-02-03 0:05 ` Paul E. McKenney
@ 2023-02-03 2:19 ` Leonardo Brás
0 siblings, 0 replies; 13+ messages in thread
From: Leonardo Brás @ 2023-02-03 2:19 UTC (permalink / raw)
To: paulmck, Akira Yokosawa; +Cc: perfbook
On Thu, 2023-02-02 at 16:05 -0800, Paul E. McKenney wrote:
> On Fri, Feb 03, 2023 at 08:51:04AM +0900, Akira Yokosawa wrote:
> > On Thu, 2 Feb 2023 15:31:27 -0800, Paul E. McKenney wrote:
> > > On Fri, Feb 03, 2023 at 08:23:05AM +0900, Akira Yokosawa wrote:
> > > > Hi,
> > > >
> > > > On Thu, 02 Feb 2023 13:52:08 -0300, Leonardo Brás wrote:
> > > > > On Thu, 2023-02-02 at 23:42 +0900, Akira Yokosawa wrote:
> > > > > > On Thu, 02 Feb 2023 01:37:02 -0300, Leonardo Brás wrote:
> > > > > > [...]
> > > > > > >
> > > > > > > It looks like it can be done by "Running CI/CD for external repositories".
> > > > >
> > > > > Nah, it looks like this won't work either. After my patch on top of master, it's
> > > > > already warning about diverging repositories when I try to sync.
> > > > >
> > > > > Another solution I could find:
> > > > > - Change the patch I sent before to keep the file on another directory, even
> > > > > with a different name: this will not trigger the build for anyone.
> > > > > - Change my repository config to trigger the CI from that file.
> > > > >
> > > > > The file would only be a random YML file in the repo.
> > > > > Would that be ok?
> > > >
> > > > Hmm, yes, I think I can live with it.
Great!
I created a patch for including the new yml file.
I created a new repo mirroring from the kernel.org repo, and created a new
branch with the above patch. Nothing happened on push.
Then I configured the correct yml file on Gitlab (details on the patch), and a
new push trigered the pipelines, so the desired effect was achieved.
> > > >
> > > > >
> > > > > > >
> > > > > > > I removed my previous repository and then imported perfbook again using the
> > > > > > > above mentioned mode. According to the man page, it will run CI for the project
> > > > > > > whenever a new push to the referenced repository happens.
> > > > > > >
> > > > > > > So it's just a matter of waiting a new commit getting push'ed to see if it will
> > > > > > > be working.
> > > > > >
> > > > > > Hi Leonardo,
> > > > > >
> > > > > > I noticed a minor glitch in the generated PDFs.
> > > > > > They don't have Git commit info in the title page and footer area of
> > > > > > pages.
> > > > > >
> > > > > > I can't tell what went wrong, but expected autodate.tex should look like:
> > > > >
> > > > > I found it out: gitlab was doing a shallow clone, and the previous tag was not
> > > > > in the commits, so I modified the Gitlab config so it does a complete clone of
> > > > > the repository instead.
> > > >
> > > > Aha! The script has never tested under a shallow clone...
> > > > Let me see if I can improve its behavior.
> > > >
> > > > > The last output of the pipeline seems to have been correct, please check:
> > > > > https://gitlab.com/linux-kernel/perfbook/-/jobs/3705185694/artifacts/browse
> > > >
> > > > Apparently, the commit id does not make sense in Paul's repo.
Yes, it was a commit in my personal tree.
> > > > But the random YML file approach should resolve it.
Agree.
> > >
> > > Apologies, I left it untracked. There is now a Leonardo.2023.02.01a
> > > branch that references it.
> >
> > I mean the commit id 81974e57 presented in the artifacts is of the commit
> > Leonardo made on his own:
> >
> > https://gitlab.com/linux-kernel/perfbook/-/commit/81974e57bed4
>
> You are right, that is not the Leonardo.2023.02.01a commit. Apologies
> for my confusion!
>
> Thanx, Paul
Please take a look in the new patch, it should sort everything out.
Best regards,
Leo
^ permalink raw reply [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