diff --git a/.github/workflows/build-ubuntu-20.yml b/.github/workflows/build-ubuntu-20.yml deleted file mode 100644 index cfce3aec05..0000000000 --- a/.github/workflows/build-ubuntu-20.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Build Ubuntu 20.04 - -on: - push: - pull_request: - branches: - - master - -jobs: - build-ubuntu: - runs-on: ubuntu-20.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 qt5-default 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@v4 - with: - submodules: 'true' - fetch-depth: 0 - - - name: Install Python requirements - shell: bash - run: | - sudo apt-get -y install python3.9-dev python3.9-venv - mkdir ".venv_build" - python3.9 -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-9 - export CXX=/usr/bin/g++-9 - mkdir "${{ runner.workspace }}/_build" - cd "${{ runner.workspace }}/_build" - - cmake $GITHUB_WORKSPACE -G "Ninja" \ - -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/submodule_dependencies.cmake \ - -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 - - - 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 - diff --git a/.github/workflows/build-ubuntu-22.yml b/.github/workflows/build-ubuntu-22.yml deleted file mode 100644 index d8e0df3381..0000000000 --- a/.github/workflows/build-ubuntu-22.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Build Ubuntu 22.04 - -on: - push: - pull_request: - branches: - - master - -jobs: - build-ubuntu: - runs-on: ubuntu-22.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@v4 - 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-11 - export CXX=/usr/bin/g++-11 - mkdir "${{ runner.workspace }}/_build" - cd "${{ runner.workspace }}/_build" - cmake $GITHUB_WORKSPACE -G "Ninja" \ - -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/submodule_dependencies.cmake \ - -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 - - - 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 diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml new file mode 100644 index 0000000000..c24d9f3e3e --- /dev/null +++ b/.github/workflows/build-ubuntu.yml @@ -0,0 +1,188 @@ +name: Build Ubuntu + +on: + push: + pull_request: + +jobs: + build-ubuntu: + + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-20.04] + + runs-on: ${{ matrix.os }} + + env: + # enable starting Qt GUI Applications + QT_QPA_PLATFORM: offscreen + PROJECT_NAME: ecal + + steps: + + - name: Install Dependencies + run: | + sudo apt update + + if [ "${{ matrix.os }}" == "ubuntu-24.04" ]; then + sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev libyaml-cpp-dev + sudo apt-get install qt6-base-dev qt6-svg-dev + sudo apt-get install libgtest-dev + sudo apt-get install python3 python3-venv python3-dev + elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then + sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev libyaml-cpp-dev + sudo apt-get install qtbase5-dev libqt5opengl5-dev libqt5svg5-dev + sudo apt-get install libgtest-dev + sudo apt-get install python3 python3-venv python3-dev + elif [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then + sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev libyaml-cpp-dev + sudo apt-get install qt5-default libqt5opengl5-dev libqt5svg5-dev + sudo apt-get install libgtest-dev + sudo apt-get install python3.9 python3.9-venv python3.9-dev + fi + + - name: Set variables + run: | + if [ "${{ matrix.os }}" == "ubuntu-24.04" ]; then + echo "ubuntu_codename=noble" >> "$GITHUB_ENV" + echo "python_version=3" >> "$GITHUB_ENV" # => default python 3 version + elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then + echo "ubuntu_codename=focal" >> "$GITHUB_ENV" + echo "python_version=3" >> "$GITHUB_ENV" # => default python 3 version + elif [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then + echo "ubuntu_codename=jammy" >> "$GITHUB_ENV" + echo "python_version=3.9" >> "$GITHUB_ENV" + fi + + # Get cpu architecture + echo "cpu_architecture=$(dpkg --print-architecture)" >> "$GITHUB_ENV" + + - name: Install Cap'n Proto + run: | + mkdir "${{ runner.workspace }}/capnp" + cd "${{ runner.workspace }}/capnp" + curl -O https://capnproto.org/capnproto-c++-1.0.2.tar.gz + tar zxf capnproto-c++-1.0.2.tar.gz + cd capnproto-c++-1.0.2 + ./configure + make -j$(($(nproc)*2)) + sudo make install + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'false' + fetch-depth: 0 + + - name: Update / download Submodules (selected ones) + run: | + cd $GITHUB_WORKSPACE + git submodule init + git submodule deinit thirdparty/curl/curl + git submodule deinit thirdparty/gtest/googletest + git submodule deinit thirdparty/hdf5/hdf5 + git submodule deinit thirdparty/libssh2/libssh2 + git submodule deinit thirdparty/protobuf/protobuf + git submodule deinit thirdparty/zlib/zlib + git submodule update + + - name: Create venv for building docs + shell: bash + run: | + mkdir ".venv_build" + python${{ env.python_version }} -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" + + mkdir "${{ runner.workspace }}/_build" + cd "${{ runner.workspace }}/_build" + + cmake $GITHUB_WORKSPACE -G "Ninja" \ + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/submodule_dependencies.cmake \ + -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=OFF \ + -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=OFF \ + -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 . --parallel -- -k 0 + working-directory: ${{ runner.workspace }}/_build + + - name: Run Tests + run: ctest -V + working-directory: ${{ runner.workspace }}/_build + + - name: Get Project version from git tag + shell: bash + run: | + # Use git describe to get the tag / commit description + VERSION="$(git describe --tags --dirty)" + + # Remove the leading 'v' from the tag + VERSION="${VERSION#v}" + + echo "PROJECT_VERSION=$VERSION" >> "$GITHUB_ENV" + + - name: Set output binary name + shell: bash + run: | + echo "BINARY_NAME=${{ env.PROJECT_NAME }}_${{ env.PROJECT_VERSION }}-${{ env.ubuntu_codename }}_${{ env.cpu_architecture }}" >> "$GITHUB_ENV" + + - name: CPack + run: cpack -G DEB + working-directory: ${{ runner.workspace }}/_build + + - name: Rename .deb installer + run: | + mv *.deb '${{ env.BINARY_NAME }}.deb' + shell: bash + working-directory: ${{runner.workspace}}/_build/_deploy/ + + - name: Upload Debian + uses: actions/upload-artifact@v4 + with: + name: '${{ env.BINARY_NAME }}' + path: ${{ runner.workspace }}/_build/_deploy/*.deb diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 28444c6f03..e0c631d4ae 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,4 +1,4 @@ -name: Build Windows Server 2019 +name: Build Windows on: push: @@ -32,20 +32,6 @@ jobs: - name: Uninstall Chocolatey run: move "$env:PROGRAMDATA\chocolatey" "$env:PROGRAMDATA\_chocolatey" -# - name: Install Cap’n Proto -# run: | -# mkdir "${{ runner.workspace }}/capnp" -# cd "${{ runner.workspace }}/capnp" -# git clone https://github.com/sandstorm-io/capnproto.git -# cd capnproto -# git checkout release-0.9.0 -# cd c++ -# mkdir _build -# cd _build -# cmake .. -G "Visual Studio 16 2019" -A x64 -# cmake --build . --parallel --config Release -# cmake --build . --target install --config Release - - name: Checkout uses: actions/checkout@v4 with: @@ -163,14 +149,6 @@ jobs: run: cmake --build . --config Release working-directory: ${{ runner.workspace }}/_build/complete -# - name: Build Documentation C -# run: cmake --build . --target documentation_c -# working-directory: ${{ runner.workspace }}/_build -# -# - name: Build Documentation C++ -# run: cmake --build . --target documentation_cpp -# working-directory: ${{ runner.workspace }}/_build - - name: Run Tests run: ctest -C Release -V working-directory: ${{ runner.workspace }}/_build/complete @@ -183,10 +161,35 @@ jobs: run: cpack -C Release working-directory: ${{ runner.workspace }}/_build/complete + - name: Get Project version from git tag + shell: powershell + run: | + # Use git describe to get the tag / commit description + $VERSION = git describe --tags --dirty + + #remove the leading 'v' from the tag, if it exists + $VERSION = $VERSION -replace '^v', '' + + echo "VERSION=$VERSION" >> "$Env:GITHUB_ENV" + + - name: Set output binary name + shell: powershell + run: | + $BINARY_NAME = "ecal_${{ env.VERSION }}-win64" + echo "BINARY_NAME=$BINARY_NAME" >> "$Env:GITHUB_ENV" + + - name: Rename the setup exe + shell: powershell + run: | + $LS_OUT = ls *.exe + $SETUP_NAME = "$($LS_OUT.Name)" + Rename-Item -Path "$SETUP_NAME" -NewName "${{ env.BINARY_NAME }}.exe" + working-directory: ${{ runner.workspace }}/_build/complete/_deploy/ + - name: Upload Windows setup uses: actions/upload-artifact@v4 with: - name: windows-setup + name: unsigned-setup path: ${{ runner.workspace }}/_build/complete/_deploy/*.exe # -------------------------------------------------------------------------------------------------- @@ -201,7 +204,7 @@ jobs: - name: Download Windows setup uses: actions/download-artifact@v4 with: - name: windows-setup + name: unsigned-setup path: ${{ runner.workspace }}/_build/complete/_deploy - name: Sign the installer on Eclipse CI @@ -371,9 +374,16 @@ jobs: JENKINS_JOB_TOKEN: ${{ secrets.JENKINS_TOKEN_GH_FILE }} working-directory: ${{ runner.workspace }}/_build/complete/_deploy + - name: Determine name of the installer for zip file + shell: powershell + run: | + $INSTALLER_NAME = "${{ env.ASSET_NAME }}" + $INSTALLER_NAME_WITHOUT_EXE = $INSTALLER_NAME.Substring(0, $INSTALLER_NAME.Length - 4) + echo "ARTIFACT_NAME=$INSTALLER_NAME_WITHOUT_EXE" >> "$Env:GITHUB_ENV" + - name: Upload Windows setup signed on Eclipse CI if: env.IS_DOWNLOAD_AVAILABLE == 'true' uses: actions/upload-artifact@v4 with: - name: windows-setup-signed + name: ${{ env.ARTIFACT_NAME }} path: ${{ runner.workspace }}/_build/complete/_deploy/${{ env.ASSET_NAME }} diff --git a/README.md b/README.md index 888904f0ad..9b6dd17567 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # eCAL - enhanced Communication Abstraction Layer -[![Build Windows Server 2019](https://github.com/eclipse-ecal/ecal/workflows/Build%20Windows%20Server%202019/badge.svg)](https://github.com/eclipse-ecal/ecal/actions?workflow=Build+Windows+Server+2019) [![Build Ubuntu 20.04](https://github.com/eclipse-ecal/ecal/workflows/Build%20Ubuntu%2020.04/badge.svg)](https://github.com/eclipse-ecal/ecal/actions?workflow=Build+Ubuntu+20.04) [![Build Ubuntu 22.04](https://github.com/eclipse-ecal/ecal/actions/workflows/build-ubuntu-22.yml/badge.svg)](https://github.com/eclipse-ecal/ecal/actions/workflows/build-ubuntu-22.yml) [![Build macOS](https://github.com/eclipse-ecal/ecal/actions/workflows/build-macos.yml/badge.svg)](https://github.com/eclipse-ecal/ecal/actions/workflows/build-macos.yml) +[![Windows](https://github.com/eclipse-ecal/ecal/actions/workflows/build-windows.yml/badge.svg)](https://github.com/eclipse-ecal/ecal/actions/workflows/build-windows.yml) [![Ubuntu](https://github.com/eclipse-ecal/ecal/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/eclipse-ecal/ecal/actions/workflows/build-ubuntu.yml) [![macOS](https://github.com/eclipse-ecal/ecal/actions/workflows/build-macos.yml/badge.svg)](https://github.com/eclipse-ecal/ecal/actions/workflows/build-macos.yml) [![License](https://img.shields.io/github/license/continental/ecal.svg?style=flat)](LICENSE.txt)