adamralph / bau

The C# task runner
MIT License
152 stars 17 forks source link

Unify baufile.csx and mono.csx #205

Closed eatdrinksleepcode closed 9 years ago

eatdrinksleepcode commented 9 years ago

Changes baufile.csx to detect when it is running in Mono and modify the tasks accordingly. This eliminates the need for mono.csx, gives non-Windows builds access to the acceptance task (but not the pack task, which does not work in Nuget on Mono), and in general makes it more likely that any changes to the build will get applied to all platforms.

eatdrinksleepcode commented 9 years ago

Fixes #202

TravisCI build is failing because it invokes mono.csx which is now gone. It would have to invoke baufile.csx (or build.sh) instead.

adamralph commented 9 years ago

@eatdrinksleepcode thanks!

To fix the TravisCI build you just need to change this line https://github.com/bau-build/bau/blob/eb38b71c39fc439575a6be2671e89984cb2a2c5e/.travis.yml#L11

eatdrinksleepcode commented 9 years ago

Both Travis and TeamCity are exhibiting the same unusual behavior regarding unit tests: they both intermittently produce an error from XUnit about being unable to find the test results output path. When this occurs, it seems to be because the output path is intended to be relative to the root of the project, but XUnit is looking for it relative to the assembly under test (i.e. in bin/Release). But, this doesn't happen every time. Since I opened the PR, 2 out of 7 TeamCity builds and 3 out of 5 Travis builds have failed in this way.

I cannot repro this locally no matter how many times I run. It doesn't seem to be related to my change; as far as I can tell, the "unit" task is still executing the same command in the same way that it was before. Have we ever seen this on CI before?

adamralph commented 9 years ago

Yeah, that's an annoying intermittent problem. It typically happens on TravisCI way more often than TeamCity. I think it's some kind of race condition inside xunit 1.x. It seems to have gone away in xunit 2.x.

adamralph commented 9 years ago

Thanks @eatdrinksleepcode !