having your cake, and eating it too!

24
Having your Cake, and eating it too! Gary Ewan Park Email: [email protected] Twitter: @gep13 Web: http://www.gep13.co.uk

Upload: gary-park

Post on 11-Jan-2017

314 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Having your cake, and eating it too!

Having your Cake, and eating it too!

Gary Ewan ParkEmail: [email protected]: @gep13Web: http://www.gep13.co.uk

Page 2: Having your cake, and eating it too!

What is Cake?

Page 3: Having your cake, and eating it too!
Page 4: Having your cake, and eating it too!
Page 5: Having your cake, and eating it too!

A Definition…

“Cake (C# Make) is a cross platform build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.”

Reference http://cakebuild.net/

Page 6: Having your cake, and eating it too!

Okay, but why do I need it?

Page 7: Having your cake, and eating it too!

What are the main philosophies of Cake?

• Non intrusive• It should “just” work• Be highly configurable• Replace the parts that you don’t like• Easy to implement your own tools• No tools should be checked into your repository• Should behave the same way regardless of

• Operating System• Environment

Page 8: Having your cake, and eating it too!

As an example…

Page 9: Having your cake, and eating it too!

Can’t I just use… MAKEFAKECMakeMSBuildNAntPsakeBau

Page 10: Having your cake, and eating it too!

Example Cake Script

Page 11: Having your cake, and eating it too!

Typical Build Workflow

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 12: Having your cake, and eating it too!

Let’s bake some Cake!

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 13: Having your cake, and eating it too!

Demo 1NuGet Package Restore

Page 14: Having your cake, and eating it too!

Progress Check

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 15: Having your cake, and eating it too!

Demo 2Build the Solution

Page 16: Having your cake, and eating it too!

Progress Check

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 17: Having your cake, and eating it too!

Demo 3Unit Tests

Page 18: Having your cake, and eating it too!

Progress Check

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 19: Having your cake, and eating it too!

Demo 4Test Coverage

Page 20: Having your cake, and eating it too!

Progress Check

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 21: Having your cake, and eating it too!

Demo 5NuGet Pack

Page 22: Having your cake, and eating it too!

Progress Check

Clean

Build

Unit Tests(NUnit, xUnit,

MSTest)

Test Coverage

StyleCop FxCop

DupFinder InspectCode

Package Publish

Package Restore

Page 23: Having your cake, and eating it too!

Questions?

Feel free to get in touchEmail: [email protected]

Twitter: @gep13Web: http://www.gep13.co.uk

Page 24: Having your cake, and eating it too!

Resources

• Cake Documentationo http://cakebuild.net/docs

• MS Dev Show Podcast Episodeo http://msdevshow.com/2016/04/cakebuild-with-mattias-karlsson-and-gary-ewan-park/

• Motz Codes Live: Continuous Integration for Libraries with Jon Dick aka Redtho https://www.youtube.com/watch?v=D0gWjHhJ3IU

• Source Codeo https://github.com/cake-build/cake

• Blog Postso Moving to Cake (C# Make) – Laurent Kempe

http://laurentkempe.com/2016/04/05/Moving-to-Cake-CSharp-Make/