apenwarr / gitbuilder

Auto-builds and tests all the branches of your git projects, showing pass/fail results on a web page/RSS feed. Isolates failures to the first commit that caused the problem.

gitbuilder / build.sh.example
3e315c9f » apenwarr 2008-08-22 build.sh.example: run autoc... 1 #!/bin/bash -x
5e07d19f » apenwarr 2008-08-22 build.sh.example: provide a... 2 #
3 # Copy this file to build.sh so that gitbuilder can run it.
4 #
5 # What happens is that gitbuilder will checkout the revision of your software
6 # it wants to build in the directory called gitbuilder/build/. Then it
7 # does "cd build" and then "../build.sh" to run your script.
8 #
9 # You might want to run ./configure here, make, make test, etc.
10 #
11
12 # Don't forget to run autoconf and ./configure, if that's what your project
13 # needs.
8e06013c » apenwarr 2008-09-02 build.sh.example: don't use... 14 [ ! -x autogen.sh ] || ./autogen.sh || exit 1
3e315c9f » apenwarr 2008-08-22 build.sh.example: run autoc... 15 autoconf || true
8e06013c » apenwarr 2008-09-02 build.sh.example: don't use... 16 [ ! -x configure ] || ./configure || exit 2
5e07d19f » apenwarr 2008-08-22 build.sh.example: provide a... 17
18 # Actually build the project
8e06013c » apenwarr 2008-09-02 build.sh.example: don't use... 19 make || exit 3
5e07d19f » apenwarr 2008-08-22 build.sh.example: provide a... 20
9e790ba1 » apenwarr 2008-09-02 build.sh.example: automatic... 21 # Only run the unit tests if the 'make test' target exists. Make will
22 # return 1 if a target exists but isn't up-to-date, or 2 on error.
23 make -q tests
24 if [ "$?" = 1 ]; then
b84691b7 » apenwarr 2008-10-17 build.sh.example: show how ... 25 # run "make test", but give it a time limit in case a test gets stuck
26 ../maxtime 1800 make test || exit 4
9e790ba1 » apenwarr 2008-09-02 build.sh.example: automatic... 27 fi
5e07d19f » apenwarr 2008-08-22 build.sh.example: provide a... 28
8e06013c » apenwarr 2008-09-02 build.sh.example: don't use... 29 exit 0