Skip to content
Snippets Groups Projects

move branch from fork to official repo

10 files
+ 686
131
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 119
0
include:
- local: '/.gitlab/ci/common.gitlab-ci.yml'
.build:variable:aidge_install:
variables:
AIDGE_INSTALL: "../install_cpp" # aidge installation dir, will serve as cmake_install_prefix
.build:ubuntu_cpp:template:
stage: build
needs: []
rules:
allow_failure: false
extends: .build:variable:aidge_install
tags:
- docker
before_script:
# Download dependencies
# aidge_core
- apt update
- apt install -qq -y cmake cppcheck python-is-python3 pip git gcovr unzip curl jq
- DEPENDENCY_JOB="build:ubuntu_cpp"
- !reference [.retrieve:artifacts, script] # located in common.gitlab-ci.yml
# Build current module
- export CMAKE_PREFIX_PATH=$AIDGE_INSTALL
- mkdir -p build_cpp
- set -x
- echo ${AIDGE_INSTALL}
- echo ${AIDGE_INSTALL/"../"}
- echo ${AIDGE_INSTALL/"..\/"}
- mkdir -p ${AIDGE_INSTALL/"..\/"} # strips the variable of "../"
- set +x
build:ubuntu_cpp:
extends: .build:ubuntu_cpp:template
script:
- cd build_cpp
- cmake -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- make -j4 all install
artifacts:
expire_in: 1 week
paths:
- build_cpp/
- ${AIDGE_INSTALL/"../"}/
build:ubuntu_cpp:g++:
stage: build
needs: []
extends:
- .build:ubuntu_cpp:template
- .rules:merge_pipeline
tags:
- docker
parallel:
matrix:
- G++_VERSION: ["10","12"]
script:
- cd build_cpp
- apt install -y g++-$G++_VERSION
- export CXX=/usr/bin/g++-$G++_VERSION
- cmake -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- make -j4 all install
build:ubuntu_cpp:clang:
stage: build
needs: []
extends:
- .build:ubuntu_cpp:template
- .rules:merge_pipeline
tags:
- docker
parallel:
matrix:
- CLANG_VERSION: ["12","15"]
script:
- cd build_cpp
- apt install -y clang-$CLANG_VERSION
- export CXX=/usr/bin/clang++-$CLANG_VERSION
- cmake -DCMAKE_BUILD_TYPE=Debug -DWERROR=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
- make -j4 all install
build:windows_cpp:
stage: build
needs: []
extends: .build:variable:aidge_install
tags:
- windows
image: buildtools
before_script:
# Install Chocolatey
- Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install dependencies
- choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y
- choco install git -Y
- choco install python -Y
# Update PATH
- $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
script:
# Download dependencies
# aidge_core
- $DEPENDENCY_JOB="build:windows_cpp"
- !reference [.download_dependency_windows, script]
- Remove-Item .\build_cpp\ -Recurse -Force -ErrorAction Ignore
- mkdir -p build_cpp
- cd build_cpp
- cmake -DCMAKE_INSTALL_PREFIX:PATH=../install_cpp -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . -j2
- cmake --install . --config Debug
artifacts:
expire_in: 1 week
paths:
- build_cpp/
- $AIDGE_INSTALL/
Loading