diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 101f46b868f615c7ab0e8f241acbf90034a8482c..7d598c07481ec7660fa3ddbbadee7f15335180f7 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -5,14 +5,24 @@ build:ubuntu_cpp: image: n2d2-ci/ubuntu20.04/cpu:latest script: + - INSTALL_PATH="$PWD/install_cpp" + - mkdir -p $INSTALL_PATH - mkdir -p build_cpp - - mkdir -p install_cpp + + # Clone and compile dependencies + - MODULE_NAME="aidge_core" - BASE_URL=`echo $CI_REPOSITORY_URL | sed "s;\/*$CI_PROJECT_PATH.*;;"` - - REPO_URL="$BASE_URL/aidge/aidge_core.git" - - echo $REPO_URL - - echo $BASE_URL + - REPO_URL="$BASE_URL/aidge/$MODULE_NAME.git" + - git clone $REPO_URL $MODULE_NAME + - mkdir -p $MODULE_NAME/build + - cd $MODULE_NAME/build + - cmake -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON .. + + - cd ../.. + + # Build current module - cd build_cpp - - cmake -DCMAKE_INSTALL_PREFIX:PATH=../install_cpp -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON .. + - cmake -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON .. - make -j4 all install artifacts: @@ -27,11 +37,25 @@ build:ubuntu_python: image: n2d2-ci/ubuntu20.04/cpu:latest script: + - export AIDGE_INSTALL=`pwd`/install + + # Create virtaul env - python3 -m pip install virtualenv - virtualenv venv - source venv/bin/activate - - export AIDGE_INSTALL=`pwd`/install - - python3 -m pip install . + + # Clone dependencies + - MODULE_NAME="aidge_core" + - BASE_URL=`echo $CI_REPOSITORY_URL | sed "s;\/*$CI_PROJECT_PATH.*;;"` + - REPO_URL="$BASE_URL/aidge/$MODULE_NAME.git" + - git clone $REPO_URL $MODULE_NAME + + # Pip install dependancy + - cd $MODULE_NAME + - python3 -m pip install . -v + + - cd .. + - python3 -m pip install . -v artifacts: paths: - venv/ \ No newline at end of file