forked from eclipse-cyclonedds/cyclonedds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI build for Python language binding and tests
Signed-off-by: Dennis Potman <[email protected]>
- Loading branch information
Showing
3 changed files
with
158 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# | ||
# Copyright(c) 2023 ZettaScale Technology and others | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License v. 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
# v. 1.0 which is available at | ||
# http://www.eclipse.org/org/documents/edl-v10.php. | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
# | ||
|
||
steps: | ||
- bash: | | ||
sudo apt install -y clang clang-tools clang-tidy libboost-dev | ||
name: setup_linux | ||
displayName: Setup Linux | ||
- bash: | | ||
git clone --depth 1 --branch release-1.12.1 https://github.com/google/googletest.git | ||
mkdir googletest/build | ||
cd googletest/build | ||
cmake -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=on .. | ||
cmake --build . --config $BUILD_TYPE --target install -- -j 4 | ||
name: setup_googletest | ||
displayName: Setup Google Test | ||
- bash: | | ||
set -e -x | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX=install \ | ||
-DENABLE_SSL=off \ | ||
-DENABLE_SECURITY=off \ | ||
-DBUILD_TESTING=off \ | ||
-DBUILD_IDLC_XTESTS=off \ | ||
-DBUILD_EXAMPLES=off \ | ||
-DWERROR=on \ | ||
.. | ||
cmake --build . --config $BUILD_TYPE --target install -- -j 4 | ||
name: build_cyclonedds_c | ||
displayName: Build Cyclone C | ||
- bash: | | ||
git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx.git cyclonedds_cxx --branch master | ||
name: clone_cyclonedds_cxx | ||
displayName: Clone Cyclone C++ | ||
- bash: | | ||
set -e -x | ||
mkdir cyclonedds_cxx/build | ||
cd cyclonedds_cxx/build | ||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX=install \ | ||
-DCMAKE_PREFIX_PATH="$BUILD_SOURCESDIRECTORY/build/install;$BUILD_SOURCESDIRECTORY/googletest/build/install" \ | ||
-DBUILD_TESTING=on \ | ||
-DBUILD_EXAMPLES=on \ | ||
-DWERROR=on \ | ||
.. | ||
cmake --build . --config $BUILD_TYPE --target install -- -j 4 | ||
name: build_cyclonedds_cxx | ||
displayName: Build Cyclone C++ | ||
- bash: | | ||
cd cyclonedds_cxx/build | ||
ctest -j 4 --output-on-failure --schedule-random | ||
name: test_cyclonedds_cxx | ||
displayName: Run Cyclone C++ tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# Copyright(c) 2023 ZettaScale Technology and others | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License v. 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
# v. 1.0 which is available at | ||
# http://www.eclipse.org/org/documents/edl-v10.php. | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
# | ||
|
||
steps: | ||
- bash: | | ||
sudo apt install -y clang clang-tools clang-tidy | ||
name: setup_linux | ||
displayName: Setup Linux | ||
- bash: | | ||
set -e -x | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | ||
-DCMAKE_INSTALL_PREFIX=install \ | ||
-DENABLE_SSL=off \ | ||
-DENABLE_SECURITY=off \ | ||
-DBUILD_TESTING=off \ | ||
-DBUILD_IDLC_XTESTS=off \ | ||
-DBUILD_EXAMPLES=off \ | ||
-DWERROR=on \ | ||
.. | ||
cmake --build . --config $BUILD_TYPE --target install -- -j 4 | ||
name: build_cyclonedds_c | ||
displayName: Build Cyclone C | ||
- bash: | | ||
git clone https://github.com/eclipse-cyclonedds/cyclonedds-python.git cyclonedds_python --branch master | ||
name: clone_cyclonedds_py | ||
displayName: Clone the Python binding | ||
- bash: | | ||
set -e -x | ||
export CYCLONEDDS_HOME=$BUILD_SOURCESDIRECTORY/build/install | ||
export PATH=$PATH:$CYCLONEDDS_HOME/bin | ||
python -m pip install --user --upgrade pip wheel setuptools | ||
python -m pip install --user --upgrade pytest-azurepipelines | ||
python -m pip install --user ./cyclonedds_python[dev] | ||
name: install_cyclonedds_py | ||
displayName: Install Python binding | ||
- bash: | | ||
cd cyclonedds_python/tests | ||
python -m pytest .. -vv --no-coverage-upload --color=yes | ||
name: test_cyclonedds_py | ||
displayName: Run Python tests | ||
- bash: | | ||
set -e -x | ||
export CYCLONEDDS_HOME=$BUILD_SOURCESDIRECTORY/build/install | ||
export PATH=$PATH:$CYCLONEDDS_HOME/bin | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CYCLONEDDS_HOME/lib | ||
export CYCLONEDDS_URI= | ||
export RSEED=$(shuf -i 1-100000 -n 1) | ||
cd cyclonedds_python/tests | ||
echo "Random seed used: $RSEED" | ||
python -m pytest .. -vv --no-coverage-upload --color=yes -k fuzzy --fuzzing num_types=100 type_seed=$RSEED -s | ||
name: test_cyclonedds_py_fuzzing | ||
displayName: Run Python fuzzing tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters