Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ubuntu 24 runner for 5.13 5.12 #1624

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions .github/workflows/build-ubuntu-24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Build Ubuntu 24.04

on:
push:
pull_request:
branches:
- master

jobs:
build-ubuntu:
runs-on: ubuntu-24.04

env:
# enable starting Qt GUI Applications
QT_QPA_PLATFORM: offscreen

steps:
- name: Install Dependencies
run: |
sudo apt update
sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qtbase5-dev libqt5opengl5-dev libqt5svg5-dev libyaml-cpp-dev


- name: Install Cap'n Proto
run: |
mkdir "${{ runner.workspace }}/capnp"
cd "${{ runner.workspace }}/capnp"
curl -O https://capnproto.org/capnproto-c++-0.9.0.tar.gz
tar zxf capnproto-c++-0.9.0.tar.gz
cd capnproto-c++-0.9.0
./configure
make -j
sudo make install

- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 0

- name: Install Python requirements
shell: bash
run: |
sudo apt-get -y install python3-dev python3-venv
mkdir ".venv_build"
python3 -m venv ".venv_build"
source ".venv_build/bin/activate"
pip install --upgrade pip
pip install wheel setuptools
pip install -r "$GITHUB_WORKSPACE/doc/requirements.txt"

- name: CMake
run: |
source ".venv_build/bin/activate"

export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13
mkdir "${{ runner.workspace }}/_build"
cd "${{ runner.workspace }}/_build"
cmake $GITHUB_WORKSPACE -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DHAS_HDF5=ON \
-DHAS_QT=ON \
-DHAS_CURL=ON \
-DHAS_CAPNPROTO=ON \
-DHAS_FTXUI=ON \
-DBUILD_DOCS=ON \
-DBUILD_APPS=ON \
-DBUILD_SAMPLES=ON \
-DBUILD_TIME=ON \
-DBUILD_PY_BINDING=ON \
-DBUILD_STANDALONE_PY_WHEEL=ON \
-DBUILD_CSHARP_BINDING=OFF \
-DBUILD_ECAL_TESTS=ON \
-DECAL_INCLUDE_PY_SAMPLES=OFF \
-DECAL_INSTALL_SAMPLE_SOURCES=ON \
-DECAL_JOIN_MULTICAST_TWICE=OFF \
-DECAL_NPCAP_SUPPORT=OFF \
-DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \
-DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \
-DECAL_THIRDPARTY_BUILD_SPDLOG=ON \
-DECAL_THIRDPARTY_BUILD_TINYXML2=ON \
-DECAL_THIRDPARTY_BUILD_FINEFTP=ON \
-DECAL_THIRDPARTY_BUILD_CURL=OFF \
-DECAL_THIRDPARTY_BUILD_GTEST=ON \
-DECAL_THIRDPARTY_BUILD_HDF5=OFF \
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
-DPython_FIND_VIRTUALENV=ONLY

sudo mkdir /etc/ecal
sudo cp "$GITHUB_WORKSPACE/ecal/core/cfg/ecal.ini" /etc/ecal
shell: bash

- name: Build Release
run: cmake --build . --config Release -- -k 0
working-directory: ${{ runner.workspace }}/_build

# Create Python Wheels
# The strang-looking double-cmake is an ugly workaround to force CMake to
# re-find Python, after we have changed the venv from the outside. The
# alternative would be to clean everything, which would cause an unnecessary
# rebuild of eCAL for each python Version.
- name: Build Python 3.12 Wheel
run: |
sudo apt-get -y install python3.12-dev python3.12-venv
mkdir ".venv_312"
python3.12 -m venv ".venv_312"
source ".venv_312/bin/activate"
pip install --upgrade pip
pip install wheel setuptools
cmake $GITHUB_WORKSPACE -DPython_FIND_VIRTUALENV=FIRST
cmake $GITHUB_WORKSPACE -DPython_FIND_VIRTUALENV=ONLY
cmake --build . --target create_python_wheel --config Release
shell: bash
working-directory: ${{ runner.workspace }}/_build

- name: Run Tests
run: ctest -V
working-directory: ${{ runner.workspace }}/_build

- name: Pack
run: cpack -G DEB
working-directory: ${{ runner.workspace }}/_build

- name: Upload Debian
uses: actions/upload-artifact@v4
with:
name: ubuntu-debian
path: ${{ runner.workspace }}/_build/_deploy/*.deb

- name: Upload Python Wheel
uses: actions/upload-artifact@v4
with:
name: ubuntu-python-wheel
path: ${{ runner.workspace }}/_build/_deploy/*.whl