forked from commaai/panda
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master-to-master3' into master3
- Loading branch information
Showing
30 changed files
with
289 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: jenkins scan | ||
|
||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
jobs: | ||
# TODO: gc old branches in a separate job in this workflow | ||
scan-comments: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.issue.pull_request }} | ||
steps: | ||
- name: Check for trigger phrase | ||
id: check_comment | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const triggerPhrase = "trigger-jenkins"; | ||
const comment = context.payload.comment.body; | ||
const commenter = context.payload.comment.user.login; | ||
const { data: permissions } = await github.rest.repos.getCollaboratorPermissionLevel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
username: commenter | ||
}); | ||
const hasWriteAccess = permissions.permission === 'write' || permissions.permission === 'admin'; | ||
return (hasWriteAccess && comment.includes(triggerPhrase)); | ||
result-encoding: json | ||
|
||
- name: Checkout repository | ||
if: steps.check_comment.outputs.result == 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: refs/pull/${{ github.event.issue.number }}/head | ||
|
||
- name: Push to tmp-jenkins branch | ||
if: steps.check_comment.outputs.result == 'true' | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git checkout -b tmp-jenkins-${{ github.event.issue.number }} | ||
GIT_LFS_SKIP_PUSH=1 git push -f origin tmp-jenkins-${{ github.event.issue.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,45 @@ | ||
FROM ubuntu:24.04 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONPATH=/tmp/pythonpath | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
make \ | ||
bzip2 \ | ||
ca-certificates \ | ||
capnproto \ | ||
clang \ | ||
g++ \ | ||
gcc-arm-none-eabi libnewlib-arm-none-eabi \ | ||
git \ | ||
libarchive-dev \ | ||
libbz2-dev \ | ||
libcapnp-dev \ | ||
libffi-dev \ | ||
libtool \ | ||
libusb-1.0-0 \ | ||
libzmq3-dev \ | ||
locales \ | ||
opencl-headers \ | ||
ocl-icd-opencl-dev \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python-is-python3 \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* && \ | ||
apt clean && \ | ||
cd /usr/lib/gcc/arm-none-eabi/* && \ | ||
rm -rf arm/ && \ | ||
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp | ||
|
||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt | ||
|
||
ENV CPPCHECK_DIR=/tmp/cppcheck | ||
COPY tests/misra/install.sh /tmp/ | ||
RUN /tmp/install.sh && rm -rf $CPPCHECK_DIR/.git/ | ||
ENV SKIP_CPPCHECK_INSTALL=1 | ||
|
||
ENV CEREAL_REF="861144c136c91f70dcbc652c2ffe99f57440ad47" | ||
ENV OPENDBC_REF="8e9d3688412405154a8189c421cfdc9d5feea715" | ||
COPY setup.py __init__.py $PYTHONPATH/panda/ | ||
COPY python/__init__.py $PYTHONPATH/panda/python/ | ||
RUN pip3 install --break-system-packages --no-cache-dir $PYTHONPATH/panda/[dev] | ||
|
||
RUN git config --global --add safe.directory /tmp/openpilot/panda | ||
RUN mkdir -p /tmp/openpilot/ && \ | ||
cd /tmp/openpilot/ && \ | ||
git clone --depth 1 https://github.com/commaai/cereal && \ | ||
git clone --depth 1 https://github.com/commaai/opendbc && \ | ||
cd cereal && git fetch origin $CEREAL_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \ | ||
cd opendbc && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && cd .. && \ | ||
cp -pR opendbc/SConstruct opendbc/site_scons/ . && \ | ||
pip3 install --break-system-packages --no-cache-dir -r opendbc/requirements.txt && \ | ||
scons -j8 --minimal opendbc/ cereal/ | ||
# TODO: this should be a "pip install" or not even in this repo at all | ||
RUN git config --global --add safe.directory $PYTHONPATH/panda | ||
ENV OPENDBC_REF="5ed7a834a4e0e24c3968dd1e98ceb4b9d5f9791a" | ||
RUN cd /tmp/ && \ | ||
git clone --depth 1 https://github.com/commaai/opendbc opendbc_repo && \ | ||
cd opendbc_repo && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && \ | ||
pip3 install --break-system-packages --no-cache-dir Cython numpy && \ | ||
scons -j8 --minimal opendbc/ && \ | ||
ln -s $PWD/opendbc $PYTHONPATH/opendbc | ||
|
||
# for Jenkins | ||
COPY README.md panda.tar.* /tmp/ | ||
RUN mkdir /tmp/openpilot/panda && \ | ||
tar -xvf /tmp/panda.tar.gz -C /tmp/openpilot/panda/ || true | ||
RUN mkdir -p /tmp/pythonpath/panda && \ | ||
tar -xvf /tmp/panda.tar.gz -C /tmp/pythonpath/panda/ || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.