gitlab CI - stage beta, testers needed

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: gitlab CI - stage beta, testers needed

Post by PrzemoF »

A bash script + some vim magic. More info soon...

Edit: check the opening post of this topic, point 4 of TODO
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

PrzemoF wrote: Mon Sep 20, 2021 7:08 pm A bash script + some vim magic. More info soon...

Edit: check the opening post of this topic, point 4 of TODO
wow cool stuff ... I never really got familar with bash scripts :oops:


BTW: interesting reads in this regard ...

- https://github.com/d-e-s-o/github-pull-request-mirror
- https://github.com/ubc/github2gitlab
- https://blog.raw.pm/en/gitlab-github-sync/
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

wrote a little script to create a branch of each PR. But I used gitpython and pygithub.

I still need to make it run automatically.

Furthermore IMHO the rebase should be done by the the one who made the PR !

See https://gitlab.com/berndhahnebach/FreeCAD/-/branches but ATM only two run ... https://gitlab.com/berndhahnebach/FreeCAD/-/pipelines
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: gitlab CI - stage beta, testers needed

Post by jonasb »

I just stumbled upon this interesting project here: https://github.com/sickcodes/Docker-OSX

It offers docker images that can be run on Linux (even on Windows, via WSL2) and host a qemu/kvm-based VM with macOS inside. Using this, it should be possible to extend the GitLab-CI with build/test for macOS without the need to actual Apple hardware.
And with control over the actual image, the setup needs only to be done once, opposed to the prior travis build that took ages because it had to install all the tooling on each build again (IIRC).

So in case anyone wants to give it try -- not owning a Mac is not an excuse any more ;-)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

great OSX would be great ...

Attached some more information about other systems ...
PrzemoF wrote: Tue Sep 28, 2021 5:22 pm ... Building on other system is possible. Inkscape has it: https://gitlab.com/inkscape/inkscape/bl ... lab-ci.yml
But I didn't do any research, beside asking the guy behind it. That's from fosstodon conversation:

"Przemo
@przemo@fosstodon.org

@ted Hi Ted, I'm currently testing gitlab as a potential destination for migration of FreeCAD project. We have the same characteristics as Inkscape (large code, long compilation, C/C++, long tests) and I came across your blog entry (sounds so much like spam - sorry for that). I see that Inkscape managed to get windows and macos compilation directly on gitlab? How you did that? A special gift from gitlab? Regards, Przemo przemo@firszt.eu
Jul 26, 2021, 23:02 · · 0
Jul 26
Ted Gould @ted@gould.cx

@przemo for Windows Gitlab is adding support in the free runners. But for both right now we're using our own CI runners that our devs have. The free runners will probably work for Windows long term, but we don't have a better answer for OSX yet."

Thats the blog: https://gould.cx/ted/blog/2017/06/15/Re ... th-Gitlab/
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

As I finished some improvements on the scripts to run the PR branches I would like to add a newer Linux distribution to the FreeCAD-CI ...

But to be honest. I have no idea how to set up this because this work was all done by Przemo
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

PrzemoF wrote: :bell:
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: gitlab CI - stage beta, testers needed

Post by PrzemoF »

Hi bernd, OSX is not my thing.. I tried some initial research, but I don't thing there was a viable solution. Other linuxes should be doable. What distro?

P.S. I need to read my notes, but the solution with ubuntu is bulletproof - I didn't do anything for months and my laptop still builds FreeCAD from gitlab when I push a branch :ugeek:
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: gitlab CI - stage beta, testers needed

Post by adrianinsaval »

bernd wrote: Wed Jul 06, 2022 8:47 pm I would like to add a newer Linux distribution to the FreeCAD-CI ...
Problem is FreeCAD's dependencies are broken in ubuntu 22.04 if I'm not mistaken, so we would also need someone that maintains those in the ppa for 22.04, other distros should be possible as long as you know how to setup all dependencies. Here's the dockerfile that is supposed to be used by the ci: https://gitlab.com/berndhahnebach/FreeC ... Dockerfile
who's machine is getting used as build server these days?
here some other dockerfiles for other distros in the source repo: https://github.com/FreeCAD/FreeCAD/tree ... ools/build
perhaps it's better to use (and update if necessary) those instead of having a separate one for the ci
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: gitlab CI - stage beta, testers needed

Post by bernd »

I would like to start with a newer version of ubuntu or with Debian Stable.

CI repository:
This is the repository: https://gitlab.com/freecad/FreeCAD-CI means the docker file is here https://gitlab.com/freecad/FreeCAD-CI/- ... Dockerfile. FreeCAD master and all new PRs are regullarly updated.

build server:
The code is copiled on a little machine just here (Winterthur Switzerland) beside me in the desk. This machine runs Debian Stable and only does compile FreeCAD in the docker. It is headless. It is a HP Elite Desk i5.

cheers bernd
Post Reply