fix install path when DESTDIR is used in make install command line #239
Workflow file for this run
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
name: ubuntu_openmpi | |
on: | |
push: | |
branches: master | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '**/*.1' | |
- 'docs/*' | |
- 'test/test_installed/*' | |
pull_request: | |
branches: master | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '**/*.1' | |
- 'docs/*' | |
- 'test/test_installed/*' | |
env: | |
OPENMPI_VERSION: 5.0.2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install automake autoconf libtool libtool-bin m4 | |
# install gfortran | |
version=12 | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y gcc-${version} gfortran-${version} | |
sudo update-alternatives \ | |
--install /usr/bin/gcc gcc /usr/bin/gcc-${version} 100 \ | |
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${version} \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-${version} | |
echo "---- gcc/gfortran version ------------------------------" | |
which gcc | |
which gfortran | |
gcc --version | |
gfortran --version | |
- name: Build OPENMPI | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
echo "Install OPENMPI ${OPENMPI_VERSION} in ${GITHUB_WORKSPACE}/OPENMPI" | |
rm -rf OPENMPI ; mkdir OPENMPI ; cd OPENMPI | |
VER_MAJOR=${OPENMPI_VERSION%.*} | |
wget -q https://download.open-mpi.org/release/open-mpi/v${VER_MAJOR}/openmpi-${OPENMPI_VERSION}.tar.gz | |
gzip -dc openmpi-${OPENMPI_VERSION}.tar.gz | tar -xf - | |
cd openmpi-${OPENMPI_VERSION} | |
./configure --prefix=${GITHUB_WORKSPACE}/OPENMPI \ | |
--silent \ | |
--with-io-romio-flags="--with-file-system=ufs" \ | |
CC=gcc \ | |
FC=gfortran \ | |
FCFLAGS=-fallow-argument-mismatch | |
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 | |
make -s -j 4 distclean >> qout 2>&1 | |
- name: Build PnetCDF | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
autoreconf -i | |
mkdir -p pnetcdf_output | |
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \ | |
--enable-option-checking=fatal \ | |
--enable-profiling \ | |
pnc_ac_debug=yes \ | |
--enable-burst_buffering \ | |
--enable-subfiling \ | |
--enable-thread-safe \ | |
--with-pthread \ | |
--with-mpi=${GITHUB_WORKSPACE}/OPENMPI \ | |
TESTMPIRUN="${GITHUB_WORKSPACE}/OPENMPI/bin/mpiexec --oversubscribe -n NP" \ | |
TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output | |
make -j 8 tests | |
- name: Print config.log | |
if: ${{ always() }} | |
run: | | |
cat ${GITHUB_WORKSPACE}/config.log | |
- name: make check | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make check | |
- name: Print test log files | |
if: ${{ always() }} | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
fname=`find src test examples benchmarks -type f -name "*.log"` | |
for f in $fname ; do \ | |
bname=`basename $f` ; \ | |
if test "x$bname" != xconfig.log ; then \ | |
echo "-------- dump $f ----------------------------" ; \ | |
cat $f ; \ | |
fi ; \ | |
done | |
- name: make ptests | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make ptests | |
- name: make distcheck | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/OPENMPI" | |
- name: make install | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
prefix_path=${GITHUB_WORKSPACE}/pnetcdf_install | |
echo "---- test make install prefix=${prefix_path}" | |
make install prefix=${prefix_path} | |
test/tst_install.sh ${prefix_path} | |
prefix_path=pnetcdf_install | |
destdir_path=${GITHUB_WORKSPACE}/inst/ | |
echo "---- test make install prefix=${prefix_path} DESTDIR=${destdir_path}/" | |
make install prefix=${prefix_path} DESTDIR=${destdir_path}/ | |
test/tst_install.sh ${destdir_path}${prefix_path} | |
- name: Cleanup | |
if: ${{ always() }} | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make -s distclean | |
rm -rf ${GITHUB_WORKSPACE}/pnetcdf_output | |
rm -rf ${GITHUB_WORKSPACE}/OPENMPI | |
rm -rf ${GITHUB_WORKSPACE}/pnetcdf_install | |
rm -rf ${GITHUB_WORKSPACE}/inst | |