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: ...@@ -9,5 +9,8 @@ variables:
GIT_SSL_NO_VERIFY: 1 GIT_SSL_NO_VERIFY: 1
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
default:
image: n2d2-ci/ubuntu20.04/cpu:latest image: nvidia/cuda:12.2.0-devel-ubuntu22.04
\ No newline at end of file before_script:
- apt update
- apt install -y cmake cppcheck python-is-python3 pip git gcovr
...@@ -2,24 +2,13 @@ build:ubuntu_cpp: ...@@ -2,24 +2,13 @@ build:ubuntu_cpp:
stage: build stage: build
tags: tags:
- docker - docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script: script:
- INSTALL_PATH="$CI_PROJECT_DIR/install_cpp" # Download dependencies
- mkdir -p $INSTALL_PATH # aidge_core
- mkdir -p build_cpp - '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 # Build current module
- cd build_cpp - cd build_cpp
- cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON .. - cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON ..
...@@ -34,28 +23,17 @@ build:ubuntu_python: ...@@ -34,28 +23,17 @@ build:ubuntu_python:
stage: build stage: build
tags: tags:
- docker - docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script: 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 - python3 -m pip install virtualenv
- virtualenv venv - virtualenv venv
- source venv/bin/activate - source venv/bin/activate
- export AIDGE_INSTALL=`pwd`/install
# Clone dependencies - python3 -m pip install .
- 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: artifacts:
paths: paths:
- venv/ - venv/
\ No newline at end of file
...@@ -3,22 +3,26 @@ test:ubuntu_cpp: ...@@ -3,22 +3,26 @@ test:ubuntu_cpp:
needs: ["build:ubuntu_cpp"] needs: ["build:ubuntu_cpp"]
tags: tags:
- docker - docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script: script:
- cd build_cpp - 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: test:ubuntu_python:
stage: test stage: test
needs: ["build:ubuntu_python"] needs: ["build:ubuntu_python"]
tags: tags:
- docker - docker
image: n2d2-ci/ubuntu20.04/cpu:latest
script: script:
- source venv/bin/activate - source venv/bin/activate
- cd aidge_backend_cpu - cd aidge_backend_cpu
- python3 -m pip install numpy - python3 -m pip install numpy unittest-xml-reporting
- python3 -m pip list - python3 -m pip list
# Run on discovery all tests located in core/unit_tests/python and discard the stdout # 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 # 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