Skip to content
Snippets Groups Projects
Commit fd2e02ab authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

Merge branch 'fix_disable_windows_release' into 'main'

fix : disabling windows release & -DWERROR=1  + dependencies fix

See merge request !7
parents 2fbe715e a76f66ed
No related branches found
No related tags found
1 merge request!7fix : disabling windows release & -DWERROR=1 + dependencies fix
......@@ -5,11 +5,14 @@ release:pip:windows:
extends: .release:pip:template
image: mcr.microsoft.com/powershell:latest
tags:
- windows
- windows
# temporary rules until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/136 is closed
rules :
- when : never
needs:
- build:windows_python
- test:windows_python
parallel:
matrix:
......@@ -39,5 +42,6 @@ release:pip:windows:
deploy:pip:windows:
allow_failure: true # temporary rules until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/136 is closed
extends:
- .deploy:pip:windows:template
......@@ -26,7 +26,7 @@ include:
- origin:eclipse # allow to target eclipse runner that holds the key for pypi upload
image : eclipsecbi/buildpack-deps
extends:
- .rules:release
- .rules:deploy
- .secrets # given by the file included just above
id_tokens:
VAULT_ID_TOKEN:
......@@ -56,8 +56,10 @@ include:
needs: [release:pip:ubuntu]
extends:
- .deploy:template
- .rules:deploy
.deploy:pip:windows:template:
needs: [release:pip:windows]
extends:
- .deploy:template
- .rules:deploy
.rules:static_analysis_coverage:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TITLE !~ /^Draft:/
when: always
when: on_success
allow_failure: false
- when: manual
- allow_failure: true
when: manual
allow_failure: true
.rules:build:merge_pipeline:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TITLE !~ /^Draft:/
allow_failure: false
when: always
- when: manual
- allow_failure: false
when: manual
allow_failure: true
# creating release jobs only when merging to main
.rules:release:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- allow_failure: false
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
allow_failure: false
# deploying created releases
# when creating a commit tag & previous release job was successful
.rules:deploy:
rules:
- if: $CI_COMMIT_TAG
allow_failure: false
when: on_success
......@@ -6,12 +6,16 @@ static_analysis:cpp:
extends: .rules:static_analysis_coverage
tags:
- static_analysis
before_script :
- apt-get update
- apt-get install -y cppcheck python-is-python3 python3-pip
- python -m pip install Pygments
- python -m pip install -U cppcheck_codequality
script:
- mkdir -p $CI_COMMIT_REF_NAME
- cppcheck -j 4 --enable=all --inconclusive --force --xml --xml-version=2 . 2> cppcheck-result.xml
- python -m pip install Pygments
- cppcheck-htmlreport --file=cppcheck-result.xml --report-dir=$CI_COMMIT_REF_NAME --source-dir=src
- python3 -m pip install -U cppcheck_codequality
- cppcheck-codequality --input-file=cppcheck-result.xml --output-file=cppcheck.json
- mkdir -p public/cpp
- mv $CI_COMMIT_REF_NAME public/cpp/
......
......@@ -6,9 +6,17 @@ static_analysis:python:
extends: .rules:static_analysis_coverage
tags:
- static_analysis
before_script:
- apt-get update
- apt-get install -y python-is-python3 python3-pip
- python -m pip install pylint pylint-gitlab
script:
- pip install pylint
- pip install pylint-gitlab
- echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- echo $CI_DEFAULT_BRANCH
- echo $CI_PIPELINE_SOURCE
- echo $CI_COMMIT_BRANCH
- echo $CI_COMMIT_TAG
- pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter ${CI_PROJECT_NAME}/ > codeclimate.json
- pylint --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter ${CI_PROJECT_NAME}/ > pylint.html
- mkdir -p public/python/$CI_COMMIT_REF_NAME
......
......@@ -44,7 +44,8 @@ build:ubuntu_cpp:
extends: .build:ubuntu_cpp:template
script:
- cd $BUILD_DIR
- cmake -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DPYBIND=0 ..
# WERROR=OFF until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/137 is not closed
- cmake -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DPYBIND=0 ..
- make -j4 all install
......@@ -60,11 +61,11 @@ build:ubuntu_cpp:g++:
matrix:
- Gplusplus_VERSION: ["10","12"]
script:
- echo "Build directory :$BUILD_DIR"
- cd $BUILD_DIR
- apt-get install -y g++-$Gplusplus_VERSION
- export CXX=/usr/bin/g++-$Gplusplus_VERSION
- cmake -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DCOVERAGE=OFF -DPYBIND=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- export CXX=/usr/bin/g++-$Gplusplus_VERSION
# WERROR=OFF until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/137 is not closed
- cmake -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF -DCOVERAGE=OFF -DPYBIND=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- make -j4 all install
build:ubuntu_cpp:clang:
......@@ -79,11 +80,10 @@ build:ubuntu_cpp:clang:
matrix:
- CLANG_VERSION: ["12","15"]
script:
- echo "Build directory :$BUILD_DIR"
- cd $BUILD_DIR
- apt-get install -y clang-$CLANG_VERSION
- export CXX=/usr/bin/clang++-$CLANG_VERSION
- cmake -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DCOVERAGE=OFF -DPYBIND=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
# WERROR=OFF until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/137 is not closed
- cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-$CLANG_VERSION -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF -DCOVERAGE=OFF -DPYBIND=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- make -j4 all install
......
......@@ -50,7 +50,7 @@ test:ubuntu_python:
- !reference [.retrieve_deps:apt, script]
script:
- source venv/bin/activate
- python3 -m pip install unittest-xml-reporting
- python -m pip install unittest-xml-reporting
- >
if [[ "$CI_PROJECT_NAME" == "aidge_onnx" ]]; then
python3 -m pip install requests
......@@ -59,7 +59,7 @@ test:ubuntu_python:
# Run on discovery all tests located in project/unit_tests/python and discard the stdout
# only to show the errors/warnings and the results of the tests
- python -m pip list
- python3 -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
- python -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
artifacts:
reports:
......@@ -74,16 +74,19 @@ coverage:ubuntu_python:
extends: .rules:static_analysis_coverage
tags:
- docker
script:
before_script:
- apt-get update
- apt-get install -y python-is-python3 python3-pip cmake # cmake for aidge_core tests
- source venv/bin/activate
- python3 -m pip install numpy coverage requests
- python3 -m pip list
- python -m pip install numpy coverage requests unittest-xml-reporting
script:
- cd ${CI_PROJECT_NAME}
# Retrieve the installation path of the module, since it is installed with pip.
- export MODULE_LOCATION=`python -c "import ${CI_PROJECT_NAME} as _; print(_.__path__[0])"`
- python3 -m coverage run --source=$MODULE_LOCATION -m unittest discover -s unit_tests/ -v -b
- python3 -m coverage report
- python3 -m coverage xml
- python -m coverage run --source=$MODULE_LOCATION -m unittest discover -s unit_tests/ -v -b
- python -m coverage report
- python -m coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
......
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