Skip to content

Commit 53e0f13

Browse files
update to ubuntu 24.04 (commaai#1941)
* update to ubuntu 24.04 * Apply suggestions from code review * Update .github/workflows/repo.yml * Update test.yaml * docker builds * bump * no pyenv * ugh this should just be removed * fix * add release/ * no openpilot * remove those too * build in the docker * cleanup * need the addons
1 parent d4a01f7 commit 53e0f13

File tree

5 files changed

+33
-62
lines changed

5 files changed

+33
-62
lines changed

Diff for: .github/workflows/drivers.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44
jobs:
55
build_socketcan:
66
name: socketcan build
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-latest
88
timeout-minutes: 5
99
steps:
1010
- uses: actions/checkout@v2

Diff for: .github/workflows/repo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
pre-commit-autoupdate:
1010
name: pre-commit autoupdate
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
container:
1313
image: ghcr.io/commaai/panda:latest
1414
steps:

Diff for: .github/workflows/test.yaml

+7-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
jobs:
2222
docker_push:
2323
name: docker push
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-latest
2525
timeout-minutes: 20
2626
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/panda'
2727
steps:
@@ -38,7 +38,7 @@ jobs:
3838

3939
build:
4040
name: build
41-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-latest
4242
timeout-minutes: 20
4343
steps:
4444
- uses: actions/checkout@v2
@@ -57,7 +57,7 @@ jobs:
5757

5858
unit_tests:
5959
name: unit tests
60-
runs-on: ubuntu-20.04
60+
runs-on: ubuntu-latest
6161
timeout-minutes: 20
6262
steps:
6363
- uses: actions/checkout@v2
@@ -70,7 +70,7 @@ jobs:
7070

7171
safety:
7272
name: safety
73-
runs-on: ubuntu-20.04
73+
runs-on: ubuntu-latest
7474
strategy:
7575
matrix:
7676
flags: ['', '--ubsan']
@@ -82,16 +82,13 @@ jobs:
8282
- name: Run safety tests
8383
timeout-minutes: 5
8484
run: |
85-
${{ env.RUN }} "cd .. && \
86-
scons -c && \
87-
scons -j$(nproc) opendbc/ cereal/ && \
88-
cd panda && \
85+
${{ env.RUN }} "scons -c -j$(nproc) && \
8986
scons -j$(nproc) ${{ matrix.flags }} && \
9087
tests/safety/test.sh"
9188
9289
misra:
9390
name: MISRA C:2012
94-
runs-on: ubuntu-20.04
91+
runs-on: ubuntu-latest
9592
timeout-minutes: 20
9693
steps:
9794
- uses: actions/checkout@v2
@@ -108,7 +105,7 @@ jobs:
108105

109106
python_linter:
110107
name: python linter
111-
runs-on: ubuntu-20.04
108+
runs-on: ubuntu-latest
112109
timeout-minutes: 20
113110
steps:
114111
- uses: actions/checkout@v2

Diff for: Dockerfile

+23-49
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,36 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:24.04
2+
23
ENV PYTHONUNBUFFERED 1
34
ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH
45

56
ENV DEBIAN_FRONTEND=noninteractive
67
RUN apt-get update && apt-get install -y --no-install-recommends \
7-
autoconf \
8-
automake \
8+
make \
99
bzip2 \
1010
ca-certificates \
1111
capnproto \
1212
clang \
13-
curl \
1413
g++ \
1514
gcc-arm-none-eabi libnewlib-arm-none-eabi \
1615
git \
1716
libarchive-dev \
18-
libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev \
1917
libbz2-dev \
2018
libcapnp-dev \
21-
libcurl4-openssl-dev \
2219
libffi-dev \
2320
libtool \
24-
libssl-dev \
25-
libsqlite3-dev \
2621
libusb-1.0-0 \
2722
libzmq3-dev \
2823
locales \
2924
opencl-headers \
3025
ocl-icd-opencl-dev \
31-
make \
32-
patch \
33-
pkg-config \
34-
python \
35-
python-dev \
36-
qt5-default \
37-
unzip \
38-
wget \
26+
python3 \
27+
python3-dev \
28+
python3-pip \
29+
python-is-python3 \
3930
zlib1g-dev \
4031
&& rm -rf /var/lib/apt/lists/* && \
41-
cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
32+
apt clean && \
33+
cd /usr/lib/gcc/arm-none-eabi/* && \
4234
rm -rf arm/ && \
4335
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
4436

@@ -47,45 +39,27 @@ ENV LANG en_US.UTF-8
4739
ENV LANGUAGE en_US:en
4840
ENV LC_ALL en_US.UTF-8
4941

50-
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
51-
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
52-
53-
ENV PANDA_PATH=/tmp/openpilot/panda
54-
ENV OPENPILOT_REF="bc4b75822a609e6897058bc83688c84004f29093"
55-
ENV OPENDBC_REF="1745ab51825055cd18748013c4a5e3377319e390"
56-
5742
COPY requirements.txt /tmp/
58-
RUN pyenv install 3.11.4 && \
59-
pyenv global 3.11.4 && \
60-
pyenv rehash && \
61-
pip install --no-cache-dir -r /tmp/requirements.txt
43+
RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt
6244

6345
ENV CPPCHECK_DIR=/tmp/cppcheck
6446
COPY tests/misra/install.sh /tmp/
65-
RUN /tmp/install.sh
66-
# don't try to install again
47+
RUN /tmp/install.sh && rm -rf $CPPCHECK_DIR/.git/
6748
ENV SKIP_CPPCHECK_INSTALL=1
6849

69-
RUN git config --global --add safe.directory /tmp/openpilot/panda
70-
RUN cd /tmp && \
71-
git clone https://github.com/commaai/openpilot.git tmppilot || true && \
72-
cd /tmp/tmppilot && \
73-
git fetch origin $OPENPILOT_REF && \
74-
git checkout $OPENPILOT_REF && \
75-
git submodule update --init cereal opendbc rednose_repo body && \
76-
git -C opendbc fetch && \
77-
git -C opendbc checkout $OPENDBC_REF && \
78-
git -C opendbc reset --hard HEAD && \
79-
git -C opendbc clean -xfd && \
80-
mkdir /tmp/openpilot && \
81-
cp -pR SConstruct site_scons/ tools/ selfdrive/ system/ common/ cereal/ opendbc/ rednose/ third_party/ body/ /tmp/openpilot && \
82-
rm -rf /tmp/openpilot/panda && \
83-
rm -rf /tmp/tmppilot
84-
85-
RUN cd /tmp/openpilot && \
86-
pip install --no-cache-dir -r opendbc/requirements.txt && \
87-
pip install --no-cache-dir --upgrade aenum lru-dict pycurl tenacity atomicwrites serial smbus2
50+
ENV CEREAL_REF="861144c136c91f70dcbc652c2ffe99f57440ad47"
51+
ENV OPENDBC_REF="e0d4be4a6215d44809718dc84efe1b9f0299ad63"
8852

53+
RUN git config --global --add safe.directory /tmp/openpilot/panda
54+
RUN mkdir -p /tmp/openpilot/ && \
55+
cd /tmp/openpilot/ && \
56+
git clone --depth 1 https://github.com/commaai/cereal && \
57+
git clone --depth 1 https://github.com/commaai/opendbc && \
58+
cd cereal && git fetch origin $CEREAL_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \
59+
cd opendbc && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \
60+
cp -pR opendbc/SConstruct opendbc/site_scons/ . && \
61+
pip3 install --break-system-packages --no-cache-dir -r opendbc/requirements.txt && \
62+
scons -j8 --minimal opendbc/ cereal/
8963

9064
# for Jenkins
9165
COPY README.md panda.tar.* /tmp/

Diff for: board/debug/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Connect an ST-Link V2 programmer to the SWD pins on the board. The pins that nee
1111
Make sure you're using a genuine one for boards that do not have a 3.3V panda power rail. For example, the tres runs at 1.8V, which is not supported by the clones.
1212

1313
## Openocd
14-
Install openocd. For Ubuntu 20.04, the one in the package manager works fine: `sudo apt install openocd`.
14+
Install openocd. For Ubuntu 24.04, the one in the package manager works fine: `sudo apt install openocd`.
1515

1616
To run, use `./debug_f4.sh (TODO)` or `./debug_h7.sh` depending on the panda.
1717

0 commit comments

Comments
 (0)