-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Brice Goglin <[email protected]>
- Loading branch information
Showing
2 changed files
with
75 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright © 2012-2023 Inria. All rights reserved. | ||
# See COPYING in top-level directory. | ||
# | ||
|
||
echo "############################" | ||
echo "Running on:" | ||
uname -a | ||
echo "############################" | ||
|
||
set -e | ||
set -x | ||
|
||
# environment variables | ||
test -f $HOME/.ciprofile && . $HOME/.ciprofile | ||
|
||
branch=$(git branch --show-current) | ||
|
||
echo "Got GIT branch name $branch" | ||
|
||
# convert "refs/remotes/pull/XYZ/merge" into "PR-XYZ" | ||
branch=$(echo $branch | sed -r -e 's@refs/remotes/pull/([0-9]+)/mergepr/@PR-\1@') | ||
|
||
# keep branch-name before the first '-' (e.g. v2.0-beta becomes v2.0) | ||
# and look for the corresponding autotools. | ||
# "PR-XYZ" will get "PR" which means they'll use master autotools (likely OK) | ||
basebranch=$( echo $branch | sed -r -e 's@^.*/([^/]+)$@\1@' -e 's/-.*//' ) | ||
if test -d $HOME/local/hwloc-$basebranch ; then | ||
export PATH=$HOME/local/hwloc-${basebranch}/bin:$PATH | ||
echo using specific $HOME/local/hwloc-$basebranch | ||
else | ||
export PATH=$HOME/local/hwloc-master/bin:$PATH | ||
echo using generic $HOME/local/hwloc-master | ||
fi | ||
|
||
# display autotools versions | ||
automake --version | head -1 | ||
libtool --version | head -1 | ||
autoconf --version | head -1 | ||
|
||
# better version string | ||
snapshot=$branch-`date --utc +%Y%m%d.%H%M`.git`git show --format=format:%h -s` | ||
sed -e 's/^snapshot_version=.*/snapshot_version='$snapshot/ \ | ||
-e 's/^snapshot=.*/snapshot=1/' \ | ||
-i VERSION | ||
|
||
# let's go | ||
./autogen.sh | ||
./configure | ||
make | ||
|
||
if test x$NO_CHECK = xtrue; then | ||
distcheck=dist | ||
else | ||
distcheck=distcheck | ||
fi | ||
if ! make $distcheck; then | ||
# make distcheck temporarily sets the source directory as R/O. | ||
# a failure during that R/O step may cause git clean -fdx to fail during the next build | ||
chmod u+w -R . | ||
false | ||
fi | ||
|
||
# Only check versions once in the main job. | ||
# Some of these tests require bash and grep -P anyway. | ||
contrib/windows/check-versions.sh | ||
contrib/windows-cmake/check-versions.sh | ||
contrib/android/check-versions.sh | ||
|
||
exit 0 |