Page MenuHomeWildfire Games

Run Jenkins build with both GCC and Clang
AbandonedPublic

Authored by Itms on Nov 11 2017, 6:24 PM.

Details

Reviewers
leper
Summary

Adapt the Jenkins build script to build with both compilers.

In order to keep being clever we need to create two workspaces for gcc and clang, that are identical. If the code is not touched, both workspaces will separately use already-compiled object files.

In everyday programming work, one workspace is enough, but I renamed it to gmake for consistency and logical reasons. This will require us to update quite a few build instructions, but the update to premake5 is the perfect reason to update those instructions.

Test Plan

Apart from Jenkins testing the differential revision itself, a simple code-reading review should be enough.

Event Timeline

Itms created this revision.Nov 11 2017, 6:24 PM
Vulcan added a subscriber: Vulcan.Nov 11 2017, 8:19 PM

Build failure - The Moirai have given mortals hearts that can endure.

Updating workspaces...
Executing section Default...
Executing section Source...
Executing section JS...
leper added inline comments.Nov 11 2017, 8:43 PM
build/coverage/gen.sh
1

Do we actually run this currently?

build/jenkins/build-patch.sh
77

Maybe say something about this being the GCC compiled test binary, though that is obvious from the preceeding output.

91–92

Since this block is duplicated I'm wondering if it wouldn't make sense to put that in a function or something, doesn't really matter though.

build/workspaces/clean-workspaces.sh
60

Seems a bit strange that we do add this for premake4 which we are going to be dropping sometime soon anyway.

Actually that folder was never created, so what is this doing here?

62

Could also not hard-code the compiler names here and do ./gmake*

build/workspaces/update-workspaces.sh
126

I guess having .gcc and .clang works ok, though one could also just name them 0 and 1, or 1 and 2.

Which seems like it would help with adding different compiler versions, as one could just have a loop and a count here. Might also allow having the default folder be .0 (or .1), so removing the need for any if/else.

leper requested changes to this revision.Nov 23 2017, 9:01 PM

As requested.

This revision now requires changes to proceed.Nov 23 2017, 9:01 PM
Itms marked 3 inline comments as done.Dec 2 2017, 4:40 PM
Itms added inline comments.
build/coverage/gen.sh
1

We should! I use it locally.

build/workspaces/clean-workspaces.sh
60

Sorry this is an oversight from a previous iteration of the patch...

build/workspaces/update-workspaces.sh
126

Good idea! I went with this.

Itms updated this revision to Diff 4492.Dec 2 2017, 4:40 PM
Itms marked 2 inline comments as done.

Address remarks.

Vulcan added a comment.Dec 2 2017, 4:47 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Dec 2 2017, 4:48 PM
Executing section Default...
Executing section Source...
Executing section JS...
Stan added a subscriber: Stan.Oct 30 2018, 10:02 AM

@Itms any update on this ?
Do you need someone to test ?

Itms abandoned this revision.Jul 17 2019, 2:15 PM

This is superseded by our new CI system which is using Docker to build the game under clang-only or gcc-only environments.

The only interesting thing that could be kept from here is the rename from build/workspaces/gcc to build/workspaces/gmake, which would make more sense. However, it would break everybody's workflow.