Skip to content
Snippets Groups Projects
Commit fb3028ce authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

custom install dir test

parent 5f684181
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -15,8 +15,8 @@ config:ubuntu_zesty:
image: keckj/hysop:ubuntu_zesty
stage: configure
script:
- "sh ci/scripts/config.sh ./build/gcc-6 gcc-6 g++-6 gfortran-6"
- "sh ci/scripts/config.sh ./build/clang-6 clang-6.0 clang++-6.0 gfortran-6"
- "sh ci/scripts/config.sh ./build/gcc-6 ./install/gcc-6 gcc-6 g++-6 gfortran-6"
- "sh ci/scripts/config.sh ./build/clang-6 ./install/clang-6 clang-6.0 clang++-6.0 gfortran-6"
dependencies:
- env:ubuntu_zesty
artifacts:
......@@ -27,7 +27,7 @@ build:ubuntu_zesty:
image: keckj/hysop:ubuntu_zesty
stage: build
script:
- "sh ci/scripts/build.sh ./build/gcc-6 gcc-6 g++-6 gfortran-6"
- "sh ci/scripts/build.sh ./build/gcc-6 gcc-6 g++-6 gfortran-6"
- "sh ci/scripts/build.sh ./build/clang-6 clang-6.0 clang++-6.0 gfortran-6"
dependencies:
- config:ubuntu_zesty
......@@ -39,7 +39,7 @@ install:ubuntu_zesty:
image: keckj/hysop:ubuntu_zesty
stage: install
script:
- "sh ci/scripts/install.sh ./build/gcc-6"
- "sh ci/scripts/install.sh ./build/gcc-6 ./install/gcc-6"
dependencies:
- build:ubuntu_zesty
artifacts:
......@@ -55,10 +55,9 @@ test:ubuntu_zesty:
- mkdir -p "/home/hysoprunner"
- chown hysoprunner:hysoprunner "/home/hysoprunner"
- chmod u+rw "/home/hysoprunner"
- chown hysoprunner:hysoprunner "/root/.local/lib/python2.7/site-packages/hysop"
- chmod u+rx "/root/.local/lib/python2.7/site-packages/hysop"
- export PYTHON_PATH="/root/.local/lib/python2.7/site-packages/hysop"
- su hysoprunner -c "sh ci/scripts/test.sh"
- chown hysoprunner:hysoprunner "./install/gcc-6/lib/python2.7/site-packages/hysop"
- chmod u+rx "./install/gcc-6/python2.7/site-packages/hysop"
- su hysoprunner -c "sh ci/scripts/test.sh ./install/gcc-6"
dependencies:
- install:ubuntu_zesty
cache:
......
#!/bin/bash
set -e
if [ $# -ne 4 ]; then
if [ $# -ne 5 ]; then
echo "Usage ./build build_folder CC CXX FC"
exit 1
fi
......
......@@ -2,7 +2,7 @@
set -e
if [ $# -ne 4 ]; then
echo "Usage ./config build_folder CC CXX FC"
echo "Usage ./config build_folder install_folder CC CXX FC"
exit 1
fi
......@@ -11,12 +11,18 @@ if [ -d "$1" ]; then
exit 1
fi
if [ -d "$2" ]; then
echo "Folder $2 already exists."
exit 1
fi
ROOT_DIR="$(pwd)"
BUILD_DIR="$1"
INSTALL_DIR="$2"
mkdir -p $BUILD_DIR
cd $BUILD_DIR
CC="$2" CXX="$3" FC="$4" cmake -DCMAKE_BUILD_TYPE=Release $ROOT_DIR
CC="$3" CXX="$4" FC="$5" cmake -DCMAKE_BUILD_TYPE=Release -DHYSOP_INSTALL=$INSTALL_DIR $ROOT_DIR
if [ ! -f Makefile ]; then
echo "The makefile has not been generated."
......
......@@ -2,8 +2,8 @@
#!/bin/bash
set -e
if [ $# -ne 1 ]; then
echo "Usage ./install build_folder"
if [ $# -ne 2 ]; then
echo "Usage ./install build_folder install_folder"
exit 1
fi
......@@ -12,10 +12,17 @@ if [ ! -d "$1" ]; then
exit 1
fi
if [ ! -d "$2" ]; then
echo "Folder {} does not exist."
exit 1
fi
BUILD_FOLDER="$1"
INSTALL_FOLDER="$2"
cd $BUILD_FOLDER
make install
export PYTHONPATH=$INSTALL_FOLDER
python -c 'import hysop; print hysop'
exit 0
#!/bin/bash
set -e
if [ $# -ne 0 ]; then
echo "Usage ./test"
if [ $# -ne 1 ]; then
echo "Usage ./test install_folder"
exit 1
fi
if [ ! -d "$0" ]; then
echo "Folder {} does not exist."
exit 1
fi
export PYTHONPATH=$0
python -c 'import hysop; print hysop'
python './hysop/operator/test_transpose.py'
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment