OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:58 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: New page on automated builds
PostPosted: Sat Jan 07, 2017 3:11 pm 
Offline
Member
Member
User avatar

Joined: Thu Aug 11, 2005 11:00 pm
Posts: 1110
Location: Tartu, Estonia
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


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Sat Jan 07, 2017 4:30 pm 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
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


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Sat Jan 07, 2017 5:42 pm 
Offline
User avatar

Joined: Tue May 24, 2016 6:48 pm
Posts: 8
Location: San Francisco
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.


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Sun Jan 08, 2017 12:16 pm 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
Good job!

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Mon Jan 09, 2017 12:55 am 
Offline
Member
Member

Joined: Sat Nov 07, 2015 3:12 pm
Posts: 145
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.


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Mon Jan 09, 2017 4:42 am 
Offline
Member
Member
User avatar

Joined: Thu Aug 11, 2005 11:00 pm
Posts: 1110
Location: Tartu, Estonia
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


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Mon Jan 09, 2017 3:51 pm 
Offline
User avatar

Joined: Tue May 24, 2016 6:48 pm
Posts: 8
Location: San Francisco
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.


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Wed Jan 11, 2017 8:08 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
Sadly you have to use that Unix makecrap.sh and similar.


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Mon Jan 16, 2017 1:58 pm 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
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


Top
 Profile  
 
 Post subject: Re: New page on automated builds
PostPosted: Mon Jan 16, 2017 11:36 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group