Skip to content
Snippets Groups Projects
Commit dbfdb33f authored by Kristina Mazur's avatar Kristina Mazur
Browse files

Delete build* from gitignore due to ci build script

parent 6afc84c7
No related branches found
No related tags found
No related merge requests found
Pipeline #1556254 failed
# In contrast to testFramework, we don't need a clean repo folder as the unicado repository
# folder is the equivalent
build-integration-test:
stage: build
tags:
- INTEGRATION-TEST
needs:
- setup-integration-test
cache:
when: always
paths:
- ${CI_PROJECT_DIR}
script:
- export NAME_MODIFIED_TOOL=$(cat NAME_MODIFIED_TOOL.env)
- export DEBIAN_FRONTEND="noninteractive"
- |
apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq --no-install-recommends apt-utils && \
apt-get install -y -qq --no-install-recommends git build-essential cmake python3 python3-dev libeigen3-dev \
libcgal-dev libgmp-dev libmpfr-dev libboost-all-dev python3-pip > /dev/null
- pip3 install pipenv --break-system-packages > /dev/null
- pipenv --python /usr/bin/python3 install > /dev/null
## Make gnuplot and inkscape executable
- chmod +x ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_GNUPLOT}/gnuplot
- chmod +x ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_INKSCAPE}/inkscape
## Modify CMakeLists.txt to only configure modified tool
- cd ${DIR_UNICADO}/aircraftDesign
- cp ${CI_PROJECT_DIR}/.ci-scripts/utils/modify_CMakeLists_to_configure_only.py .
- python3 modify_CMakeLists_to_configure_only.py "${NAME_MODIFIED_TOOL}"
## "Build former called clean repo - now within UNICADO"
- cmake -B build -S . --preset x64-linux-release --fresh # -DFIND_LIBRARIES_AS_PACKAGE=ON -DCMAKE_PREFIX_PATH=../libs >/dev/null
- cmake --build --preset x64-linux-release --target ${NAME_MODIFIED_TOOL} -j4 # Assume 4 cores
- cd ${CI_PROJECT_DIR}/${DIR_UNICADO}
## Modify CMakeLists.txt to only configure ${DIR_DESIGN_EVALUATOR}
- cd additionalSoftware
- cp ${CI_PROJECT_DIR}/.ci-scripts/utils/modify_CMakeLists_to_configure_only.py .
- python3 modify_CMakeLists_to_configure_only.py "${DIR_DESIGN_EVALUATOR}"
## "Build ${DIR_DESIGN_EVALUATOR} in unicado repo"
- cmake -B build -S . --preset x64-linux-release --fresh
- cmake --build --preset x64-linux-release --target ${DIR_DESIGN_EVALUATOR} -j4
- cd ${CI_PROJECT_DIR}/${DIR_UNICADO}
## Create project and copy gnuplot and linux into AD repo of UNICADO (Clean repo) if not existent
- cd ${PATH_CLEAN_AIRCRAFT_DESIGN}
- |
if [ ! -d "${DIR_PROJECTS}" ]; then
mkdir ${DIR_PROJECTS} && cd ${DIR_PROJECTS}/ && mkdir ${NAME_AIRCRAFT_TYPE} && cd ${NAME_AIRCRAFT_TYPE} && mkdir ${NAME_AIRCRAFT_VERSION} && cd ${PATH_CLEAN_AIRCRAFT_DESIGN}
cp -rf ${PATH_CLEAN_AIRCRAFT_REFERENCES}/${NAME_AIRCRAFT_TYPE}/${NAME_AIRCRAFT_VERSION}/cleanSheetDesign/* ${PATH_CLEAN_IO_DIR}
fi
- if [ ! -d "${DIR_GNUPLOT}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_GNUPLOT} .; fi
- if [ ! -d "${DIR_INKSCAPE}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_INKSCAPE} .; fi
- if [ ! -d "${DIR_DESIGN_EVALUATOR}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_DESIGN_EVALUATOR} .; fi
## Modify CMakeLists.txt to only configure modified tool
- cd ${CI_PROJECT_DIR}
- cp .ci-scripts/utils/modify_CMakeLists_to_configure_only.py .
- python3 modify_CMakeLists_to_configure_only.py "${NAME_MODIFIED_TOOL}"
## Same game for so called "local" repo
- cmake -B build -S . --preset x64-linux-release --fresh
- cmake --build --preset x64-linux-release --target ${NAME_MODIFIED_TOOL} -j4
## "Copy built ${DIR_DESIGN_EVALUATOR} from unicado repo to local repo"
- if [ ! -d "${DIR_DESIGN_EVALUATOR}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_DESIGN_EVALUATOR} .; fi
## Create ${DIR_PROJECTS} folder and copy aircraft reference design
- |
if [ ! -d "${DIR_PROJECTS}" ]; then
mkdir ${DIR_PROJECTS} && cd ${DIR_PROJECTS}/ && mkdir ${NAME_AIRCRAFT_TYPE} && cd ${NAME_AIRCRAFT_TYPE} && mkdir ${NAME_AIRCRAFT_VERSION} && cd ${CI_PROJECT_DIR}
cp -rf ${PATH_CLEAN_AIRCRAFT_REFERENCES}/${NAME_AIRCRAFT_TYPE}/${NAME_AIRCRAFT_VERSION}/cleanSheetDesign/* ${PATH_LOCAL_IO_DIR}
fi
## "Copy gnuplot and inkscape"
- if [ ! -d "${DIR_GNUPLOT}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_GNUPLOT} .; fi
- if [ ! -d "${DIR_INKSCAPE}" ]; then cp -rf ${PATH_CLEAN_ADDITIONAL_SOFTWARE}/${DIR_INKSCAPE} .; fi
## Clean up git repositories. This will hopefully reduce the cache size significantly.
- cd ${CI_PROJECT_DIR}
- if [ -d ".git" ]; then rm -rf .git; fi
- if [ -d "build" ]; then rm -rf build; fi
\ No newline at end of file
......@@ -65,7 +65,6 @@ __pycache__
# Build directories
build
build*
# CMake user files
CMakeUserPresets.json
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