-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Move Jenkins job configuration into the repository #3893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@mlpack-jenkins test this please |
|
Ok, I made everything work here and it is ready for review! I updated the description of the PR with the details. |
|
Very amazing patience and persistence! Congratulations for seeing it through. |
shrit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for doing all of migration, I know how tedious this looks like
| // Make sure the data loaded okay. | ||
| REQUIRE(!dataset.is_empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix
| ssh jenkins@${hostname} -t mkdir -p test_${BRANCH_NAME}_${BUILD_ID}/ | ||
| scp build/bin/mlpack_test jenkins@${hostname}:test_${BRANCH_NAME}_${BUILD_ID}/ | ||
| scp -r src/mlpack/tests/data/* jenkins@${hostname}:test_${BRANCH_NAME}_${BUILD_ID}/ | ||
| # Unpack all compressed test data. | ||
| ssh jenkins@${hostname} -t " | ||
| cd test_${BRANCH_NAME}_${BUILD_ID}; | ||
| find ./ -iname '*.bz2' -exec tar xvf \\{\\} \\;" | ||
| mkdir -p reports; | ||
| ssh jenkins@${hostname} -t " | ||
| cd test_${BRANCH_NAME}_${BUILD_ID}; | ||
| mkdir -p reports; | ||
| ./mlpack_test -r junit -o reports/mlpack_test.junit.xml" | ||
| # Clean up afterwards. | ||
| scp jenkins@${hostname}:test_${BRANCH_NAME}_${BUILD_ID}/reports/mlpack_test.junit.xml reports/mlpack_test.${hostname}.junit.xml; | ||
| ssh jenkins@${hostname} -t rm -rf test_${BRANCH_NAME}_${BUILD_ID}/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this part took much of the time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, most of the time was actually figuring out that I was compiling with 4KB page sizes but couscous (that RPi5) was running with 16KB page sizes and so it would just segfault...
| def setBuildStatus(Map paramsMap) | ||
| { | ||
| // Extract arguments from the map. | ||
| def result = paramsMap.result; | ||
| def context = paramsMap.context; | ||
| def successMessage = paramsMap.successMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Groovy looks interesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's not bad, but I am tired of having so many different languages... I would have rather just had a shell script.
| -DTOOLCHAIN_PREFIX=/path/to/bootlin/toolchain/aarch64--glibc--stable-2024.02-1/bin/aarch64-buildroot-linux-gnu- | ||
| -DCMAKE_SYSROOT=/path/to/bootlin/toolchain/aarch64--glibc--stable-2024.02-1/aarch64-buildroot-linux-gnu/sysroot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it was a typo in the original; the gnueabihf prefix doesn't exist:
$ ls /opt/bootlin/aarch64--glibc--stable-2024.02-1/bin/aarch64-buildroot-linux-*-g++
/opt/bootlin/aarch64--glibc--stable-2024.02-1/bin/aarch64-buildroot-linux-gnu-g++
This may be an issue with some of the other boards too; I didn't check fully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second approval provided automatically after 24 hours. 👍
This is a "warmup" to defining the CI jobs on Jenkins for embedded systems. It will take me some attempts to transfer our existing Jenkins job configurations to a.jenkins/directory full ofJenkinsfiles. TheJenkinsfilesyntax is truly awful (it is Groovy), but, better to have the configurations here instead of hidden inside of the Jenkins configuration.Update: this is ready!
This PR moves the Jenkins jobs into the mlpack repository, just like the Github Actions jobs. This makes them a lot more visible to users and developers, and easier to modify. (We should hopefully no longer need to give out permissions to Jenkins, but we'll see!)
There are five jobs I've defined:
.jenkins/cross-compilation/Jenkinsfile: cross-compile mlpack for an RPi5 and runmlpack_teston the RPi5; in another PR, I will add more embedded targets..jenkins/doc-link-check/Jenkinsfile: check all the links in the documentation, maintaining a cache of links that are known-good to accelerate the job..jenkins/doc-snippet-build/Jenkinsfile: build all the C++ documentation snippets and make sure they all run..jenkins/memory-checks/Jenkinsfile: run any tests that have changed through valgrind to make sure there are no memory problems. I don't think this job was working correctly before this PR, but hopefully it will be useful in the future..jenkins/style-checks/Jenkinsfile: run the style linter to make sure there are no problems.The style check and link check job take less than 10 minutes each, so they are pretty fast. The other jobs use ccache, but the compile times seem to be long. I am not totally sure why that is. I also think the C++ documentation snippets may need some amount of auditing because the slowdown there is runtime, not compile time... but I will leave that for another time.
I've disabled all the other Jenkins jobs and updated the documentation. The static code analysis job used Facebook's
infertool, which was so computationally intensive that I made the call to just remove the job.There were a couple other small changes and bugfixes, especially make the
junittest reporter work correctly for Catch2. They should hopefully be pretty self-explanatory in the diff.