Changes at TravisCI- affecting open source

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!
Cyclonit
Posts: 57
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Changes at TravisCI- affecting open source

Post by Cyclonit »

I'll hook up one of my servers following your guide this afternoon.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Changes at TravisCI- affecting open source

Post by PrzemoF »

Thanks! I didn't figure out why the tests fail, but building should work fine
Cyclonit
Posts: 57
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Changes at TravisCI- affecting open source

Post by Cyclonit »

I was able to register the runner with Gitlab and create a running container using podman. However I am using Fedora and there are a few things to note:

1. You must use Fedora newer than fc32. Otherwise you will get this error:

Code: Select all

starting permission container: Error response from daemon: OCI runtime create failed: this version of runc doesn't work on cgroups v2: unknown
2. You must either disable SELinux or permit the container to use the socket "/var/run/docker.sock".


But after fixing those two issues, I get a new error:

Code: Select all

$ echo "Compiling the code..."
Compiling the code...
$ mkdir build
$ cd build
$ ccache cmake ../
/usr/bin/bash: line 118: ccache: command not found
Cleaning up file based variables 00:01
ERROR: Job failed: exit code 1
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Changes at TravisCI- affecting open source

Post by PrzemoF »

Great! Remove ccache (both places) and leave cmake only. I need to update the executor image. Alternatively fork the executor image (you need to register to dockerhub and start using your own executor if you go that way)
Cyclonit
Posts: 57
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Changes at TravisCI- affecting open source

Post by Cyclonit »

PrzemoF wrote: Fri Jul 23, 2021 7:07 am
With ccache removed it built fine. The duration for the build job was 00:27:50 and the test job was still running after 1h. What kind of hardware do you use for your runner? After cancelling the job, the runner doesn't terminate. Thus there might also be a bug at play. I had to force kill the container to free up the runner.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Changes at TravisCI- affecting open source

Post by PrzemoF »

Good to see the build os working! 27 min is _fast_! With ccache it'll be down to single minutes. The test is broken - it produces core dump quickly. Which repo you used? I want to see the logs. I use a laptop - 16 threads, 64GB memory
Cyclonit
Posts: 57
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Changes at TravisCI- affecting open source

Post by Cyclonit »

I used a fork of your FreeCAD repository on branch gitlab-v1. It appears as though the container did not produce any useful logs. It simply hung up, hogged all 10 cores and didn't do anything. When I check the logs using "podman container logs gitlab-runner" all I get is this:

Code: Select all

Checking for jobs... received                       job=1446997899 repo_url=https://gitlab.com/Cyclonit/FreeCAD.git runner=3h75GSE3
The test-job's log in Gitlab doesn't contain any information either:

Code: Select all

Running with gitlab-runner 14.1.0 (8925d9a0)
  on FreeCAD-docker-runner 3h75GSE3
Preparing the "docker" executor
Using Docker executor with image przemof/executor ...
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Changes at TravisCI- affecting open source

Post by PrzemoF »

Mine has this:

Code: Select all

Preparing the "docker" executor 00:03
Using Docker executor with image przemof/executor ...
Pulling docker image przemof/executor ...
Using docker image sha256:f804878980c6f652a693db1fc62865c4a9947ac6dab308f5b8e08e8804a209b2 for przemof/executor with digest przemof/executor@sha256:96faf23bef00bec5d29be1fc640e467a76269ee457e69fb3185196519c36269e ...
Preparing environment 00:01
Running on runner-raarye63-project-18979748-concurrent-0 via 76ee06120007...
Getting source from Git repository 00:04
Fetching changes...
Reinitialized existing Git repository in /builds/PrzemoF/FreeCAD/.git/
Checking out 26100fdc as gitlab-v1...
Removing build/
Skipping Git submodules setup
Downloading artifacts 00:22
Downloading artifacts for build-job (1436377212)...
Downloading artifacts from coordinator... ok        id=1436377212 responseStatus=200 OK token=XHiEHsvq
Executing "step_script" stage of the job script 00:03
Using docker image sha256:f804878980c6f652a693db1fc62865c4a9947ac6dab308f5b8e08e8804a209b2 for przemof/executor with digest przemof/executor@sha256:96faf23bef00bec5d29be1fc640e467a76269ee457e69fb3185196519c36269e ...
$ echo "Running unit tests... "
Running unit tests... 
$ cd build/bin/
$ ./FreeCAD -t 0
/usr/bin/bash: line 117:    10 Aborted                 (core dumped) ./FreeCAD -t 0
Cleaning up file based variables 00:01
ERROR: Job failed: exit code 1
Do you see any network traffic? There might be a few gig that needs downloading (the image).

I'll add ccache in a next hour
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Changes at TravisCI- affecting open source

Post by PrzemoF »

New executor image with ccache pushed to dockerhub. I also added freecad to get all dependencies - I hope that might help with running the tests.

Build in progress: https://gitlab.com/PrzemoF/FreeCAD/-/pi ... /341920990

Edit: building with ccache works. At least the first build - I'm not sure if the info is stored in docker executor image, docker volume or it will be lost.

Edit2: the core dump was probably caused because I tried to run FreeCAD with normal GUI... so headless is the answer. Test in progress.. test runs, but fails on https://forum.freecadweb.org/viewtopic.php?f=10&t=60495
Cyclonit
Posts: 57
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Changes at TravisCI- affecting open source

Post by Cyclonit »

After some issues with updating my fork of your GitLab repository, I was able to have it finish the test-job but it ended in a core dump. I assume that this is somewhat related to the issue you already know about.

The core part of this setup, registering the runner and having it run jobs, works fine. What are your intended next steps? Would this be the right time to register my runner with your repository?
Post Reply