Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
63 changes: 52 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,47 @@ jobs:
- tar -C $HOME -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-build.tar.gz install
- ./travis/check-installed $EXPECTED_DEPS_COUNT

# mkdir returns true if the directory already exists. This dir is used in 'before_deploy'.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wellll this all showed up oddly in gitthub formatting, but if you squint you can see that I kept the original two build jobs; renamed them, their ARTIFACT env var, and their build scripts to "*-static"; and then added duplicate non-static jobs (with associated non-static scripts).

- stage: build
name: "rocky8-static"
script:
- echo "# rocky8 - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2
- export extra_targets=""
- install_dir=$HOME/rocky8/install
- mkdir -p $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 ARTIFACT=rocky8-static
- mkdir -p $TRAVIS_BUILD_DIR/package
- tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8-static.tar.gz install
- ./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:
- echo "# rocky9 - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2
- export extra_targets=""
- install_dir=$HOME/rocky9/install
- mkdir -p $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 ARTIFACT=rocky9-static
- mkdir -p $TRAVIS_BUILD_DIR/package
- tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static-$TRAVIS_BUILD_NUMBER.gz install
- ./travis/check-installed $EXPECTED_DEPS_COUNT
- ls -l $TRAVIS_BUILD_DIR/package/

# mkdir returns true if the directory already exists. This dir is used in 'before_deploy'.
- stage: build
name: "rocky8"
Expand All @@ -80,16 +121,16 @@ jobs:
- export extra_targets=""
- install_dir=$HOME/rocky8/install
- mkdir -p $install_dir
- docker run
- 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
--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 ARTIFACT=rocky8
- mkdir -p $TRAVIS_BUILD_DIR/package
- tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8-static.tar.gz install
- tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8.tar.gz install
- ./travis/check-installed $EXPECTED_DEPS_COUNT
- ls -l $TRAVIS_BUILD_DIR/package/

Expand All @@ -100,16 +141,16 @@ jobs:
- export extra_targets=""
- install_dir=$HOME/rocky9/install
- mkdir -p $install_dir
- docker run
--env prefix=/root/install
- 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
--volume $install_dir:/root/install
--volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies
opendap/rocky9_hyrax_builder:latest
/root/hyrax-dependencies/travis/build-for-rocky9.sh
- export ARTIFACT=rocky9
- mkdir -p $TRAVIS_BUILD_DIR/package
- tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static-$TRAVIS_BUILD_NUMBER.gz install
- tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-$TRAVIS_BUILD_NUMBER.tar.gz install
- ./travis/check-installed $EXPECTED_DEPS_COUNT
- ls -l $TRAVIS_BUILD_DIR/package/

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