Skip to content
Snippets Groups Projects
Commit 23c667ce authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Adapted CI for OVH

parent 54e1a95b
No related branches found
No related tags found
No related merge requests found
......@@ -9,5 +9,8 @@ variables:
GIT_SSL_NO_VERIFY: 1
DEBIAN_FRONTEND: noninteractive
image: n2d2-ci/ubuntu20.04/cpu:latest
\ No newline at end of file
default:
image: nvidia/cuda:12.2.0-devel-ubuntu22.04
before_script:
- apt update
- apt install -y cmake cppcheck python-is-python3 pip git gcovr
......@@ -2,24 +2,13 @@ build:ubuntu_cpp:
stage: build
tags:
- docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script:
- INSTALL_PATH="$CI_PROJECT_DIR/install_cpp"
- mkdir -p $INSTALL_PATH
- mkdir -p build_cpp
# Download dependencies
# aidge_core
- 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:ubuntu_cpp"'
- unzip -o build_artifacts.zip -d .
- rm -rf build_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/$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 ..
- make -j4 all install
- cd ../..
# Build current module
- cd build_cpp
- cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON ..
......@@ -34,28 +23,17 @@ build:ubuntu_python:
stage: build
tags:
- docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script:
- export AIDGE_INSTALL=`pwd`/install
# Download dependencies
# aidge_core
- 'curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/5139/jobs/artifacts/main/download?job=build:ubuntu_python"'
- unzip -o build_artifacts.zip -d .
# Create virtaul env
- python3 -m pip install virtualenv
- virtualenv venv
- source venv/bin/activate
# 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
- export AIDGE_INSTALL=`pwd`/install
- python3 -m pip install .
artifacts:
paths:
- venv/
\ No newline at end of file
......@@ -3,22 +3,26 @@ test:ubuntu_cpp:
needs: ["build:ubuntu_cpp"]
tags:
- docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script:
- cd build_cpp
- ctest --output-on-failure
- ctest --output-junit ctest-results.xml --output-on-failure
artifacts:
reports:
junit: build_cpp/ctest-results.xml
test:ubuntu_python:
stage: test
needs: ["build:ubuntu_python"]
tags:
- docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script:
- source venv/bin/activate
- cd aidge_backend_cpu
- python3 -m pip install numpy
- python3 -m pip install numpy unittest-xml-reporting
- python3 -m pip list
# Run on discovery all tests located in core/unit_tests/python and discard the stdout
# only to show the errors/warnings and the results of the tests
- python3 -m unittest discover -s unit_tests/ -v -b 1> /dev/null
- python3 -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
artifacts:
reports:
junit: aidge_core/xmlrunner-results.xml
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