Files
unison/utils/tests/gitlab-ci-cppyy.yml
Eduardo Almeida a7db1484ae ci: Fix cppyy jobs
- Use modern GitLab rules and quotes
- Fix artifacts::when indentation in manylinux jobs
- Set the stage of the jobs
2023-06-05 11:43:55 +01:00

177 lines
5.6 KiB
YAML

cppyy-22.04:
stage: test
image: ubuntu:22.04 # python 3.10
rules:
- if: $RELEASE == "weekly"
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
needs: ["weekly-slow-jobs"]
dependencies: []
tags:
- nsnam
- linux
before_script:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
g++ cmake ninja-build ccache
python3 python3-pip
libboost-dev libgsl-dev libgtk-3-dev
git wget
- pip install cppyy==2.4.2 matplotlib numpy
script:
- ./ns3 configure -G Ninja --enable-python-bindings
- ./ns3 build
- ./ns3 run first.py
- ./ns3 run second.py
- ./ns3 run third.py
- ./ns3 run wifi-ap.py
- ./ns3 run simple-routing-ping6.py
- ./ns3 run realtime-udp-echo.py
- ./ns3 run sample-simulator.py
- ./ns3 run "sample-rng-plot.py --not-blocking"
- ./ns3 run csma-bridge.py
- ./ns3 run wifi-olsr-flowmon.py
- ./ns3 run "flowmon-parse-results.py output.xml"
- ./ns3 run mixed-wired-wireless.py
- ./ns3 run ./utils/python-unit-tests.py
timeout: 9h
cppyy-20.04:
stage: test
image: ubuntu:20.04 # python 3.8
rules:
- if: $RELEASE == "manual"
tags:
- nsnam
- linux
before_script:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
g++ cmake ninja-build ccache
python3 python3-pip
libboost-dev libgsl-dev libgtk-3-dev
git wget
- pip install cppyy==2.4.2
script:
- ./ns3 configure -G Ninja --enable-python-bindings
- ./ns3 build
- ./ns3 run first.py
- ./ns3 run second.py
- ./ns3 run third.py
- ./ns3 run ./utils/python-unit-tests.py
timeout: 9h
cppyy-18.04:
stage: test
image: ubuntu:18.04 # python 3.6
rules:
- if: $RELEASE == "manual"
tags:
- nsnam
- linux
before_script:
- apt update
- apt install -y software-properties-common
- add-apt-repository ppa:ubuntu-toolchain-r/test -y
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
g++-9 gcc-9 cmake ninja-build ccache libclang-dev llvm-dev
python3 python3-pip
libboost-dev libgsl-dev libgtk-3-dev
git wget
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9
- pip3 install cppyy-cling cppyy-backend CPyCppyy cppyy # older python version may install dependencies in the wrong order
script:
- CXX=g++-9 ./ns3 configure -G Ninja --enable-python-bindings
- ./ns3 build
- ./ns3 run first.py
- ./ns3 run second.py
- ./ns3 run third.py
- ./ns3 run ./utils/python-unit-tests.py
timeout: 9h
.manylinux-pip-wheel:
stage: test
image: quay.io/pypa/manylinux_2_28_x86_64
rules:
- if: $RELEASE == "manual"
script:
# Untar libraries (just to make CMake happy, but we are not going to actually link them)
# https://github.com/scikit-build/scikit-build/pull/47
- tar -xvf /opt/_internal/static-libs-for-embedding-only.tar.xz -C /opt/_internal
# Install minimal toolchain
- yum install -y libxml2-devel gsl-devel sqlite-devel gtk3-devel boost-devel
# Create Python venv
- $PYTHON -m venv ./venv
- . ./venv/bin/activate
# Upgrade the pip version to reuse the pre-build cppyy
- $PYTHON -m pip install pip --upgrade
- $PYTHON -m pip install setuptools setuptools_scm wheel --upgrade
- $PYTHON -m pip install wheel auditwheel cmake-build-extension cppyy==2.4.2
# Configure and build wheel
- $PYTHON setup.py bdist_wheel build_ext
- export EXCLUDE_INTERNAL_LIBRARIES=`$PYTHON ./build-support/pip-wheel/auditwheel-exclude-list.py`
# Bundle in shared libraries that were not explicitly packaged or depended upon
- $PYTHON -m auditwheel repair ./dist/*whl -L /lib64 $EXCLUDE_INTERNAL_LIBRARIES
# Clean the build directory
- $PYTHON ./ns3 clean
# Clean up the environment
- deactivate
- rm -R ./venv
# Delete toolchain to check if required headers/libraries were really packaged
- yum remove -y libxml2-devel gsl-devel sqlite-devel gtk3-devel boost-devel
# Install wheel
- $PYTHON -m pip install ./wheelhouse/*whl
- $PYTHON -m pip install matplotlib numpy
# Test the bindings
- $PYTHON ./utils/python-unit-tests.py
- $PYTHON ./examples/realtime/realtime-udp-echo.py
- $PYTHON ./examples/routing/simple-routing-ping6.py
- $PYTHON ./examples/tutorial/first.py
- $PYTHON ./examples/tutorial/second.py
- $PYTHON ./examples/tutorial/third.py
- $PYTHON ./examples/wireless/wifi-ap.py
- $PYTHON ./examples/wireless/mixed-wired-wireless.py
- $PYTHON ./src/bridge/examples/csma-bridge.py
- $PYTHON ./src/brite/examples/brite-generic-example.py
- $PYTHON ./src/core/examples/sample-simulator.py
- $PYTHON ./src/core/examples/sample-rng-plot.py --not-blocking
- $PYTHON ./src/click/examples/nsclick-simple-lan.py
- $PYTHON ./src/flow-monitor/examples/wifi-olsr-flowmon.py
- $PYTHON ./src/flow-monitor/examples/flowmon-parse-results.py output.xml
- $PYTHON ./src/openflow/examples/openflow-switch.py
timeout: 3h
artifacts:
paths:
- wheelhouse/*.whl
when: on_success
manylinux-pip-wheel-py3.6:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.6"
manylinux-pip-wheel-py3.7:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.7"
manylinux-pip-wheel-py3.8:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.8"
manylinux-pip-wheel-py3.9:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.9"
manylinux-pip-wheel-py3.10:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.10"
manylinux-pip-wheel-py3.11:
extends: .manylinux-pip-wheel
variables:
PYTHON: "python3.11"