From 861144c136c91f70dcbc652c2ffe99f57440ad47 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 28 Apr 2024 13:40:31 -0700 Subject: [PATCH] update to ubuntu 24.04 (#609) * update to ubuntu 24.04 * Update .github/workflows/repo.yml * Update tests.yml * fix build * clang rt * system python * those are way too slow --- .github/workflows/repo.yml | 2 +- .github/workflows/tests.yml | 6 +++--- Dockerfile | 14 ++++++-------- SConstruct | 1 + messaging/tests/test_messaging.py | 5 +++++ 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml index 21952b3..5c12fd9 100644 --- a/.github/workflows/repo.yml +++ b/.github/workflows/repo.yml @@ -8,7 +8,7 @@ on: jobs: pre-commit-autoupdate: name: pre-commit autoupdate - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest container: image: ghcr.io/commaai/cereal:latest steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index feacb2a..ddc52ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ env: jobs: build: name: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Build docker image @@ -27,7 +27,7 @@ jobs: unit_tests: name: unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: flags: ['', '--asan', '--ubsan'] @@ -51,7 +51,7 @@ jobs: static_analysis: name: static analysis - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Build docker image diff --git a/Dockerfile b/Dockerfile index a1dabc1..94f9768 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ git \ libbz2-dev \ libcapnp-dev \ + libclang-rt-dev \ libffi-dev \ liblzma-dev \ libncurses5-dev \ @@ -26,7 +27,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ ocl-icd-opencl-dev \ opencl-headers \ - python-openssl \ + python3-dev \ + python3-pip \ tk-dev \ wget \ xz-utils \ @@ -35,16 +37,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" -RUN pyenv install 3.11.4 && \ - pyenv global 3.11.4 && \ - pyenv rehash && \ - pip3 install --no-cache-dir pyyaml Cython scons pycapnp pre-commit ruff parameterized coverage numpy +RUN pip3 install --break-system-packages --no-cache-dir pyyaml Cython scons pycapnp pre-commit ruff parameterized coverage numpy WORKDIR /project/ RUN cd /tmp/ && \ - git clone https://github.com/catchorg/Catch2.git && \ + git clone -b v2.x --depth 1 https://github.com/catchorg/Catch2.git && \ cd Catch2 && \ - git checkout 229cc4823c8cbe67366da8179efc6089dd3893e9 && \ mv single_include/catch2/ /project/ && \ cd .. \ rm -rf Catch2 diff --git a/SConstruct b/SConstruct index bf2a537..408c7bf 100644 --- a/SConstruct +++ b/SConstruct @@ -59,6 +59,7 @@ env = Environment( "-Wunused", "-Werror", "-Wshadow", + "-Wno-vla-cxx-extension", ] + ccflags, LDFLAGS=ldflags, LINKFLAGS=ldflags, diff --git a/messaging/tests/test_messaging.py b/messaging/tests/test_messaging.py index ee1344d..fdebc5b 100755 --- a/messaging/tests/test_messaging.py +++ b/messaging/tests/test_messaging.py @@ -112,6 +112,11 @@ class TestPubSubSockets(unittest.TestCase): class TestMessaging(unittest.TestCase): def setUp(self): + # TODO: ZMQ tests are too slow; all sleeps will need to be + # replaced with logic to block on the necessary condition + if "ZMQ" in os.environ: + raise unittest.SkipTest + # ZMQ pub socket takes too long to die # sleep to prevent multiple publishers error between tests zmq_sleep()