New page on automated builds

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

New page on automated builds

Post by xenos »

I have created a new wiki page: Automated Build Using CircleCI

This is a tutorial how to set up GitHub and CircleCI to automatically build your osdev project on every push to the repository, perform tests and publish the results. Please feel free to improve on it, and of course try it out if you like :D It turned out to be easier than I expected. Here is a working example:

https://github.com/xenos1984/NOS
https://github.com/xenos1984/NOS/blob/master/circle.yml
https://github.com/xenos1984/NOS/blob/m ... olchain.sh
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
User avatar
matt11235
Member
Member
Posts: 286
Joined: Tue Aug 02, 2016 1:52 pm
Location: East Riding of Yorkshire, UK

Re: New page on automated builds

Post by matt11235 »

This looks cool, how long does it take to build your cross compiler on CircleCI's servers?
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum
User avatar
jeaye
Posts: 8
Joined: Tue May 24, 2016 6:48 pm
Libera.chat IRC: jeaye
Location: San Francisco
Contact:

Re: New page on automated builds

Post by jeaye »

About 25 minutes, based on https://circleci.com/gh/xenos1984/NOS ; it ends up being cached though, so it's only built once, assuming it succeeds, and it's re-used after that.

Thanks for the new page, XenOS. The more quality docs we have on continuous integration, the better.
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: New page on automated builds

Post by dozniak »

Good job!
Learn to read.
Boris
Member
Member
Posts: 145
Joined: Sat Nov 07, 2015 3:12 pm

Re: New page on automated builds

Post by Boris »

Hi, why is CircleCI any better than Travis/Gitlab ?
Why should I use it ?
I'd generalise your article for " how to do CI with is Dev" and put a tiny part of it specialised in CircleCI.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: New page on automated builds

Post by xenos »

I don't think it's better than Travis/Gitlab. The only reason why I used CircleCI is that I participate also in a larger open source project, and that one uses CircleCI, so that I'm more or less familiar with the setup. But I guess using any other CI would be just as easy.

In fact, I already thought about trying other CI providers as well, making them work with my project and then writing wiki pages also for those, nicely bundled in a category.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
User avatar
jeaye
Posts: 8
Joined: Tue May 24, 2016 6:48 pm
Libera.chat IRC: jeaye
Location: San Francisco
Contact:

Re: New page on automated builds

Post by jeaye »

I use TravisCI, since I know it and it works. The benefit of CircleCI, over TravisCI, which I've seen, is that CircleCI allows you to SSH into the box which runs your tests so you can troubleshoot. Toying with Travis' yaml, committing, pushing, and waiting, is no fun when trying to debug your setup.

With that said, it hasn't been enough to bring me from TravisCI.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: New page on automated builds

Post by Ycep »

Sadly you have to use that Unix makecrap.sh and similar.
User avatar
matt11235
Member
Member
Posts: 286
Joined: Tue Aug 02, 2016 1:52 pm
Location: East Riding of Yorkshire, UK

Re: New page on automated builds

Post by matt11235 »

There's a wiki entry for Unit_Testing but it seems quite barebones.
Has anyone here set up unit tests for their OS that runs through a CI service and reports on Git commits? I don't really know the best way to go about it.
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Libera.chat IRC: dchapiesky

Re: New page on automated builds

Post by dchapiesky »

matt11235 wrote:There's a wiki entry for Unit_Testing but it seems quite barebones.
Has anyone here set up unit tests for their OS that runs through a CI service and reports on Git commits? I don't really know the best way to go about it.

While the actual unit tests would be OS specific....

I can recommend CMake/CTest & CDash

see www.cmake.org

Example live site: Visualization Toolkit (VTK) CI Dashboard -- https://open.cdash.org/index.php?project=VTK


CMake to build your code/unit tests

CTest to run the tests (including downloading latest git repos, patching, etc...)

CDash to act as a CI dashboard of said tests...

If you take the time to work with it - it can be extremely powerful... for example

I have added clang/llvm static analysis of code and post metrics to CDash

Probably the trickiest part is setting QEMU for example - to save serial output to a file and to actually auto shutdown after N seconds or system reset (there is a thread in the forum about this...)

Altogether these are pretty damn good

cheers
Plagiarize. Plagiarize. Let not one line escape thine eyes...
Post Reply