Skip to content

And one more try. #5499

And one more try.

And one more try. #5499

name: Build Ubuntu 20.04
on:
push:
pull_request:
branches:
- master
- support/v5.12
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: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python requirements
shell: bash
run: |
python3.11 --version
mkdir "$GITHUB_WORKSPACE/.venv_build"
python3.11 -m venv "$GITHUB_WORKSPACE/.venv_build"
source "$GITHUB_WORKSPACE/.venv_build/bin/activate"
python3.11 -m pip install --upgrade pip
python3.11 -m pip install --upgrade setuptools
python3.11 -m pip install wheel
python3.11 -m pip install -r "$GITHUB_WORKSPACE/doc/requirements.txt"
- name: CMake
run: |
source "$GITHUB_WORKSPACE/.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_QT5=ON \
-DHAS_CURL=ON \
-DHAS_CAPNPROTO=OFF \
-DHAS_FTXUI=ON \
-DBUILD_DOCS=OFF \
-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
shell: bash
- name: Build Python 3.11 Wheel
run: |
source "$GITHUB_WORKSPACE/.venv_build/bin/activate"
cmake --build . --target create_python_wheel --config Release
working-directory: ${{ runner.workspace }}/_build
shell: bash
- 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
#---------------------------------------------------------------------------
# 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@v4
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