From 3b34b25106a92a8f44d69b1cf58e4a1dacef49d5 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:24:32 +0100 Subject: [PATCH 01/21] Create cherry-pick-to-support.yml (#1) Co-authored-by: KerstinKeller --- .github/workflows/cherry-pick-to-support.yml | 43 ++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/cherry-pick-to-support.yml diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml new file mode 100644 index 0000000000..377a259a04 --- /dev/null +++ b/.github/workflows/cherry-pick-to-support.yml @@ -0,0 +1,43 @@ +on: + pull_request: + branches: + - master + types: ["closed"] + +jobs: + cherry_pick_v_5_12: + runs-on: ubuntu-latest + name: Cherry pick into support/v5.12 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Cherry pick into support/v5.12 + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + branch: support/v5.12 + labels: | + cherry-pick + title: '[cherry-pick] {old_title}' + body: 'Cherry picking #{old_pull_request_id} onto this branch' + cherry_pick_v_5_13: + runs-on: ubuntu-latest + name: Cherry pick into support/v5.12 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.13') && github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Cherry pick into support/v5.13 + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + branch: support/v5.13 + labels: | + cherry-pick + title: '[cherry-pick] {old_title}' + body: 'Cherry picking #{old_pull_request_id} onto this branch' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7d2a6111b542912007b093da9558f8032ad92210 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:34:56 +0100 Subject: [PATCH 02/21] Update cherry-pick-to-support.yml --- .github/workflows/cherry-pick-to-support.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 377a259a04..7db02af2d7 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -1,3 +1,5 @@ +name: Cherry-pick to support branches + on: pull_request: branches: From aa0ec97c07c19de79520767bae94bb00efe26dd0 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:36:09 +0100 Subject: [PATCH 03/21] Update cherry-pick-to-support.yml --- .github/workflows/cherry-pick-to-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 7db02af2d7..503e3f0ef3 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -26,7 +26,7 @@ jobs: body: 'Cherry picking #{old_pull_request_id} onto this branch' cherry_pick_v_5_13: runs-on: ubuntu-latest - name: Cherry pick into support/v5.12 + name: Cherry pick into support/v5.13 if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.13') && github.event.pull_request.merged == true }} steps: - name: Checkout From 6ef6e558eefcbf098fa494acb7a5035d3db6fd3d Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:48:56 +0100 Subject: [PATCH 04/21] Commit2 + 3 (#3) * Commit2 * Commit3 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 888904f0ad..d44551b3fa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # eCAL - enhanced Communication Abstraction Layer - +Commit 2 +Commit 3 [![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) [![License](https://img.shields.io/github/license/continental/ecal.svg?style=flat)](LICENSE.txt) From 27910c13d50b08b6d46005acc8156b8808eb468d Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:53:08 +0100 Subject: [PATCH 05/21] Commit 1 (#2) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d44551b3fa..767858bf12 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Commit 1 + # eCAL - enhanced Communication Abstraction Layer From 00f479a62a3d50a17579bbf615d902c6c125c6ee Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:53:48 +0100 Subject: [PATCH 06/21] Commit4 (#4) --- ecal/service/Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecal/service/Readme.md b/ecal/service/Readme.md index 425b38367c..51ed56b25e 100644 --- a/ecal/service/Readme.md +++ b/ecal/service/Readme.md @@ -1,3 +1,4 @@ +Commit 4 # ecal-service The eCAL Service lib encapsulates the binary data exchange of eCAL Servcies @@ -174,4 +175,4 @@ Server Client | <------- Request --------- | | -------- Response --------> | | ... | -``` \ No newline at end of file +``` From 29d21bbf412a791a84c0777502d74b1ddb4b8b5f Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 18:56:59 +0100 Subject: [PATCH 07/21] Removed unnecessary actions --- .github/workflows/build-macos.yml | 132 ----- .github/workflows/build-ubuntu-20.yml | 193 ------- .github/workflows/build-ubuntu-22.yml | 156 ------ .github/workflows/build-windows.yml | 483 ------------------ .../clang-tidy-review-post-comments.yml | 21 - .github/workflows/clang-tidy-review.yml | 78 --- .github/workflows/documentation.yml | 97 ---- .github/workflows/ecal-fat-source.yml | 74 --- .github/workflows/pr-auto-approve.yml | 49 -- .github/workflows/run-clang-tidy.yml | 72 --- 10 files changed, 1355 deletions(-) delete mode 100644 .github/workflows/build-macos.yml delete mode 100644 .github/workflows/build-ubuntu-20.yml delete mode 100644 .github/workflows/build-ubuntu-22.yml delete mode 100644 .github/workflows/build-windows.yml delete mode 100644 .github/workflows/clang-tidy-review-post-comments.yml delete mode 100644 .github/workflows/clang-tidy-review.yml delete mode 100644 .github/workflows/documentation.yml delete mode 100644 .github/workflows/ecal-fat-source.yml delete mode 100644 .github/workflows/pr-auto-approve.yml delete mode 100644 .github/workflows/run-clang-tidy.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml deleted file mode 100644 index c016d02743..0000000000 --- a/.github/workflows/build-macos.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Build macOS - -on: - push: - pull_request: - branches: - - master - -jobs: - build-macos: - runs-on: macos-latest - - steps: - - name: Downgrade Python version - uses: actions/setup-python@v4 - id: cp39 - with: - python-version: '3.9' - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - setup-python: false - version: '5.15.2' - target: 'desktop' - - - name: Install Dependencies - run: brew install ninja doxygen graphviz protobuf hdf5@1.10 pkg-config - - - 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: Display Python version - run: python -c "import sys; print(sys.version)" - - - name: Install Python requirements - run: | - sudo pip3 install -r "$GITHUB_WORKSPACE/doc/requirements.txt" - - - name: CMake - run: | - mkdir "${{ runner.workspace }}/_build" - cd "${{ runner.workspace }}/_build" - cmake $GITHUB_WORKSPACE -G "Ninja" \ - -DHAS_HDF5=ON \ - -DHAS_QT5=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_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=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=/usr/local/opt/hdf5@1.10 \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ - -DPython_FIND_STRATEGY=LOCATION \ - -DPython_FIND_REGISTRY=NEVER - 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 - working-directory: ${{ runner.workspace }}/_build - - - name: Build Python Wheel - run: cmake --build . --target create_python_wheel --config Release - working-directory: ${{ runner.workspace }}/_build - -# - 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 - -# currently event test fails under macos .. -# - name: Run Tests -# run: ctest -V -# working-directory: ${{ runner.workspace }}/_build - - - name: Pack - run: cpack -G DragNDrop - working-directory: ${{ runner.workspace }}/_build - - - name: Upload DMG - uses: actions/upload-artifact@v3 - with: - name: macos-dmg - path: ${{ runner.workspace }}/_build/_deploy/*.dmg - - - name: Upload Python Wheel - uses: actions/upload-artifact@v3 - with: - name: macos-python-wheel - path: ${{ runner.workspace }}/_build/_deploy/*.whl diff --git a/.github/workflows/build-ubuntu-20.yml b/.github/workflows/build-ubuntu-20.yml deleted file mode 100644 index b2b6a30510..0000000000 --- a/.github/workflows/build-ubuntu-20.yml +++ /dev/null @@ -1,193 +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 libqwt-qt5-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-9 - export CXX=/usr/bin/g++-9 - 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=OFF \ - -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.9 Wheel - run: | - sudo apt-get -y install python3.9-dev python3.9-venv - mkdir ".venv_39" - python3.9 -m venv ".venv_39" - source ".venv_39/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: Build Python 3.8 Wheel - run: | - sudo apt-get -y install python3.8-dev python3.8-venv - mkdir ".venv_38" - python3.8 -m venv ".venv_38" - source ".venv_38/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@v3 - with: - name: ubuntu-debian - path: ${{ runner.workspace }}/_build/_deploy/*.deb - - - name: Upload Python Wheel - uses: actions/upload-artifact@v3 - with: - name: ubuntu-python-wheel - path: ${{ runner.workspace }}/_build/_deploy/*.whl - - #--------------------------------------------------------------------------- - - # GNU tar - Excluding Some Files - # https://www.gnu.org/software/tar/manual/html_node/exclude.html - # the emtpy '.git/' drectory is required, it marks the root directory - - name: 'Create a tarball' - run: | - cd ${{ runner.workspace }} - tar --exclude-vcs-ignore \ - --exclude='bin' \ - --exclude='doc' \ - --exclude='_build/_CPack_Packages' \ - --exclude='_build/_deploy' \ - --exclude='_build/lib' \ - --exclude='_build/python' \ - --exclude='*.deb' \ - --exclude='*.a' \ - --exclude='*.o' \ - --exclude='*.so' \ - --exclude=ecal/.git/* \ - -czf ecal.tar.gz ecal/ _build/ - du -sh ecal.tar.gz - - - # https://github.com/actions/upload-artifact - - name: Upload the whole directory - uses: actions/upload-artifact@v3 - with: - name: ecal-dir - path: ${{ runner.workspace }}/ecal.tar.gz - - call-clang-tidy: - if: github.event_name == 'pull_request' - needs: build-ubuntu - uses: ./.github/workflows/run-clang-tidy.yml diff --git a/.github/workflows/build-ubuntu-22.yml b/.github/workflows/build-ubuntu-22.yml deleted file mode 100644 index b2d4ef1b9b..0000000000 --- a/.github/workflows/build-ubuntu-22.yml +++ /dev/null @@ -1,156 +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 libqwt-qt5-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_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=OFF \ - -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.11 Wheel - run: | - sudo apt-get -y install python3.11-dev python3.11-venv - mkdir ".venv_311" - python3.11 -m venv ".venv_311" - source ".venv_311/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: Build Python 3.10 Wheel - run: | - sudo apt-get -y install python3.10-dev python3.10-venv - mkdir ".venv_310" - python3.10 -m venv ".venv_310" - source ".venv_310/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@v3 - with: - name: ubuntu-debian - path: ${{ runner.workspace }}/_build/_deploy/*.deb - - - name: Upload Python Wheel - uses: actions/upload-artifact@v3 - with: - name: ubuntu-python-wheel - path: ${{ runner.workspace }}/_build/_deploy/*.whl diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml deleted file mode 100644 index 082ff61b46..0000000000 --- a/.github/workflows/build-windows.yml +++ /dev/null @@ -1,483 +0,0 @@ -name: Build Windows Server 2019 - -on: - push: - pull_request: - branches: - - master -env: - IS_GITHUB_SIGNING_ALLOWED: true - IS_JENKINS_SIGNING_ALLOWED: true - -jobs: - build-windows: - runs-on: windows-2019 - - env: - # enable starting Qt GUI Applications - QT_QPA_PLATFORM: offscreen - - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - setup-python: 'false' - version: '6.6.1' - target: 'desktop' - arch: 'win64_msvc2019_64' - - # Downgrading nuget is required as of 2021-04-23, as nuget 5.9.1.111 fails installing protobuf - # https://github.com/actions/virtual-environments/issues/3240 - - name: Downgrade nuget - uses: nuget/setup-nuget@v1 - with: - nuget-version: '5.8.x' - - - name: Install Dependencies - # choco install of version 1.9.3 produced a checksum error - run: choco install doxygen.install --version=1.9.2 - - - 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: - submodules: 'true' - fetch-depth: 0 - - - name: Create Python virtualenv - run: | - mkdir "${{ runner.workspace }}\_build\complete\.venv\" - - # At the moment (2021-10-27) there is no official Python 3.10 lxml package available on pypi. Thus we use python 3.9. - py -3.9 -m venv "${{ runner.workspace }}\.venv" - CALL "${{ runner.workspace }}\.venv\Scripts\activate.bat" - - echo Upgrading pip - python -m pip install --upgrade pip - - pip install wheel - - echo Installing python requirements - pip install -r "%GITHUB_WORKSPACE%\doc\requirements.txt" - - shell: cmd - - - name: CMake SDK - run: | - mkdir "${{ runner.workspace }}\_build\sdk\" - cd "${{ runner.workspace }}/_build/sdk" - - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 ^ - -DHAS_HDF5=ON ^ - -DHAS_QT=ON ^ - -DHAS_CURL=OFF ^ - -DHAS_CAPNPROTO=OFF ^ - -DHAS_FTXUI=ON ^ - -DBUILD_DOCS=OFF ^ - -DBUILD_APPS=OFF ^ - -DBUILD_SAMPLES=OFF ^ - -DBUILD_TIME=ON ^ - -DBUILD_PY_BINDING=OFF ^ - -DBUILD_CSHARP_BINDING=OFF ^ - -DBUILD_ECAL_TESTS=OFF ^ - -DECAL_INCLUDE_PY_SAMPLES=OFF ^ - -DECAL_INSTALL_SAMPLE_SOURCES=OFF ^ - -DECAL_JOIN_MULTICAST_TWICE=OFF ^ - -DECAL_NPCAP_SUPPORT=ON ^ - -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON ^ - -DECAL_THIRDPARTY_BUILD_PROTOBUF=ON ^ - -DECAL_THIRDPARTY_BUILD_SPDLOG=ON ^ - -DECAL_THIRDPARTY_BUILD_TINYXML2=ON ^ - -DECAL_THIRDPARTY_BUILD_FINEFTP=OFF ^ - -DECAL_THIRDPARTY_BUILD_CURL=OFF ^ - -DECAL_THIRDPARTY_BUILD_GTEST=OFF ^ - -DECAL_THIRDPARTY_BUILD_HDF5=ON ^ - -DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^ - -DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^ - -DECAL_THIRDPARTY_BUILD_QWT=OFF ^ - -DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF ^ - -DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^ - -DBUILD_SHARED_LIBS=OFF ^ - -DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^ - -DCMAKE_BUILD_TYPE=Debug ^ - -DCPACK_PACK_WITH_INNOSETUP=OFF - shell: cmd - - - name: CMake Complete - run: | - CALL "${{ runner.workspace }}\.venv\Scripts\activate.bat" - cd "${{ runner.workspace }}/_build/complete" - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 ^ - -DHAS_HDF5=ON ^ - -DHAS_QT=ON ^ - -DHAS_CURL=ON ^ - -DHAS_CAPNPROTO=OFF ^ - -DHAS_FTXUI=ON ^ - -DBUILD_DOCS=ON ^ - -DBUILD_APPS=ON ^ - -DBUILD_SAMPLES=ON ^ - -DBUILD_TIME=ON ^ - -DBUILD_PY_BINDING=ON ^ - -DBUILD_CSHARP_BINDING=ON ^ - -DBUILD_ECAL_TESTS=ON ^ - -DECAL_INCLUDE_PY_SAMPLES=OFF ^ - -DECAL_INSTALL_SAMPLE_SOURCES=ON ^ - -DECAL_JOIN_MULTICAST_TWICE=OFF ^ - -DECAL_NPCAP_SUPPORT=ON ^ - -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON ^ - -DECAL_THIRDPARTY_BUILD_PROTOBUF=ON ^ - -DECAL_THIRDPARTY_BUILD_SPDLOG=ON ^ - -DECAL_THIRDPARTY_BUILD_TINYXML2=ON ^ - -DECAL_THIRDPARTY_BUILD_FINEFTP=ON ^ - -DECAL_THIRDPARTY_BUILD_CURL=ON ^ - -DECAL_THIRDPARTY_BUILD_GTEST=ON ^ - -DECAL_THIRDPARTY_BUILD_HDF5=ON ^ - -DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^ - -DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^ - -DECAL_THIRDPARTY_BUILD_QWT=ON ^ - -DECAL_THIRDPARTY_BUILD_YAML-CPP=ON ^ - -DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^ - -DBUILD_SHARED_LIBS=OFF ^ - -DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCPACK_PACK_WITH_INNOSETUP=ON - mkdir "%ALLUSERSPROFILE%\eCAL" - copy "%GITHUB_WORKSPACE%\ecal\core\cfg\ecal.ini" "%ALLUSERSPROFILE%\eCAL" - shell: cmd - - - name: Build SDK - run: cmake --build . --config Debug - working-directory: ${{ runner.workspace }}/_build/sdk - - - name: Build Release - run: cmake --build . --config Release - working-directory: ${{ runner.workspace }}/_build/complete - - # Create Python. - # 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 and HDF5 for each python Version. - - name: Build Python 3.12 Wheel - run: | - mkdir ".venv_312" - py -3.12 -m venv ".venv_312" - CALL ".venv_312\Scripts\activate.bat" - pip install wheel setuptools - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Build Python 3.11 Wheel - run: | - mkdir ".venv_311" - py -3.11 -m venv ".venv_311" - CALL ".venv_311\Scripts\activate.bat" - pip install wheel - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Build Python 3.10 Wheel - run: | - mkdir ".venv_310" - py -3.10 -m venv ".venv_310" - CALL ".venv_310\Scripts\activate.bat" - pip install wheel - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Build Python 3.9 Wheel - run: | - mkdir ".venv_39" - py -3.9 -m venv ".venv_39" - CALL ".venv_39\Scripts\activate.bat" - pip install wheel - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Build Python 3.8 Wheel - run: | - mkdir ".venv_38" - py -3.8 -m venv ".venv_38" - CALL ".venv_38\Scripts\activate.bat" - pip install wheel - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Build Python 3.7 Wheel - run: | - mkdir ".venv_37" - py -3.7 -m venv ".venv_37" - CALL ".venv_37\Scripts\activate.bat" - pip install wheel - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=FIRST - cmake %GITHUB_WORKSPACE% -G "Visual Studio 16 2019" -A x64 -T v142 -DPython_FIND_VIRTUALENV=ONLY - cmake --build . --target create_python_wheel --config Release - shell: cmd - 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 - - - name: Pack SDK - run: cpack -C Debug - working-directory: ${{ runner.workspace }}/_build/sdk - - - name: Pack complete setup - run: cpack -C Release - working-directory: ${{ runner.workspace }}/_build/complete - - - name: Detect certificate - id: cert - if: env.IS_GITHUB_SIGNING_ALLOWED == 'true' - run: | - if ($Env:CERT_BODY -and $Env:CERT_PSWD -and $Env:CERT_ALGO -and $Env:CERT_HASH) { - Write-Output "ATTENTION: a certificate is available" - Write-Output "IS_GITHUB_SIGNING_ENABLED=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - } else { - Write-Output "WARNING: a certificate is not available" - } - env: - CERT_BODY: ${{ secrets.CERT_BODY }} - CERT_PSWD: ${{ secrets.CERT_PSWD }} - CERT_ALGO: ${{ secrets.CERT_ALGO }} - CERT_HASH: ${{ secrets.CERT_HASH }} - - # https://github.com/OrhanKupusoglu/code-sign-action - - name: Sign the installer - if: env.IS_GITHUB_SIGNING_ENABLED == 'true' - uses: OrhanKupusoglu/code-sign-action@v5.5.1 - with: - cert_body: ${{ secrets.CERT_BODY }} - cert_pswd: ${{ secrets.CERT_PSWD }} - cert_algo: ${{ secrets.CERT_ALGO }} - cert_hash: ${{ secrets.CERT_HASH }} - folder: ${{ runner.workspace }}/_build/complete/_deploy - debug: false - - - name: Upload Windows setup - uses: actions/upload-artifact@v3 - with: - name: windows-setup - path: ${{ runner.workspace }}/_build/complete/_deploy/*.exe - - - name: Upload Python Wheels - uses: actions/upload-artifact@v3 - with: - name: windows-python-wheels - path: ${{ runner.workspace }}/_build/complete/_deploy/*.whl - - # -------------------------------------------------------------------------------------------------- - - - name: Sign the installer on Eclipse CI - if: env.IS_JENKINS_SIGNING_ALLOWED == 'true' && env.JENKINS_USERNAME != '' && env.JENKINS_API_TOKEN != '' && env.JENKINS_JOB_TOKEN != '' - run: | - $LS_OUT = ls *.exe - $ASSET_NAME = "$($LS_OUT.Name)" - $ASSET_NAME_OLD = "$($ASSET_NAME).old" - $ASSET_NAME_NEW = "$ASSET_NAME" - $JENKINS_JOB = 'gh_auto_file' - $JENKINS_BASE_URL = "https://ci.eclipse.org/ecal" - $JENKINS_CRUMB_URL = "$JENKINS_BASE_URL/crumbIssuer/api/json" - $JENKINS_JOB_URL = "$JENKINS_BASE_URL/job/$JENKINS_JOB" - $JENKINS_TRIGGER_URL = "$JENKINS_JOB_URL/buildWithParameters?token=$Env:JENKINS_JOB_TOKEN" - $WAIT_FOR_JENKINS_SEC = 5 - $COUNTER_LIMIT = 20 - $RESPONSE_CODE = 0 - $CRUMB_ID = '' - $CRUMB_FIELD = '' - $CRUMB_COOKIE = '' - $COUNTER = 0 - $QUEUE_URL = '' - $BUILD_NUM = 0 - $BUILD_URL = '' - - Write-Output "-- get a Jenkins crumb & cookie" - - $AUTH_CREDENTIAL = $Env:JENKINS_USERNAME + ':' + $Env:JENKINS_API_TOKEN - $AUTH_ENCODED = [System.Text.Encoding]::UTF8.GetBytes($AUTH_CREDENTIAL) - $AUTH_INFO = [System.Convert]::ToBase64String($AUTH_ENCODED) - - $CRUMB_HEADERS = @{ - 'Authorization'="Basic $($AUTH_INFO)" - } - - $RESPONSE = Invoke-WebRequest -Uri $JENKINS_CRUMB_URL -Method GET -Headers $CRUMB_HEADERS - - $RES_CODE = $RESPONSE.StatusCode - Write-Output " ++ Jenkins crumb retrieval - HTTP status code: $RES_CODE" - - if ($RES_CODE -ge 200 -and $RES_CODE -lt 300) { - $JSON_CONTENT = $RESPONSE.Content | ConvertFrom-Json - $CRUMB_ID = $JSON_CONTENT.crumb - $CRUMB_FIELD = $JSON_CONTENT.crumbRequestField - $CRUMB_COOKIE = $RESPONSE.Headers['Set-Cookie'] - #Write-Output " ++ Jenkins crumb: '$CRUMB_ID'" - #Write-Output " ++ Jenkins cookie: '$CRUMB_COOKIE'" - } else { - Write-Output " ** determination of the Jenkins crumb failed" - Exit 1 - } - - Write-Output "-- trigger a new build of '$JENKINS_JOB' with installer '$ASSET_NAME'" - - $TRIGGER_HEADERS = @{ - 'Authorization'="Basic $($AUTH_INFO)" - 'Cookie'=$CRUMB_COOKIE - $CRUMB_FIELD=$CRUMB_ID - } - $FORM = @{ - 'GH_FILE_NAME'= $ASSET_NAME - 'GH_EXECUTABLE'= Get-Item -Path $ASSET_NAME - } - - $RESPONSE = Invoke-WebRequest -Uri $JENKINS_TRIGGER_URL -Method POST -Headers $TRIGGER_HEADERS -Form $FORM - $RES_CODE = $RESPONSE.StatusCode - Write-Output " ++ trigger build - HTTP status code: $RES_CODE" - - if ($RES_CODE -ge 200 -and $RES_CODE -lt 300) { - $QUEUE_URL = $RESPONSE.Headers.location - $QUEUE_URL = "$($QUEUE_URL)api/json/" - Write-Output " ++ queue URL: $QUEUE_URL" - } else { - Write-Output " ** trigger failure" - Exit 1 - } - - Write-Output "-- get the new build number" - - while ($true) { - $COUNTER++ - - if ($COUNTER -gt $COUNTER_LIMIT) { - Write-Output " ** determination of the new build number failed after $COUNTER_LIMIT tries" - Exit 1 - } - - $RESPONSE = Invoke-WebRequest -Uri $QUEUE_URL - $RES_CODE = $RESPONSE.StatusCode - Write-Output " ++ build number retrieval - HTTP status code: $RES_CODE" - - if ($RES_CODE -ge 200 -and $RES_CODE -lt 300) { - $JSON_CONTENT = $RESPONSE.Content | ConvertFrom-Json - $EXECUTABLE = $JSON_CONTENT.executable - $BUILD_NUM = $EXECUTABLE.number - - if ($BUILD_NUM) { - Write-Output " ++ #build number: $BUILD_NUM" - $BUILD_URL = $EXECUTABLE.url - Break - } else { - Write-Output " ++ ... pending, wait for $WAIT_FOR_JENKINS_SEC s" - Start-Sleep -s $WAIT_FOR_JENKINS_SEC - } - } else { - Write-Output " ** determination of the build number failed, trying again after $WAIT_FOR_JENKINS_SEC s" - Start-Sleep -s $WAIT_FOR_JENKINS_SEC - } - } - - $JENKINS_STATUS_URL = "$($BUILD_URL)api/json" - Write-Output "-- check build status of #Build $BUILD_NUM with $JENKINS_STATUS_URL" - - while ($true) { - $RESPONSE = Invoke-WebRequest -Uri $JENKINS_STATUS_URL - $RES_CODE = $RESPONSE.StatusCode - Write-Output " ++ status check - HTTP status code: $RES_CODE" - - if ($RES_CODE -ge 200 -and $RES_CODE -lt 300) { - $CONTENT = ConvertFrom-Json $RESPONSE.Content - $NUMBER = $CONTENT | Select-Object -expand 'number' - if ($NUMBER -eq $BUILD_NUM) { - $BUILDING = $CONTENT | Select-Object -expand 'building' - if ($BUILDING) { - Write-Output " ++ ... building, wait for $WAIT_FOR_JENKINS_SEC s" - Start-Sleep -s $WAIT_FOR_JENKINS_SEC - } else { - $RESULT = $CONTENT | Select-Object -expand 'result' - if ($RESULT -eq 'SUCCESS') { - Write-Output " ++ build success, asset name: '$ASSET_NAME'" - Break - } else { - Write-Output " ** build failure" - Exit 1 - } - } - } else { - Write-Output " ++ ... pending, wait for $WAIT_FOR_JENKINS_SEC s" - Start-Sleep -s $WAIT_FOR_JENKINS_SEC - } - } else { - Write-Output " ** status check failure" - Exit 1 - } - } - - $JENKINS_DOWNLOAD_URL = "$JENKINS_JOB_URL/$BUILD_NUM/artifact/$ASSET_NAME" - Write-Output "-- download the newly-signed Windows installer from #Build $BUILD_NUM with $JENKINS_DOWNLOAD_URL" - - Rename-Item -Path "$ASSET_NAME" -NewName "$ASSET_NAME_OLD" - - $RESPONSE = Invoke-WebRequest -Uri $JENKINS_DOWNLOAD_URL -OutFile $ASSET_NAME_NEW -PassThru - $RES_CODE = $RESPONSE.StatusCode - Write-Output " ++ download installer - HTTP status code: $RES_CODE" - - if ($RES_CODE -ge 200 -and $RES_CODE -lt 300) { - Write-Output "IS_DOWNLOAD_AVAILABLE=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - Write-Output "ASSET_NAME=$ASSET_NAME" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - Write-Output " ++ downloaded signed installer: '$ASSET_NAME'" - } else { - Write-Output " ** download failure" - Exit 1 - } - env: - JENKINS_USERNAME: ${{ secrets.JENKINS_USERNAME }} - JENKINS_API_TOKEN: ${{ secrets.JENKINS_API_TOKEN }} - JENKINS_JOB_TOKEN: ${{ secrets.JENKINS_TOKEN_GH_FILE }} - working-directory: ${{ runner.workspace }}/_build/complete/_deploy - - - name: Upload Windows setup signed on Eclipse CI - if: env.IS_DOWNLOAD_AVAILABLE == 'true' - uses: actions/upload-artifact@v3 - with: - name: windows-setup-signed - path: ${{ runner.workspace }}/_build/complete/_deploy/${{ env.ASSET_NAME }} diff --git a/.github/workflows/clang-tidy-review-post-comments.yml b/.github/workflows/clang-tidy-review-post-comments.yml deleted file mode 100644 index e9fcc46531..0000000000 --- a/.github/workflows/clang-tidy-review-post-comments.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Clang-Tidy-Review Post comments - -on: - workflow_run: - workflows: ["clang-tidy-review"] - types: - - completed - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: ZedThree/clang-tidy-review/post@v0.14.0 - # lgtm_comment_body, max_comments, and annotations need to be set on the posting workflow in a split setup - with: - # adjust options as necessary - lgtm_comment_body: '' - annotations: false - max_comments: 20 diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml deleted file mode 100644 index 4e8cb6a279..0000000000 --- a/.github/workflows/clang-tidy-review.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: clang-tidy-review - -on: - pull_request: - paths: - - '**.cpp' - - '**.cxx' - - '**.cc' - - '**.h' - - '**.hxx' - - '**.c' - - '**.hpp' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - review: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: 'true' - fetch-depth: 0 - - - name: Run clang-tidy - uses: ZedThree/clang-tidy-review@v0.14.0 - id: review - with: - build_dir: _build - apt_packages: "cmake,ninja-build,build-essential,zlib1g-dev,qtbase5-dev,libhdf5-dev,libprotobuf-dev,libprotoc-dev,protobuf-compiler,libcurl4-openssl-dev,libqwt-qt5-dev,libyaml-cpp-dev" - config_file: ".clang-tidy" - exclude: "thirdparty/*,_build/*,convert_utf.cpp,convert_utf.h,testing/*" - split_workflow: true - lgtm_comment_body: "" - cmake_command: | - cmake . -B _build \ - -G Ninja \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DHAS_HDF5=ON \ - -DHAS_QT5=ON \ - -DHAS_CURL=ON \ - -DHAS_CAPNPROTO=OFF \ - -DHAS_FTXUI=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_APPS=ON \ - -DBUILD_SAMPLES=ONS \ - -DBUILD_TIME=ON \ - -DBUILD_PY_BINDING=OFF \ - -DBUILD_STANDALONE_PY_WHEEL=OFF \ - -DBUILD_CSHARP_BINDING=OFF \ - -DBUILD_ECAL_TESTS=OFF \ - -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=OFF \ - -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 - cmake --build _build - - - uses: ZedThree/clang-tidy-review/upload@v0.14.0 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 49cadcdf7d..0000000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Documentation build - -on: - push: - branches: - - master - release: - types: - - released - - unpublished - - deleted - -jobs: - documentation-build: - runs-on: ubuntu-22.04 - - steps: - - name: Install Dependencies - run: | - sudo apt update - sudo apt-get install ninja-build doxygen graphviz libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: 'true' - fetch-depth: 0 - ref: 'master' - - - 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-9 - export CXX=/usr/bin/g++-9 - mkdir "${{ runner.workspace }}/_build" - cd "${{ runner.workspace }}/_build" - cmake $GITHUB_WORKSPACE -G "Ninja" \ - -DHAS_HDF5=ON \ - -DHAS_QT=OFF \ - -DHAS_CURL=OFF \ - -DHAS_CAPNPROTO=OFF \ - -DHAS_FTXUI=ON \ - -DBUILD_DOCS=ON \ - -DBUILD_APPS=OFF \ - -DBUILD_SAMPLES=OFF \ - -DBUILD_TIME=OFF \ - -DBUILD_PY_BINDING=ON \ - -DBUILD_CSHARP_BINDING=OFF \ - -DBUILD_ECAL_TESTS=OFF \ - -DECAL_INCLUDE_PY_SAMPLES=OFF \ - -DECAL_INSTALL_SAMPLE_SOURCES=OFF \ - -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=OFF \ - -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 - shell: bash - - - name: Build Documentation - env: - ECAL_GH_API_KEY: ${{ secrets.GITHUB_TOKEN }} - run: cmake --build . --parallel --config Release --target documentation_sphinx - working-directory: ${{ runner.workspace }}/_build - - - name: Deploy Documentation - uses: peaceiris/actions-gh-pages@v3.6.4 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ runner.workspace }}/_build/doc/html diff --git a/.github/workflows/ecal-fat-source.yml b/.github/workflows/ecal-fat-source.yml deleted file mode 100644 index 73705febbd..0000000000 --- a/.github/workflows/ecal-fat-source.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Fat source archive - -on: - push: - -jobs: - fat-source-archive: - runs-on: ubuntu-latest - - steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: 'true' - fetch-depth: 0 - - - name: Create clean eCAL directory - shell: bash - run: | - mkdir "${{ runner.workspace }}/cleaned" - rsync \ - --recursive \ - --delete \ - --delete-excluded \ - --exclude=".git" \ - --exclude="*.git" \ - --stats \ - $GITHUB_WORKSPACE/ \ - ${{ runner.workspace }}/cleaned/ecal/ \ - - - name: Patch git-get-revision-information.cmake - shell: bash - run: | - cd $GITHUB_WORKSPACE - export git_commit_date=$(git show -s --format=%ci) - export git_version_complete=$(git describe --tags --dirty) - IFS='.' - read -a ecal_version_array <<< "${git_version_complete:1}" - - export ecal_version_major=${ecal_version_array[0]} - export ecal_version_minor=${ecal_version_array[1]} - - # Remove -nightly or +nightly etc. - IFS='-' - read -a ecal_patch_array <<< "${ecal_version_array[2]}" - IFS='+' - read -a ecal_patch_array <<< "${ecal_patch_array[0]}" - - export ecal_version_patch="${ecal_patch_array[0]}" - - cd ${{ runner.workspace }}/cleaned/ecal/thirdparty/cmakefunctions/cmake_functions/git/ - echo " - function (git_revision_information) - set(GIT_REVISION_MAJOR ${ecal_version_major} PARENT_SCOPE) - set(GIT_REVISION_MAYOR ${ecal_version_major} PARENT_SCOPE) - set(GIT_REVISION_MINOR ${ecal_version_minor} PARENT_SCOPE) - set(GIT_REVISION_PATCH ${ecal_version_patch} PARENT_SCOPE) - set(GIT_DESCRIBE_TAG \"$git_version_complete\" PARENT_SCOPE) - set(GIT_REVISION_DATE \"$git_commit_date\" PARENT_SCOPE) - set(eCAL_BUILD_DATE \"$git_commit_date\" PARENT_SCOPE) - endfunction (git_revision_information) - " > "git_revision_information.cmake" - - - name: Create fat archive - working-directory: ${{ runner.workspace }}/cleaned/ - run: tar -czvf ${{ runner.workspace }}/cleaned/ecal-fat-source.tar.gz ecal - shell: bash - - - name: Upload source - uses: actions/upload-artifact@v3 - with: - name: ecal-fat-source - path: ${{ runner.workspace }}/cleaned/ecal-fat-source.tar.gz diff --git a/.github/workflows/pr-auto-approve.yml b/.github/workflows/pr-auto-approve.yml deleted file mode 100644 index 7957021616..0000000000 --- a/.github/workflows/pr-auto-approve.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Auto approve - -on: - pull_request: - types: [ labeled, opened, synchronize, reopened ] - -jobs: - - auto-approve: - runs-on: ubuntu-latest - permissions: - pull-requests: write - - if: ${{ contains(github.event.pull_request.labels.*.name, 'Auto Approve') }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: 'false' - fetch-depth: 0 - - - name: Check for changed files that are probably public API - id: protected-files-changes - uses: tj-actions/changed-files@v41 - with: - files: | - app/app_pb/** - contrib/**/include/** - contrib/ecaltime/ecaltime_pb/** - ecal/core/cfg/** - ecal/core/include/** - ecal/core_pb/** - ecal/pb/** - lang/** - thirdparty/** - .gitmodules - - - name: Public API has changed? - if: steps.protected-files-changes.outputs.any_changed == 'true' - run: | - echo "ERROR: Protected files have been changed:" - echo "${{ steps.protected-files-changes.outputs.all_changed_files }}" - exit 1 - - - uses: hmarr/auto-approve-action@v3 - if: steps.protected-files-changes.outputs.any_changed == 'false' - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-clang-tidy.yml b/.github/workflows/run-clang-tidy.yml deleted file mode 100644 index 60751dad4d..0000000000 --- a/.github/workflows/run-clang-tidy.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Run clang-tidy - -on: - workflow_call: - -jobs: - clang-tidy-scan: - runs-on: ubuntu-20.04 - continue-on-error: true - - steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz libcurl4-openssl-dev libprotobuf-dev libprotoc-dev protobuf-compiler libhdf5-dev qt5-default libyaml-cpp-dev - sudo apt-get install clang-tidy - - - name: Display version info - run: | - echo $(g++ --version) - echo $(clang --version) - echo $(cmake --version) - echo $(clang-tidy --version) - - # https://github.com/actions/download-artifact - - name: Download the built directory - uses: actions/download-artifact@v3 - with: - name: ecal-dir - - # replace the working directory - - name: Extract the tarball archive - run: mv ecal.tar.gz ../. && cd .. && rm -rf ecal && tar -xzf ecal.tar.gz && cd ecal - - # https://github.com/Ana06/get-changed-files - - name: Detect the changeset - id: changed_files - uses: Ana06/get-changed-files@v2.1.0 - - # see: ./build.sh --help - - name: Run clang-tidy on the changeset - id: suffix - run: | - build_linux/clang-tidy/build.sh -a -b ../../../_build -f ${{ steps.changed_files.outputs.added_modified }} - - # https://github.com/actions/upload-artifact - # If make or clang-tidy is never called, artifact upload will fail (no log files) with just a warning. - - name: Archive logs as artifact - uses: actions/upload-artifact@v3 - with: - name: clang_tidy_log_${{ steps.suffix.outputs.timestamp }} - path: ~/work/ecal/_build/clang_tidy_log_*.txt - if-no-files-found: warn - -# - name: Detect number of clang-tidy warnings -# id: num_warnings -# run: | -# NUM_WARNINGS=0 -# NUM_LOG_FILES=$(ls ~/work/ecal/_build/clang_tidy_log_*.txt 2> /dev/null | wc -l) -# if [[ ${NUM_LOG_FILES} -gt 0 ]] -# then -# NUM_WARNINGS=$(grep -oE "\w+\.\w+:\w+:\w+:\s?warning:\s?.*" -- ~/work/ecal/_build/clang_tidy_log_*.txt | wc -l) -# fi -# echo "::set-output name=value::${NUM_WARNINGS}" - -# # https://github.com/actions/github-script -# - name: Check clang-tidy warnings -# if: ${{ steps.num_warnings.outputs.value > 0 }} -# uses: actions/github-script@v6 -# with: -# script: | -# core.setFailed('number of clang-tidy warnings: ${{ steps.num_warnings.outputs.value}}') From 8b9efa6a87604de35cdf6b224bc6912e2e058f45 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:43:52 +0100 Subject: [PATCH 08/21] Added Create PR --- .github/workflows/cherry-pick-to-support.yml | 31 +++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 503e3f0ef3..b4309bc13e 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -23,23 +23,32 @@ jobs: labels: | cherry-pick title: '[cherry-pick] {old_title}' - body: 'Cherry picking #{old_pull_request_id} onto this branch' - cherry_pick_v_5_13: + body: 'Cherry picking #{old_pull_request_id} onto this branch' + + + # Create an empty PR, if the cherry_pick_v_5_12 job has failed + empty_pr_v5_12: runs-on: ubuntu-latest - name: Cherry pick into support/v5.13 - if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.13') && github.event.pull_request.merged == true }} + needs: cherry_pick_v_5_12 + if: ${{ failure() }} + steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Cherry pick into support/v5.13 - uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + ref: support/v5.12 + + - name: Create empty PR + uses: peter-evans/create-pull-request@v6 with: - branch: support/v5.13 - labels: | - cherry-pick - title: '[cherry-pick] {old_title}' - body: 'Cherry picking #{old_pull_request_id} onto this branch' + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'cherry-pick: empty PR' + title: 'cherry-pick: empty PR' + body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' + #branch: support/v5.12 + base: support/v5.12 + draft: true + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4de1ddc538fbbfd86395355d807288f7bc9818c3 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:45:26 +0100 Subject: [PATCH 09/21] Commit5 (#9) --- ecal/service/Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ecal/service/Readme.md b/ecal/service/Readme.md index 51ed56b25e..ccf6b9405d 100644 --- a/ecal/service/Readme.md +++ b/ecal/service/Readme.md @@ -1,4 +1,6 @@ Commit 4 +Commit 5 + # ecal-service The eCAL Service lib encapsulates the binary data exchange of eCAL Servcies From 3b515146436c1b2cde49a0ac1bcf4781eab5b74e Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:53:10 +0100 Subject: [PATCH 10/21] Fixed action --- .github/workflows/cherry-pick-to-support.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index b4309bc13e..401d88e49a 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -33,12 +33,21 @@ jobs: if: ${{ failure() }} steps: + + # Checkout the repository and switch to the support/v5.12 branch - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 ref: support/v5.12 + # Create a new branch from the support/v5.12 branch and commit an empty commit + - name: Create empty commit + run: | + git checkout -b empty-pr + git commit --allow-empty -m "cherry-pick: empty commit" + git push origin empty-pr + - name: Create empty PR uses: peter-evans/create-pull-request@v6 with: @@ -46,7 +55,7 @@ jobs: commit-message: 'cherry-pick: empty PR' title: 'cherry-pick: empty PR' body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' - #branch: support/v5.12 + branch: empty-pr base: support/v5.12 draft: true From e54cba120eb7f85026cd1b93dbf4fe97181fec64 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:54:28 +0100 Subject: [PATCH 11/21] Commit 6 (#10) --- ecal/service/Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ecal/service/Readme.md b/ecal/service/Readme.md index ccf6b9405d..25fe77a3da 100644 --- a/ecal/service/Readme.md +++ b/ecal/service/Readme.md @@ -1,5 +1,6 @@ Commit 4 Commit 5 +Commit 6 # ecal-service From 03a46e035568420b452a47d6763b5ecd3c08ed99 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:03:28 +0100 Subject: [PATCH 12/21] new method --- .github/workflows/cherry-pick-to-support.yml | 55 +++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 401d88e49a..bb4a0b7b17 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -1,35 +1,40 @@ name: Cherry-pick to support branches on: - pull_request: + push: branches: - master - types: ["closed"] + +# on: +# pull_request: +# branches: +# - master +# types: ["closed"] jobs: - cherry_pick_v_5_12: - runs-on: ubuntu-latest - name: Cherry pick into support/v5.12 - if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Cherry pick into support/v5.12 - uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 - with: - branch: support/v5.12 - labels: | - cherry-pick - title: '[cherry-pick] {old_title}' - body: 'Cherry picking #{old_pull_request_id} onto this branch' +# cherry_pick_v_5_12: +# runs-on: ubuntu-latest +# name: Cherry pick into support/v5.12 +# if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Cherry pick into support/v5.12 +# uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 +# with: +# branch: support/v5.12 +# labels: | +# cherry-pick +# title: '[cherry-pick] {old_title}' +# body: 'Cherry picking #{old_pull_request_id} onto this branch' # Create an empty PR, if the cherry_pick_v_5_12 job has failed empty_pr_v5_12: runs-on: ubuntu-latest - needs: cherry_pick_v_5_12 + # needs: cherry_pick_v_5_12 if: ${{ failure() }} steps: @@ -42,11 +47,11 @@ jobs: ref: support/v5.12 # Create a new branch from the support/v5.12 branch and commit an empty commit - - name: Create empty commit - run: | - git checkout -b empty-pr - git commit --allow-empty -m "cherry-pick: empty commit" - git push origin empty-pr + - uses: EndBug/add-and-commit@v9 + with: + commit: --allow-empty + message: 'cherry-pick: empty commit' + new_branch: empty-pr-branch - name: Create empty PR uses: peter-evans/create-pull-request@v6 From 1fff3d0f49e6e3d7ac2bdf9607b9d582a6cc874f Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:04:34 +0100 Subject: [PATCH 13/21] should start now --- .github/workflows/cherry-pick-to-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index bb4a0b7b17..8eacb2e358 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -35,7 +35,7 @@ jobs: empty_pr_v5_12: runs-on: ubuntu-latest # needs: cherry_pick_v_5_12 - if: ${{ failure() }} + # if: ${{ failure() }} steps: From 837f541c683d5f27c8494b563a4d5743d3bad441 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:07:38 +0100 Subject: [PATCH 14/21] correct branch name --- .github/workflows/cherry-pick-to-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 8eacb2e358..e7724d64ff 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -60,7 +60,7 @@ jobs: commit-message: 'cherry-pick: empty PR' title: 'cherry-pick: empty PR' body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' - branch: empty-pr + branch: empty-pr-branch base: support/v5.12 draft: true From 543e3d7a1f86c093a44111af4580dd782b724ff0 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:10:13 +0100 Subject: [PATCH 15/21] don't overwrite branch --- .github/workflows/cherry-pick-to-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index e7724d64ff..af29c5a8b0 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -60,7 +60,7 @@ jobs: commit-message: 'cherry-pick: empty PR' title: 'cherry-pick: empty PR' body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' - branch: empty-pr-branch +# branch: empty-pr-branch base: support/v5.12 draft: true From 5d4d51751333092db722107afb2a927595e3908e Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:19:26 +0100 Subject: [PATCH 16/21] next attempt --- .github/workflows/cherry-pick-to-support.yml | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index af29c5a8b0..c2e9bd7f11 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -47,13 +47,21 @@ jobs: ref: support/v5.12 # Create a new branch from the support/v5.12 branch and commit an empty commit - - uses: EndBug/add-and-commit@v9 - with: - commit: --allow-empty - message: 'cherry-pick: empty commit' - new_branch: empty-pr-branch + # - uses: EndBug/add-and-commit@v9 + # with: + # commit: --allow-empty + # message: 'cherry-pick: empty commit' + # new_branch: empty-pr-branch + + # switch to a new branch and create an empty commit on that branch + - name: Create empty commit + run: | + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + # git checkout -b empty-pr-branch + git commit --allow-empty -m "cherry-pick: empty commit" - - name: Create empty PR + - name: Create PR uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -61,7 +69,7 @@ jobs: title: 'cherry-pick: empty PR' body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' # branch: empty-pr-branch - base: support/v5.12 +# base: support/v5.12 draft: true env: From 23bb41fc08e50398054a37122f78cdcb1ddb3687 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:37:11 +0100 Subject: [PATCH 17/21] Added display commits action --- .github/workflows/cherry-pick-to-support.yml | 23 ++++++------ .github/workflows/display-commits.yml | 37 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/display-commits.yml diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index c2e9bd7f11..3018d69dda 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -12,6 +12,7 @@ on: # types: ["closed"] jobs: + # cherry_pick_v_5_12: # runs-on: ubuntu-latest # name: Cherry pick into support/v5.12 @@ -46,13 +47,6 @@ jobs: fetch-depth: 0 ref: support/v5.12 - # Create a new branch from the support/v5.12 branch and commit an empty commit - # - uses: EndBug/add-and-commit@v9 - # with: - # commit: --allow-empty - # message: 'cherry-pick: empty commit' - # new_branch: empty-pr-branch - # switch to a new branch and create an empty commit on that branch - name: Create empty commit run: | @@ -67,9 +61,18 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'cherry-pick: empty PR' title: 'cherry-pick: empty PR' - body: 'This PR was created automatically to indicate that the cherry-pick to support/v5.12 failed.' -# branch: empty-pr-branch -# base: support/v5.12 + body: | + This is an empty PR to indicate that the cherry-pick into support/v5.12 has failed. + + Use the following command to cherry-pick the changes manually: + + ``` + git fetch origin pull/ID/head:BRANCHNAME + git checkout BRANCHNAME + git cherry-pick COMMIT_HASH + git push origin BRANCHNAME + ``` + draft: true env: diff --git a/.github/workflows/display-commits.yml b/.github/workflows/display-commits.yml new file mode 100644 index 0000000000..11c223d5f7 --- /dev/null +++ b/.github/workflows/display-commits.yml @@ -0,0 +1,37 @@ +name: Display merged commits + +on: + pull_request: + branches: + - master + types: ["closed"] + +jobs: + + display-commits: + runs-on: ubuntu-latest + name: Display commits this PR has created + + if: ${{ github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get the PR number + id: pr_number + run: echo "PR_NUMBER=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_ENV + + - name: Get the PR commits + id: pr_commits + run: | + git fetch origin +refs/pull/${{ steps.pr_number.outputs.PR_NUMBER }}/merge + git log --pretty=format:"%h - %s" FETCH_HEAD..HEAD > pr_commits.txt + echo "::set-output name=commits::$(cat pr_commits.txt)" + + - name: Display the PR commits + run: echo "${{ steps.pr_commits.outputs.commits }}" + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b6ce0ececd2bee24b7dbeee6577281f84cc7ebf8 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:38:41 +0100 Subject: [PATCH 18/21] Commit 7 (#12) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 767858bf12..8968367a8f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ Commit 1 +Commit 7 # eCAL - enhanced Communication Abstraction Layer From 0e9512cec0e99830aca0d7bcd0f18e9f7457e25c Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:57:00 +0100 Subject: [PATCH 19/21] More actions --- .github/workflows/cherry-pick-to-support.yml | 92 ++++++-------------- .github/workflows/create-empty-pr.yml | 79 +++++++++++++++++ .github/workflows/display-commits.yml | 17 +--- 3 files changed, 112 insertions(+), 76 deletions(-) create mode 100644 .github/workflows/create-empty-pr.yml diff --git a/.github/workflows/cherry-pick-to-support.yml b/.github/workflows/cherry-pick-to-support.yml index 3018d69dda..41bbfd82d9 100644 --- a/.github/workflows/cherry-pick-to-support.yml +++ b/.github/workflows/cherry-pick-to-support.yml @@ -1,79 +1,45 @@ name: Cherry-pick to support branches on: - push: + pull_request: branches: - master - -# on: -# pull_request: -# branches: -# - master -# types: ["closed"] + types: ["closed"] jobs: - -# cherry_pick_v_5_12: -# runs-on: ubuntu-latest -# name: Cherry pick into support/v5.12 -# if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# - name: Cherry pick into support/v5.12 -# uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 -# with: -# branch: support/v5.12 -# labels: | -# cherry-pick -# title: '[cherry-pick] {old_title}' -# body: 'Cherry picking #{old_pull_request_id} onto this branch' - - - # Create an empty PR, if the cherry_pick_v_5_12 job has failed - empty_pr_v5_12: + cherry_pick_v_5_12: runs-on: ubuntu-latest - # needs: cherry_pick_v_5_12 - # if: ${{ failure() }} - + name: Cherry pick into support/v5.12 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} steps: - - # Checkout the repository and switch to the support/v5.12 branch - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - ref: support/v5.12 - - # switch to a new branch and create an empty commit on that branch - - name: Create empty commit - run: | - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - # git checkout -b empty-pr-branch - git commit --allow-empty -m "cherry-pick: empty commit" - - - name: Create PR - uses: peter-evans/create-pull-request@v6 + - name: Cherry pick into support/v5.12 + uses: carloscastrojumo/github-cherry-pick-action@main with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: 'cherry-pick: empty PR' - title: 'cherry-pick: empty PR' - body: | - This is an empty PR to indicate that the cherry-pick into support/v5.12 has failed. - - Use the following command to cherry-pick the changes manually: - - ``` - git fetch origin pull/ID/head:BRANCHNAME - git checkout BRANCHNAME - git cherry-pick COMMIT_HASH - git push origin BRANCHNAME - ``` - - draft: true - + branch: support/v5.12 + labels: | + cherry-pick + title: '[cherry-pick] {old_title}' + body: 'Cherry picking #{old_pull_request_id} onto this branch' + cherry_pick_v_5_13: + runs-on: ubuntu-latest + name: Cherry pick into support/v5.13 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.13') && github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Cherry pick into support/v5.13 + uses: carloscastrojumo/github-cherry-pick-action@main + with: + branch: support/v5.13 + labels: | + cherry-pick + title: '[cherry-pick] {old_title}' + body: 'Cherry picking #{old_pull_request_id} onto this branch' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-empty-pr.yml b/.github/workflows/create-empty-pr.yml new file mode 100644 index 0000000000..3018d69dda --- /dev/null +++ b/.github/workflows/create-empty-pr.yml @@ -0,0 +1,79 @@ +name: Cherry-pick to support branches + +on: + push: + branches: + - master + +# on: +# pull_request: +# branches: +# - master +# types: ["closed"] + +jobs: + +# cherry_pick_v_5_12: +# runs-on: ubuntu-latest +# name: Cherry pick into support/v5.12 +# if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-v5.12') && github.event.pull_request.merged == true }} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Cherry pick into support/v5.12 +# uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 +# with: +# branch: support/v5.12 +# labels: | +# cherry-pick +# title: '[cherry-pick] {old_title}' +# body: 'Cherry picking #{old_pull_request_id} onto this branch' + + + # Create an empty PR, if the cherry_pick_v_5_12 job has failed + empty_pr_v5_12: + runs-on: ubuntu-latest + # needs: cherry_pick_v_5_12 + # if: ${{ failure() }} + + steps: + + # Checkout the repository and switch to the support/v5.12 branch + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: support/v5.12 + + # switch to a new branch and create an empty commit on that branch + - name: Create empty commit + run: | + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + # git checkout -b empty-pr-branch + git commit --allow-empty -m "cherry-pick: empty commit" + + - name: Create PR + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'cherry-pick: empty PR' + title: 'cherry-pick: empty PR' + body: | + This is an empty PR to indicate that the cherry-pick into support/v5.12 has failed. + + Use the following command to cherry-pick the changes manually: + + ``` + git fetch origin pull/ID/head:BRANCHNAME + git checkout BRANCHNAME + git cherry-pick COMMIT_HASH + git push origin BRANCHNAME + ``` + + draft: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/display-commits.yml b/.github/workflows/display-commits.yml index 11c223d5f7..7b379d2eee 100644 --- a/.github/workflows/display-commits.yml +++ b/.github/workflows/display-commits.yml @@ -19,19 +19,10 @@ jobs: with: fetch-depth: 0 - - name: Get the PR number - id: pr_number - run: echo "PR_NUMBER=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_ENV - - - name: Get the PR commits - id: pr_commits - run: | - git fetch origin +refs/pull/${{ steps.pr_number.outputs.PR_NUMBER }}/merge - git log --pretty=format:"%h - %s" FETCH_HEAD..HEAD > pr_commits.txt - echo "::set-output name=commits::$(cat pr_commits.txt)" - - - name: Display the PR commits - run: echo "${{ steps.pr_commits.outputs.commits }}" + - name: display merge commit sha + run: echo "The merge commit sha is ${{ github.event.pull_request.merge_commit_sha }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c53c8b5001516c4fca06136a3073786aa6c4881b Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:57:39 +0100 Subject: [PATCH 20/21] Commit 8 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8968367a8f..a51242d35e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Commit 1 Commit 7 +Commit 8 # eCAL - enhanced Communication Abstraction Layer From 6a313b94348b8cd55a901e09648ff4078026ccce Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:58:12 +0100 Subject: [PATCH 21/21] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a51242d35e..5d9ef90fe8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ Commit 1 Commit 7 Commit 8 +Commit 9 # eCAL - enhanced Communication Abstraction Layer