Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 62 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was supposed to be removed via #96 but I must have missed it (or borked a merge somewhere...)

- 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
Expand All @@ -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
Expand All @@ -87,16 +83,71 @@ 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/
Comment on lines +86 to +101
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no changes as compared to the original rocky8 job EXCEPT to rename the build script being used to build-for-rocky8-static.sh (instead of build-for-rocky8.sh). Ditto for rocky9.


- 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"
--volume $install_dir:/root/install
--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
Expand All @@ -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
Expand All @@ -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
Expand Down
85 changes: 85 additions & 0 deletions travis/build-for-rocky8-static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from previous build-for-rocky8.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"

19 changes: 3 additions & 16 deletions travis/build-for-rocky8.sh
Original file line number Diff line number Diff line change
@@ -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++
Expand All @@ -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"
Expand Down Expand Up @@ -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"

83 changes: 83 additions & 0 deletions travis/build-for-rocky9-static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from previous build-for-rocky9.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"



20 changes: 4 additions & 16 deletions travis/build-for-rocky9.sh
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"



Loading