diff --git a/.travis.yml b/.travis.yml index 657914c..fad1f72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,10 +60,6 @@ jobs: - echo "# ubuntu-focal - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 - export prefix=$HOME/install - echo "# ubuntu-focal - prefix '$prefix'" >&2 - - export extra_targets="aws_s2n_tls" - - echo "# ubuntu-focal - extra_targets '$extra_targets'" >&2 - - export EXPECTED_DEPS_COUNT=12 - - echo "# ubuntu-focal - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 - make -j16 for-travis - make list-built - export ARTIFACT=ubuntu @@ -78,7 +74,7 @@ jobs: # mkdir returns true if the directory already exists. This dir is used in 'before_deploy'. - stage: build - name: "rocky8" + name: "rocky8 static" script: - export ARTIFACT="rocky8" - echo "# $ARTIFACT - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 @@ -87,6 +83,61 @@ jobs: - install_dir="$HOME/$ARTIFACT/install" - echo "# $ARTIFACT - install_dir '$install_dir'" >&2 - mkdir -vp "$install_dir" + - docker run + --env prefix=/root/install + --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" + --volume $install_dir:/root/install + --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies + opendap/rocky8_hyrax_builder:latest + /root/hyrax-dependencies/travis/build-for-rocky8-static.sh + - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static-$TRAVIS_BUILD_NUMBER.tgz" + - echo "# $ARTIFACT - tarball_numbered '$tarball_numbered'" >&2 + - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static.tgz" + - echo "# $ARTIFACT - tarball_latest '$tarball_latest'" >&2 + - mkdir -vp $TRAVIS_BUILD_DIR/package + - tar -C "$HOME/$ARTIFACT/" -czvf "$tarball_numbered" install + - cp -v "$tarball_numbered" "$tarball_latest" + - ./travis/check-installed $EXPECTED_DEPS_COUNT + - ls -l $TRAVIS_BUILD_DIR/package/ + + - stage: build + name: "rocky9 static" + script: + - export ARTIFACT="rocky9" + - echo "# $ARTIFACT - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 + - export extra_targets="" + - echo "# $ARTIFACT - extra_targets '$extra_targets'" >&2 + - install_dir="$HOME/$ARTIFACT/install" + - echo "# $ARTIFACT - install_dir '$install_dir'" >&2 + - mkdir -vp $"install_dir" + - docker run + --env prefix=/root/install + --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" + --volume $install_dir:/root/install + --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies + opendap/rocky9_hyrax_builder:latest + /root/hyrax-dependencies/travis/build-for-rocky9-static.sh + - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static-$TRAVIS_BUILD_NUMBER.tgz" + - echo "# $ARTIFACT - tarball_numbered '$tarball_numbered'" >&2 + - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static.tgz" + - echo "# $ARTIFACT - tarball_latest '$tarball_latest'" >&2 + - mkdir -vp $TRAVIS_BUILD_DIR/package + - tar -C "$HOME/$ARTIFACT/" -czvf "$tarball_numbered" install + - cp -v "$tarball_numbered" "$tarball_latest" + - ./travis/check-installed $EXPECTED_DEPS_COUNT + - ls -l $TRAVIS_BUILD_DIR/package/ + + - stage: build + name: "rocky8 dynamic" + script: + - export ARTIFACT="rocky8" + - export EXPECTED_DEPS_COUNT=11 + - echo "# $ARTIFACT - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 + - export extra_targets="" + - echo "# $ARTIFACT - extra_targets '$extra_targets'" >&2 + - install_dir="$HOME/$ARTIFACT/install" + - echo "# $ARTIFACT - install_dir '$install_dir'" >&2 + - mkdir -vp "$install_dir" - docker run --env prefix=/root/install --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" @@ -94,9 +145,9 @@ jobs: --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies opendap/rocky8_hyrax_builder:latest /root/hyrax-dependencies/travis/build-for-rocky8.sh - - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static-$TRAVIS_BUILD_NUMBER.tgz" + - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-$TRAVIS_BUILD_NUMBER.tgz" - echo "# $ARTIFACT - tarball_numbered '$tarball_numbered'" >&2 - - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static.tgz" + - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT.tgz" - echo "# $ARTIFACT - tarball_latest '$tarball_latest'" >&2 - mkdir -vp $TRAVIS_BUILD_DIR/package - tar -C "$HOME/$ARTIFACT/" -czvf "$tarball_numbered" install @@ -105,9 +156,10 @@ jobs: - ls -l $TRAVIS_BUILD_DIR/package/ - stage: build - name: "rocky9" + name: "rocky9 dynamic" script: - export ARTIFACT="rocky9" + - export EXPECTED_DEPS_COUNT=11 - echo "# $ARTIFACT - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 - export extra_targets="" - echo "# $ARTIFACT - extra_targets '$extra_targets'" >&2 @@ -121,9 +173,9 @@ jobs: --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies opendap/rocky9_hyrax_builder:latest /root/hyrax-dependencies/travis/build-for-rocky9.sh - - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static-$TRAVIS_BUILD_NUMBER.tgz" + - export tarball_numbered="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-$TRAVIS_BUILD_NUMBER.tgz" - echo "# $ARTIFACT - tarball_numbered '$tarball_numbered'" >&2 - - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT-static.tgz" + - export tarball_latest="$TRAVIS_BUILD_DIR/package/hyrax-dependencies-$ARTIFACT.tgz" - echo "# $ARTIFACT - tarball_latest '$tarball_latest'" >&2 - mkdir -vp $TRAVIS_BUILD_DIR/package - tar -C "$HOME/$ARTIFACT/" -czvf "$tarball_numbered" install diff --git a/travis/build-for-rocky8-static.sh b/travis/build-for-rocky8-static.sh new file mode 100755 index 0000000..0d38e84 --- /dev/null +++ b/travis/build-for-rocky8-static.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# +# Build the hyrax-dependencies binary tar ball for use with libdap and BES +# RPM builds. Uses the opendap/centos6_hyrax_builder:latest docker container +# (or the CentOS7 or CentOS-Stream8 version). +# +# Modified to take an optional parameter that denotes the version of the C++ +# compiler to use. Since C6 lacks a C++-11 compiler, this can be used to suppress +# building some of the dependencies. jhrg 10/28/19 +# Removed that for C7 anc CS8. jhrg 2/8/22 +# +# Now used for the rocky8 build. No change from the centos-stream8. jhrg 5/7/24 + +# -e: Exit immediately if a command, command in a pipeline, etc., fails +# -u: Treat unset variables in substitutions as errors (except for @ and *) +set -eu + +HR="#########################################################################" +########################################################################### +# loggy() +function loggy(){ + echo "$@" | awk '{ print "# rocky8 - "$0;}' >&2 +} +# This is not needed when the 'for-static-rpm' target is used below. That is +# a more robust way to build the static packages since some of them might not +# use configure, but cmake, e.g. jhrg 10/10/25 +# +# export CONFIGURE_FLAGS="--disable-shared" + +# Need to have 64 bit rpc code! +export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/tirpc" +export LDFLAGS="${LDFLAGS:-""} -ltirpc" + +# Why no libcurl already? No one knows... +export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/curl" +export LDFLAGS="${LDFLAGS:-""} -lcurl" + +# Why no sqlite already? Installed from yum! No one knows... +#export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include" +#export LDFLAGS="${LDFLAGS:-""} -lsqlite" + +loggy "$HR" +loggy "BEGIN $0" +loggy "Inside the docker container." +loggy " BUILD_NUMBER: $BUILD_NUMBER" +loggy " prefix: $prefix" +loggy " HOME: $HOME" +loggy " PATH: $PATH" +loggy " LDFLAGS: $LDFLAGS" +loggy " CPPFLAGS: $CPPFLAGS" +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "redhat-release: '$(cat /etc/redhat-release)'" +loggy " uname -a: '$(uname -a)'" +loggy " ldd --version: '$(ldd --version | head -1)'" +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "pkg-config --list-all:" +loggy "$(pkg-config --list-all)" +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "ENVIRONMENT:" +loggy "$(env)" +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "" +loggy "Running dnf update" +dnf -y update + +# Assume that the docker container has been started with the cloned repo +# mounted so it appears within 'root.' +cd /root/hyrax-dependencies + +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "Running: make for-static-rpm" +make -j16 for-static-rpm + +make list-built + +# Now clean out the binary images, which are huge for a static build. +# NB prefix = /root/install, set by the Docker run command +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "Cleanup..." +rm -f $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} +rm -rf $prefix/deps/proj-6/bin; + +loggy "END - $0" +loggy "$HR" + diff --git a/travis/build-for-rocky8.sh b/travis/build-for-rocky8.sh index 0d38e84..58bd5d3 100755 --- a/travis/build-for-rocky8.sh +++ b/travis/build-for-rocky8.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Build the hyrax-dependencies binary tar ball for use with libdap and BES -# RPM builds. Uses the opendap/centos6_hyrax_builder:latest docker container +# docker builds. Uses the opendap/centos6_hyrax_builder:latest docker container # (or the CentOS7 or CentOS-Stream8 version). # # Modified to take an optional parameter that denotes the version of the C++ @@ -21,11 +21,6 @@ HR="#########################################################################" function loggy(){ echo "$@" | awk '{ print "# rocky8 - "$0;}' >&2 } -# This is not needed when the 'for-static-rpm' target is used below. That is -# a more robust way to build the static packages since some of them might not -# use configure, but cmake, e.g. jhrg 10/10/25 -# -# export CONFIGURE_FLAGS="--disable-shared" # Need to have 64 bit rpc code! export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/tirpc" @@ -68,18 +63,10 @@ dnf -y update cd /root/hyrax-dependencies loggy "- - - - - - - - - - - - - - - - - - - - -" -loggy "Running: make for-static-rpm" -make -j16 for-static-rpm +loggy "Running: make for-travis" +make -j16 for-travis make list-built -# Now clean out the binary images, which are huge for a static build. -# NB prefix = /root/install, set by the Docker run command -loggy "- - - - - - - - - - - - - - - - - - - - -" -loggy "Cleanup..." -rm -f $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} -rm -rf $prefix/deps/proj-6/bin; - loggy "END - $0" loggy "$HR" - diff --git a/travis/build-for-rocky9-static.sh b/travis/build-for-rocky9-static.sh new file mode 100755 index 0000000..f888a0a --- /dev/null +++ b/travis/build-for-rocky9-static.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Build the hyrax-dependencies binary tar ball for use with libdap and BES +# RPM builds for RHEL9. Uses the docker container: +# opendap/rocky9_hyrax_builder:latest +# +# To build it, first we set up the directory into which we will put the results: +# +# install_dir=$HOME/rocky9/install +# mkdir -p "$install_dir" +# +# And then we use this script to build it by running the script in the docker container: +# +# docker run +# --env prefix=/root/install +# --volume $install_dir:/root/install +# --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies +# opendap/rocky9_hyrax_builder:latest +# /root/hyrax-dependencies/build-for-rocky9.sh +# +# We collect the results like this: +# tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static.tar.gz install +# + +# -e: Exit immediately if a command, command in a pipeline, etc., fails +# -u: Treat unset variables in substitutions as errors (except for @ and *) +set -eu + +# Formatted output shenanigans... +HR="#########################################################################" +########################################################################### +# loggy() +function loggy(){ + echo "$@" | awk '{ print "# rocky9 - "$0;}' >&2 +} + +# Need to have 64 bit rpc code! +export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/tirpc" +export LDFLAGS="${LDFLAGS:-""} -ltirpc" + +# Why no libcurl already? No one knows... +export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/curl" +export LDFLAGS="${LDFLAGS:-""} -lcurl" + +loggy "$HR" +loggy "BEGIN $0" +loggy "Inside the docker container." +loggy " BUILD_NUMBER: $BUILD_NUMBER" +loggy " prefix: $prefix" +loggy " HOME: $HOME" +loggy " PATH: $PATH" +loggy " LDFLAGS: $LDFLAGS" +loggy " CPPFLAGS: $CPPFLAGS" +loggy "redhat-release: \"$(cat /etc/redhat-release)\"" +loggy " Environment:" +loggy "$(env)" +loggy "uname -a: $(uname -a)" +loggy "- - - - - - - - - - - - - - - - - - - - -" +loggy "Running dnf update" +dnf -y update + +# Build only the static libraries so that when these are used during the BES +# RPM build we have packages that others can install. jhrg 2/8/22 +# +# Assume that the docker container has been started with the cloned repo +# mounted so it appears within '/root', cd into that spot to run the build... +cd /root/hyrax-dependencies + +loggy "Running: make for-static-rpm" +make -j16 for-static-rpm +make list-built + + +# Now clean out the binary images, which are huge for a static build. +# NB prefix = /root/install, set by the Docker run command +loggy "Cleanup..." +rm -vf $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} +rm -vrf $prefix/deps/proj-6/bin + +loggy "END - $0" + + + diff --git a/travis/build-for-rocky9.sh b/travis/build-for-rocky9.sh index f888a0a..a47b429 100755 --- a/travis/build-for-rocky9.sh +++ b/travis/build-for-rocky9.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Build the hyrax-dependencies binary tar ball for use with libdap and BES -# RPM builds for RHEL9. Uses the docker container: +# docker builds for RHEL9. Uses the docker container: # opendap/rocky9_hyrax_builder:latest # # To build it, first we set up the directory into which we will put the results: @@ -59,25 +59,13 @@ loggy "- - - - - - - - - - - - - - - - - - - - -" loggy "Running dnf update" dnf -y update -# Build only the static libraries so that when these are used during the BES -# RPM build we have packages that others can install. jhrg 2/8/22 -# + # Assume that the docker container has been started with the cloned repo # mounted so it appears within '/root', cd into that spot to run the build... cd /root/hyrax-dependencies -loggy "Running: make for-static-rpm" -make -j16 for-static-rpm +loggy "Running: make for-travis" +make -j16 for-travis make list-built - -# Now clean out the binary images, which are huge for a static build. -# NB prefix = /root/install, set by the Docker run command -loggy "Cleanup..." -rm -vf $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} -rm -vrf $prefix/deps/proj-6/bin - loggy "END - $0" - - -