Skip to content

Adding partial builds to Travis#266

Merged
arcuru merged 8 commits intoexercism:masterfrom
arcuru:partial_build
Apr 20, 2019
Merged

Adding partial builds to Travis#266
arcuru merged 8 commits intoexercism:masterfrom
arcuru:partial_build

Conversation

@arcuru
Copy link
Copy Markdown
Contributor

@arcuru arcuru commented Apr 13, 2019

This switches the Travis builds so that it tests different subsets of the exercises depending on whether it is a PR build or a branch build, and on the changes made compared to the master branch. Basically, for a normal PR this will help lighten the load while it's being worked on, and we will run a full build against master once it is merged.

Some other tracks do this already, I've borrowed from the script used for Rust but heavily modified it.

If it's a branch build we run everything, as we currently do.
If it's a PR build that changes no exercises, we run nothing.
If it's a PR build that changes 1 or more exercises, we only run the changed exercises.
If it's a PR build that changes the root CMakeLists.txt file, we run everything to make sure that works. [1]

I'll be kicking off builds on Travis to test all the paths before this is ready to be merged.

[1] - This also changes the CMakeLists.txt file so it reads the directories instead of taking in a list of exercises, so it doesn't need to be edited just to add an exercise. It'll only be changed if there are real changes to it.

@arcuru arcuru mentioned this pull request Apr 13, 2019
6 tasks
@arcuru arcuru changed the title [WIP] Adding partial builds to Travis Adding partial builds to Travis Apr 13, 2019
@arcuru
Copy link
Copy Markdown
Contributor Author

arcuru commented Apr 13, 2019

So this now has examples for all the different paths:

Building everything in a branch (from my fork): https://travis-ci.org/patricksjackson/xcpp/builds/519523367
PR - building nothing (first build here)
PR - successfully building subset (second build here)
PR - failure when building subset (third build here)
PR - Running everything when root CMake changed (last build here)

Comment thread bin/check-exercises.sh Outdated
@arcuru arcuru mentioned this pull request Apr 20, 2019
@arcuru
Copy link
Copy Markdown
Contributor Author

arcuru commented Apr 20, 2019

I'm going ahead and merging this, at it will save us compilation time and help with #272.

@arcuru arcuru merged commit 3fa868c into exercism:master Apr 20, 2019
@arcuru arcuru deleted the partial_build branch April 20, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants