From 77b5c0472dbe62ff548918603e4f6bf44b8084ac Mon Sep 17 00:00:00 2001 From: Michael Behrisch Date: Thu, 17 Oct 2024 11:31:25 +0200 Subject: [PATCH] trying to unify dependency lists #15605 --- .github/workflows/build-linux.yml | 7 ++---- build_config/build_req_deb.txt | 30 +++++++++++++++++++++++ build_config/docker/Dockerfile.ubuntu.git | 22 ++++++----------- build_config/test_req_deb.txt | 13 ++++++++++ 4 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 build_config/build_req_deb.txt create mode 100644 build_config/test_req_deb.txt diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index d90155c11032..005fab479033 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -41,9 +41,7 @@ jobs: run: | sudo apt-get update sudo apt-get install libunwind-dev # to work around https://bugs.launchpad.net/ubuntu/+source/google-glog/+bug/1991919 - sudo apt-get install cmake libeigen3-dev libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libfmt-dev - sudo apt-get install libgtest-dev libgoogle-perftools-dev libgl2ps-dev python3-dev python3-setuptools swig - sudo apt-get install maven ccache libv8-dev gettext pipx + sudo apt-get install $(cat sumo/build_config/build_req_deb.txt) pipx install texttest - name: Validate CITATION.cff @@ -70,7 +68,6 @@ jobs: - name: Building libjupedsim if: matrix.build_type == 'full' && matrix.compiler == 'gcc' run: | - sudo apt-get install libgeos-dev cmake -B jupedsim-build -D CMAKE_INSTALL_PREFIX=jupedsim-install -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache jupedsim cmake --build jupedsim-build -j4 --config Release cmake --install jupedsim-build --config Release @@ -113,7 +110,7 @@ jobs: - name: Building Examples and Tests if: matrix.build_type == 'full' && (github.repository == 'DLR-TS/sumo' || matrix.compiler == 'gcc') run: | - sudo apt-get install python3-pyproj python3-rtree python3-flake8 python3-autopep8 python3-scipy python3-pulp python3-ezdxf python3-pyperclip python3-polib + sudo apt-get install $(cat sumo/build_config/test_req_deb.txt) python3 -m venv testenv --system-site-packages source testenv/bin/activate python3 -m pip install -r sumo/tools/req_ci.txt -r sumo/tools/requirements.txt diff --git a/build_config/build_req_deb.txt b/build_config/build_req_deb.txt new file mode 100644 index 000000000000..aa3e4c6075a0 --- /dev/null +++ b/build_config/build_req_deb.txt @@ -0,0 +1,30 @@ +astyle +ccache +cmake +doxygen +g++ +gettext +git +graphviz +hugo +libeigen3-dev +libfmt-dev +libfox-1.6-dev +libgdal-dev +libgeos-dev +libgl2ps-dev +libgoogle-perftools-dev +libgtest-dev +libproj-dev +libv8-dev +libxerces-c-dev +maven +mkdocs +pipx +plantuml +pre-commit +python-is-python3 +python3-dev +python3-setuptools +swig +xvfb diff --git a/build_config/docker/Dockerfile.ubuntu.git b/build_config/docker/Dockerfile.ubuntu.git index 675373e2e1bc..6901be303db0 100644 --- a/build_config/docker/Dockerfile.ubuntu.git +++ b/build_config/docker/Dockerfile.ubuntu.git @@ -11,27 +11,19 @@ FROM ubuntu:jammy ENV SUMO_HOME=/usr/share/sumo +RUN cd /opt; git clone --shallow-submodules --single-branch --recursive https://github.com/eclipse-sumo/sumo + RUN apt-get -y update # basic build dependencies -RUN apt-get -y install git cmake g++ libxerces-c-dev libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev \ - libgdal-dev libproj-dev libgl2ps-dev libeigen3-dev gettext -# libsumo dependencies -RUN apt-get -y install swig python3-dev python3-pip python3-setuptools python3-build openjdk-11-jdk maven +RUN apt-get -y install $(cat /opt/sumo/build_config/build_req_deb.txt) # 3D GUI, video recording RUN apt-get -y install libopenscenegraph-dev libavformat-dev libswscale-dev -# unit testing, GUI testing, code style -RUN apt-get -y install libgtest-dev scrot python3-pyperclip xvfb flake8 python3-autopep8 astyle -# python packages needed for the tools (also listed in tools/requirements.txt but we prefer the ubuntu packages) -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-ezdxf python3-pandas python3-psutil python3-pulp \ - python3-pyproj python3-rtree python-is-python3 -# packages needed for the docs (some are also listed in docs/web/requirements.txt but we prefer the ubuntu packages) -RUN apt-get -y install mkdocs hugo doxygen plantuml graphviz +# packages needed for the tools (some are also listed in tools/requirements.txt but we prefer the ubuntu packages) +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install $(cat /opt/sumo/build_config/test_req_deb.txt) -RUN cd /opt; git clone --shallow-submodules --single-branch --recursive https://github.com/eclipse/sumo # python packages needed for the tools (the ones where we do not have ubuntu packages) RUN pip3 install -r /opt/sumo/tools/requirements.txt # python packages needed for the docs (the ones where we do not have ubuntu packages) RUN pip3 install -r /opt/sumo/docs/web/requirements.txt -RUN cd /opt/sumo; mkdir build/cmake-build; cd build/cmake-build; \ - cmake ../.. -DCMAKE_INSTALL_PREFIX=/usr -DSUMO_UTILS=TRUE; \ - make -j8 all examples doc install; cd /opt/sumo; rm -rf build/cmake-build +RUN cd /opt/sumo; cmake -B cmake-build -DCMAKE_INSTALL_PREFIX=/usr -DSUMO_UTILS=TRUE; \ + cd cmake-build; make -j8 all examples doc install; cd ..; rm -rf cmake-build diff --git a/build_config/test_req_deb.txt b/build_config/test_req_deb.txt new file mode 100644 index 000000000000..4396bde7ec4c --- /dev/null +++ b/build_config/test_req_deb.txt @@ -0,0 +1,13 @@ +python3-autopep8 +python3-contourpy +python3-ezdxf +python3-flake8 +python3-pandas +python3-polib +python3-psutil +python3-pulp +python3-pyperclip +python3-pyproj +python3-rtree +python3-scipy +scrot