2015-03-21 06:53:30 +01:00
|
|
|
language: go
|
|
|
|
|
2015-07-24 05:27:41 +02:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/ninjabin
|
|
|
|
|
2015-03-21 06:53:30 +01:00
|
|
|
install:
|
2015-07-24 05:27:41 +02:00
|
|
|
- ./.travis.install-ninja.sh
|
|
|
|
- export PATH=$PATH:~/ninjabin
|
2015-03-21 06:53:30 +01:00
|
|
|
|
2015-07-24 03:19:18 +02:00
|
|
|
before_script:
|
|
|
|
- source .travis.fix-fork.sh
|
2015-03-21 06:53:30 +01:00
|
|
|
|
|
|
|
script:
|
|
|
|
- go test ./...
|
|
|
|
- mkdir stage
|
|
|
|
- cd stage
|
|
|
|
- ../bootstrap.bash
|
|
|
|
- ninja
|
Enhance bootstrap stage selection
This simplifies the bootstrap process while making it more flexible by
moving the stage selection into a go binary(choosestage). It will now be
possible to have more than two build stages.
Now each stage has a ninja template(main.ninja.in) and a timestamp
file(main.ninja.in.timestamp). The timestamp file may be updated by any
build stage that wishes to regenerate the ninja template. If the
choosestage binaries sees that the timestamp is newer than the template,
it will choose the prior stage.
The main stage no longer writes to the source tree to update the
build.ninja.in file. This was a problem for read-only source trees.
Instead, the choosestage binary first checks to see if that file is
newer than the last bootstrap.ninja.in, copies it in place, and starts
the boostrap stage.
The bootstrap stage regenerates it's own ninja template, but that
required a loop through the main stage to actually run it. The
choosestage binary now detects if the template has changed for the
current stage, and will restart the stage.
One change is that if dependencies do get messed up, instead of silently
failing, there's a higher chance that the bootstrap step will just
continue looping, doing nothing. This can happen if the main stage
has a dependency that triggers the bootstrap stage, but the bootstrap
stage doesn't see anything required to rebuild the main ninja file. A
side effect of this requirement is that changes to test code will now
rebuild the main ninja file.
Change-Id: I9965cfba79dc0dbbd3af05f5944f7653054455a2
2015-07-23 02:05:59 +02:00
|
|
|
- diff -us ../build.ninja.in .bootstrap/bootstrap.ninja.in
|
2015-07-23 02:05:51 +02:00
|
|
|
- ../tests/test.sh
|