From: "Mike Ralphson" <mike.ralphson@gmail.com>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: obscure platform autobuilders
Date: Wed, 1 Oct 2008 11:46:43 +0100 [thread overview]
Message-ID: <e2b179460810010346j23617764i8134c1f24b2746f0@mail.gmail.com> (raw)
In-Reply-To: <20081001071653.GA21174@sigill.intra.peff.net>
2008/10/1 Jeff King <peff@peff.net>:
> On Mon, Sep 29, 2008 at 08:51:29AM +0100, Mike Ralphson wrote:
>> Feel free to push changes to gitbuild.sh, including getting rid of
>> anything which looks environment-specific.
>
> I actually went a step further and revamped the architecture a bit.
> Check out the "platform" branch in gitbuild.git. My goal was to try to
> include more information in the gitbuild repository about exactly what
> goes into the test setup for each platform.
Very nice!
> I'm currently building, testing, and pushing FreeBSD 6.1 and Solaris 2.8
> with it (you can see the copious tests I am skipping in
> jk/solaris/config).
My googling led me to think that INTERNAL_QSORT would be a good idea
on at least some versions of Solaris... it may depend on the fs
though.
> If you like this approach, please go ahead and add an "mr/aix" profile
> with your setup. See the README for details, and let me know if you have
> questions. The script is a mish-mash of yours, mine, and some extra
> rewrites. I wouldn't be surprised if it needs a tweak or two. :)
How about this - let me know if ok, and I'll push it.
diff --git a/README b/README
index 184de11..e91037f 100644
--- a/README
+++ b/README
@@ -10,7 +10,8 @@ several files:
- 'config', a shell script sourced by the build script to override any
variables. See below for more information.
- - 'branches', a list of branches, one per line, to build and test
+ - 'branches', a list of branches, one per line, to build and test.
+ Lines starting with # are treated as comments
- 'gitconfig'; if this file exists, it will be used as the .git/config
of the built and tested repository. This file should define a remote
@@ -18,7 +19,16 @@ several files:
should be published (i.e., repo.or.cz:/srv/git/git/gitbuild.git).
- 'config.mak'; if this file exists, it will be used as the config.mak
- file for building git
+ file for building git. If it is not present, but there is a
+ config.mak file in your project directory, it is copied here to
+ prevent it being removed by 'git clean'
+
+ - 'catch', a shell script sourced by the build script if an error
+ occurs. It is passed the failing command-line in its arguments
+
+ - 'finally', a shell script sourced by the build script at the end
+ of the process. It is passed the exit code of build.sh as its
+ argument
The convention for platform directory names is "$initials/$platform". A
build should be initiated from the platform directory. E.g., by putting
@@ -42,6 +52,9 @@ the variables are:
- make; the command to invoke make. If not set, defaults to "gmake".
+ - project; the path to the directory to build in. If not set, defaults
+ to ./project relative to the starting directory
+
- path_build; the PATH to use while building git. If not set, the
PATH is left alone.
@@ -52,8 +65,8 @@ Invoking build.sh
=================
Generally build.sh is invoked without any options, which means it should
-build all branches one after the other. However, it can be invoked with
-a branch name to build and test just a single branch.
+build all specified branches one after the other. However, it can be
+invoked with a branch name to build and test just a single branch.
The 'project' directory need not be set up beforehand. If it does not
exist, it will be created as an empty git repository automatically. As
diff --git a/build.sh b/build.sh
index b318af2..0967ff3 100755
--- a/build.sh
+++ b/build.sh
@@ -9,6 +9,7 @@ root=$PWD
initials=`dirname $PWD 2>/dev/null`; initials=`basename $initials 2>/dev/null`
name=`basename $PWD 2>/dev/null`
make=gmake
+project=project
. ./config
name=`echo $name | sed 's/[^A-Za-z0-9.-]/-/g'`
@@ -19,6 +20,8 @@ try() {
0) ;;
*) echo >&2 "build failed: $*"
cat >&2 "$log"
+ test -f $root/catch && . $root/catch $*
+ test -f $root/finally && . $root/finally 1
exit 1
;;
esac
@@ -36,6 +39,7 @@ build_branch() {
rm -f "$log"
try git checkout -f -q $branch
+ test -f config.mak && test ! -f $root/config.mak && try cp config.mak $root/
try git clean -d -f -q -x
test -f $root/config.mak && try cp $root/config.mak config.mak
@@ -59,22 +63,23 @@ build_branch() {
log=$root/log.build
rm -f "$log"
-if ! test -d project; then
- try mkdir project
- try cd project
+if ! test -d $project; then
+ try mkdir $project
+ try cd $project
try git init
else
- try cd project
+ try cd $project
fi
test -f $root/gitconfig && try cp $root/gitconfig .git/config
try git remote update
if test -z "$1"; then
- for i in `cat "$root/branches"`; do
+ for i in `cat "$root/branches" | grep -v '^#'`; do
build_branch $i || exit 1
done
else
build_branch $1
fi
+test -f $root/finally && . $root/finally 0
exit 0
next prev parent reply other threads:[~2008-10-01 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 15:46 A note from the interim Git maintainer Shawn O. Pearce
2008-09-26 13:24 ` Mike Ralphson
2008-09-26 22:54 ` Jeff King
2008-09-29 7:51 ` Mike Ralphson
2008-10-01 7:16 ` obscure platform autobuilders Jeff King
2008-10-01 10:46 ` Mike Ralphson [this message]
2008-10-01 15:37 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2b179460810010346j23617764i8134c1f24b2746f0@mail.gmail.com \
--to=mike.ralphson@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).