Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
variables: | ||
DOCKER_DRIVER: overlay2 | ||
|
||
before_script: | ||
- mkdir -p ccache | ||
- export CCACHE_BASEDIR=${PWD} | ||
- export CCACHE_DIR=${PWD}/ccache | ||
- export PATH=/usr/lib/ccache:${PATH} | ||
|
||
cache: | ||
paths: | ||
- ccache/ | ||
|
||
sources: | ||
stage: build | ||
|
||
# Use Debian-based official GCC image | ||
# see https://hub.docker.com/_/gcc/ | ||
image: gcc | ||
|
||
script: | ||
- apt-get update -y -qq | ||
- apt-get install -y -qq --no-install-recommends automake ccache bison flex pkg-config python systemd liblua5.1-0-dev libncurses5-dev libreadline-dev libuv1-dev | ||
- tools/version_check.sh | ||
- ./bootstrap.sh --fix-versions | ||
- ./configure --prefix=/usr --with-lua | ||
- make distcheck dist-xz | ||
|
||
artifacts: | ||
expire_in: 1 week | ||
paths: | ||
- "coda-*.tar*" | ||
|
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 |
---|---|---|
@@ -1,2 +1,30 @@ | ||
#!/bin/sh | ||
|
||
ACINIT_RE='^\(AC_INIT([^,]*, \)\([^,]*\)\(.*)\)' | ||
fixver () { | ||
SUBSYS="$1" | ||
|
||
VERSION=$(git describe --match="$SUBSYS-*" | cut -d- -f2-) | ||
RELEASE=$(echo $VERSION | cut -d- -f1) | ||
|
||
# any changes to the subdir since the last release tag? | ||
[ -n "$(git diff $SUBSYS-$RELEASE lib-src/$SUBSYS)" ] || VERSION="$RELEASE" | ||
|
||
echo "$SUBSYS-$VERSION" | ||
sed -i "s/$ACINIT_RE/\1$VERSION\3/" lib-src/$SUBSYS/configure.ac | ||
} | ||
|
||
# Fix up Coda, LWP, RPC2, and RVM versions | ||
if [ "$1" = "--fix-versions" ] ; then | ||
CODA_VERSION=$(git describe --match="coda-*" | cut -d- -f2-) | ||
|
||
echo "coda-$CODA_VERSION" | ||
sed -i "s/$ACINIT_RE/\1$CODA_VERSION\3/" configure.ac | ||
|
||
fixver lwp | ||
fixver rpc2 | ||
fixver rvm | ||
fi | ||
|
||
# and rebuild configure files | ||
autoreconf --verbose --install --force |
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,41 @@ | ||
#!/bin/sh | ||
# | ||
# Check if configure.ac versions match up with git tags and | ||
# make sure that all subsystems have an uptodate release tag | ||
# when we're building a new Coda release | ||
# | ||
|
||
TAGGED_SUBSYS=$(echo $CI_COMMIT_TAG | cut -d- -f1) | ||
|
||
ACINIT_RE='^\(AC_INIT([^,]*, \)\([^,]*\)\(.*)\)' | ||
|
||
checkver () { | ||
SUBSYS="$1" | ||
SUBDIR="$2" | ||
|
||
# VERSION is git version (latest tag + # commits + commit sha) | ||
# RELEASE is latest git tagged version | ||
# CONFVER is configure.ac version | ||
VERSION=$(git describe --match="$SUBSYS-*" | cut -d- -f2-) | ||
RELEASE=$(echo $VERSION | cut -d- -f1) | ||
CONFVER=$(sed -n "s/$ACINIT_RE/\2/p" $SUBDIR/configure.ac) | ||
|
||
# the configure.ac version should match the tagged version | ||
if [ "$CONFVER" != "$RELEASE" ] ; then | ||
echo "$SUBSYS: configure.ac version does not match git tag" | ||
[ "$TAGGED_SUBSYS" = "$SUBSYS" ] && exit 1 | ||
fi | ||
|
||
# are there changes since the last release tag? | ||
if [ -n "$(git diff $SUBSYS-$RELEASE $SUBDIR)" ] | ||
then | ||
echo "$SUBSYS: untagged version $VERSION" | ||
[ "$TAGGED_SUBSYS" = "coda" ] && exit 1 | ||
fi | ||
} | ||
|
||
checkver coda . | ||
checkver lwp lib-src/lwp | ||
checkver rpc2 lib-src/rpc2 | ||
checkver rvm lib-src/rvm | ||
exit 0 |