Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fba34f341f |
@@ -1,23 +0,0 @@
|
||||
* text=auto
|
||||
|
||||
# to move existing files into LFS:
|
||||
# git add --renormalize .
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.svg filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.gif filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.otf filter=lfs diff=lfs merge=lfs -text
|
||||
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
selfdrive/car/tests/test_models_segs.txt filter=lfs diff=lfs merge=lfs -text
|
||||
system/hardware/tici/updater_weston filter=lfs diff=lfs merge=lfs -text
|
||||
system/hardware/tici/updater_magic filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/**/*.a filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/**/*.so filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/**/*.so.* filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/**/*.dylib filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/acados/*/t_renderer filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/qt5/larch64/bin/lrelease filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/qt5/larch64/bin/lupdate filter=lfs diff=lfs merge=lfs -text
|
||||
third_party/catch2/include/catch2/catch.hpp filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -1,11 +0,0 @@
|
||||
* @sunnypilot/dev-internal
|
||||
/.github/ @devtekve @sunnyhaibin
|
||||
/release/ci/ @devtekve @sunnyhaibin
|
||||
/tinygrad_repo @devtekve @Discountchubbs
|
||||
/tinygrad/ @devtekve @Discountchubbs
|
||||
/selfdrive/controls/lib/longitudinal_planner.py @devtekve @Discountchubbs
|
||||
/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @devtekve @Discountchubbs
|
||||
/selfdrive/modeld/ @devtekve @Discountchubbs
|
||||
/sunnypilot/model* @devtekve @Discountchubbs
|
||||
/sunnypilot/sunnylink/ @devtekve
|
||||
/system/athena/ @devtekve
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
name: Enhancement
|
||||
about: For openpilot enhancement suggestions
|
||||
title: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
name: PC bug report
|
||||
description: For issues with running openpilot on PC
|
||||
labels: ["PC"]
|
||||
body:
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Before creating a **bug report**, please check the following:
|
||||
* Ensure you're running the latest openpilot release.
|
||||
* Ensure there isn't an existing issue for your bug. If there is, leave a comment on the existing issue.
|
||||
* Ensure you're running stock openpilot. We cannot look into bug reports from forks.
|
||||
|
||||
If you're unsure whether you've hit a bug, check out the #installation-help channel in the [community Discord server](https://discord.comma.ai).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: Also include a description of how to reproduce the bug
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: os-version
|
||||
attributes:
|
||||
label: OS Version
|
||||
placeholder: Ubuntu 24.04
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: openpilot version or commit
|
||||
placeholder: bd36f2ec8d3559909678eff2690c10a520938367
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional info
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
ci:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{.github/**,**/test_*,**/test/**,Jenkinsfile}"
|
||||
|
||||
chore:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{.github/**}"
|
||||
|
||||
car:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: '{selfdrive/car/**,opendbc_repo}'
|
||||
|
||||
simulation:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'tools/sim/**'
|
||||
|
||||
ui:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: '{selfdrive/assets/**,selfdrive/ui/**,system/ui/**}'
|
||||
|
||||
tools:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'tools/**'
|
||||
|
||||
multilanguage:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: 'selfdrive/ui/translations/**'
|
||||
|
||||
autonomy:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: "{selfdrive/modeld/models/**,selfdrive/test/process_replay/model_replay_ref_commit,sunnypilot/modeld*/models/**}"
|
||||
@@ -1,68 +0,0 @@
|
||||
<!-- Please copy and paste the relevant template -->
|
||||
|
||||
<!--- ***** Template: Fingerprint *****
|
||||
|
||||
**Car**
|
||||
Which car (make, model, year) this fingerprint is for
|
||||
|
||||
**Route**
|
||||
A route with the fingerprint
|
||||
|
||||
-->
|
||||
|
||||
<!--- ***** Template: Car Bugfix *****
|
||||
|
||||
**Description**
|
||||
|
||||
A description of the bug and the fix. Also link the issue if it exists.
|
||||
|
||||
**Verification**
|
||||
|
||||
Explain how you tested this bug fix.
|
||||
|
||||
**Route**
|
||||
|
||||
Route: [a route with the bug fix]
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<!--- ***** Template: Bugfix *****
|
||||
|
||||
**Description**
|
||||
|
||||
A description of the bug and the fix. Also link the issue if it exists.
|
||||
|
||||
**Verification**
|
||||
|
||||
Explain how you tested this bug fix.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<!--- ***** Template: Car Port *****
|
||||
|
||||
**Checklist**
|
||||
|
||||
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
|
||||
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
|
||||
- [ ] route with openpilot:
|
||||
- [ ] route with stock system:
|
||||
- [ ] car harness used (if comma doesn't sell it, put N/A):
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<!--- ***** Template: Refactor *****
|
||||
|
||||
**Description**
|
||||
|
||||
A description of the refactor, including the goals it accomplishes.
|
||||
|
||||
**Verification**
|
||||
|
||||
Explain how you tested the refactor for regressions.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
exclude-labels:
|
||||
- 'no-changelog'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
- 'feature'
|
||||
- 'enhancement'
|
||||
- title: '🐛 Bug Fixes'
|
||||
collapse-after: 5
|
||||
labels:
|
||||
- 'fix'
|
||||
- 'bugfix'
|
||||
- 'bug'
|
||||
- title: '🧰 Maintenance'
|
||||
collapse-after: 5
|
||||
label: 'chore'
|
||||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||
change-title-escapes: '\<*_&'
|
||||
replacers:
|
||||
- search: '/[Ss][Uu][Nn][Nn][Yy][Pp][Ii][Ll][Oo][Tt]/g'
|
||||
replace: 'sunnypilot'
|
||||
- search: '/\b[Ss][Pp]\b/g'
|
||||
replace: 'SP'
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'major'
|
||||
minor:
|
||||
labels:
|
||||
- 'minor'
|
||||
patch:
|
||||
labels:
|
||||
- 'patch'
|
||||
default: patch
|
||||
name-template: 'v$RESOLVED_VERSION 🚀'
|
||||
tag-template: 'v$RESOLVED_VERSION'
|
||||
version-template: "0.$MAJOR.$MINOR.$PATCH" # The day OP becomes v1, we need to bump this
|
||||
tag-prefix: "v0." # The day OP becomes v1, we need to bump this
|
||||
prerelease-identifier: "staging"
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
@@ -1,91 +0,0 @@
|
||||
name: "PR review"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened, reopened, synchronize, edited ]
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
name: review
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
# Label PRs
|
||||
- uses: actions/labeler@v6
|
||||
with:
|
||||
dot: true
|
||||
configuration-path: .github/labeler.yaml
|
||||
|
||||
# Check PR target branch
|
||||
- name: check branch
|
||||
uses: Vankka/pr-target-branch-action@def32ec9d93514138d6ac0132ee62e120a72aed5
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
target: /^(?!master$).*/
|
||||
exclude: /sunnypilot:.*/
|
||||
change-to: ${{ github.base_ref }}
|
||||
already-exists-action: close_this
|
||||
already-exists-comment: "Your PR should be made against the `master` branch"
|
||||
|
||||
update-pr-labels:
|
||||
name: Update fork's PR Labels
|
||||
runs-on: ubuntu-latest
|
||||
if: (github.event.pull_request.head.repo.fork && (contains(github.event_name, 'pull_request') && github.event.action == 'synchronize'))
|
||||
env:
|
||||
PR_LABEL: 'dev'
|
||||
TRUST_FORK_PR_LABEL: 'trust-fork-pr'
|
||||
steps:
|
||||
- name: Check if PR has dev label
|
||||
id: check-labels
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const prNumber = context.payload.pull_request.number;
|
||||
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: prNumber
|
||||
});
|
||||
|
||||
const hasDevC3Label = labels.some(label => label.name === process.env.PR_LABEL);
|
||||
const hasTrustLabel = labels.some(label => label.name === process.env.TRUST_FORK_PR_LABEL);
|
||||
|
||||
console.log(`PR #${prNumber} has ${process.env.PR_LABEL} label: ${hasDevC3Label}`);
|
||||
console.log(`PR #${prNumber} has ${process.env.TRUST_FORK_PR_LABEL} label: ${hasTrustLabel}`);
|
||||
|
||||
core.setOutput('has-dev', hasDevC3Label ? 'true' : 'false');
|
||||
core.setOutput('has-trust', hasTrustLabel ? 'true' : 'false');
|
||||
|
||||
- name: Remove trust-fork-pr label if present
|
||||
if: steps.check-labels.outputs.has-dev == 'true' && steps.check-labels.outputs.has-trust == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const prNumber = context.payload.pull_request.number;
|
||||
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: prNumber,
|
||||
name: process.env.TRUST_FORK_PR_LABEL
|
||||
});
|
||||
|
||||
console.log(`Removed '${process.env.TRUST_FORK_PR_LABEL}' label from PR #${prNumber} as it received new commits`);
|
||||
|
||||
// Add a comment to the PR
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: prNumber,
|
||||
body: `The \`${process.env.TRUST_FORK_PR_LABEL}\` label has been automatically removed because new commits were pushed to this PR. This PR will need to be re-reviewed before the label can be applied again.`
|
||||
});
|
||||
@@ -1,35 +0,0 @@
|
||||
name: badges
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
badges:
|
||||
name: create badges
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Push badges
|
||||
run: |
|
||||
python3 selfdrive/ui/translations/create_badges.py
|
||||
|
||||
rm .gitattributes
|
||||
|
||||
git checkout --orphan badges
|
||||
git rm -rf --cached .
|
||||
git config user.email "badge-researcher@sunnypilot.ai"
|
||||
git config user.name "Badge Researcher"
|
||||
|
||||
git add translation_badge.svg
|
||||
git commit -m "Add/Update badges"
|
||||
git push -f origin HEAD
|
||||
@@ -1,304 +0,0 @@
|
||||
name: Build and push all tinygrad models
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
set_min_version:
|
||||
description: 'Minimum selector version required for the models (see helpers.py or readme.md)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
json_version: ${{ steps.get-json.outputs.json_version }}
|
||||
recompiled_dir: ${{ steps.create-recompiled-dir.outputs.recompiled_dir }}
|
||||
json_file: ${{ steps.get-json.outputs.json_file }}
|
||||
model_matrix: ${{ steps.set-matrix.outputs.model_matrix }}
|
||||
tinygrad_ref: ${{ steps.get-tinygrad-ref.outputs.tinygrad_ref }}
|
||||
steps:
|
||||
- name: Checkout sunnypilot repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot
|
||||
path: sunnypilot
|
||||
submodules: recursive
|
||||
|
||||
- name: Get tinygrad_repo ref
|
||||
id: get-tinygrad-ref
|
||||
run: |
|
||||
cd sunnypilot
|
||||
export PYTHONPATH=$(pwd)
|
||||
ref=$(python3 sunnypilot/models/tinygrad_ref.py)
|
||||
echo "tinygrad_ref=$ref" >> $GITHUB_OUTPUT
|
||||
echo "tinygrad_ref is $ref"
|
||||
|
||||
- name: Checkout docs repo (sunnypilot-models, gh-pages)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot-models
|
||||
ref: gh-pages
|
||||
path: docs
|
||||
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
|
||||
|
||||
- name: Get next JSON version to use (from GitHub docs repo)
|
||||
id: get-json
|
||||
run: |
|
||||
cd docs/docs
|
||||
latest=$(ls driving_models_v*.json | sed -E 's/.*_v([0-9]+)\.json/\1/' | sort -n | tail -1)
|
||||
next=$((latest+1))
|
||||
json_file="driving_models_v${next}.json"
|
||||
cp "driving_models_v${latest}.json" "$json_file"
|
||||
echo "json_file=docs/docs/$json_file" >> $GITHUB_OUTPUT
|
||||
echo "json_version=$((next+0))" >> $GITHUB_OUTPUT
|
||||
echo "SRC_JSON_FILE=docs/docs/driving_models_v${latest}.json" >> $GITHUB_ENV
|
||||
|
||||
- name: Extract tinygrad models
|
||||
id: set-matrix
|
||||
working-directory: docs/docs
|
||||
run: |
|
||||
jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' "$(basename "${SRC_JSON_FILE}")" > matrix.json
|
||||
echo "model_matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
|
||||
- run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Clone GitLab docs repo and create new recompiled dir
|
||||
id: create-recompiled-dir
|
||||
env:
|
||||
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
|
||||
run: |
|
||||
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
|
||||
cd gitlab_docs
|
||||
git checkout main
|
||||
git sparse-checkout set --no-cone models/
|
||||
cd models
|
||||
latest_dir=$(ls -d recompiled* 2>/dev/null | sed -E 's/recompiled([0-9]+)/\1/' | sort -n | tail -1)
|
||||
if [[ -z "$latest_dir" ]]; then
|
||||
next_dir=1
|
||||
else
|
||||
next_dir=$((latest_dir+1))
|
||||
fi
|
||||
recompiled_dir="${next_dir}"
|
||||
mkdir -p "recompiled${recompiled_dir}"
|
||||
touch "recompiled${recompiled_dir}/.gitkeep"
|
||||
cd ../..
|
||||
echo "recompiled_dir=$recompiled_dir" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Push empty recompiled dir to GitLab
|
||||
run: |
|
||||
cd gitlab_docs
|
||||
git add models/recompiled${{ steps.create-recompiled-dir.outputs.recompiled_dir }}
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git commit -m "Add recompiled${{ steps.create-recompiled-dir.outputs.recompiled_dir }} for build-all" || echo "No changes to commit"
|
||||
git push origin main
|
||||
|
||||
- name: Push new JSON to GitHub docs repo
|
||||
run: |
|
||||
cd docs
|
||||
git pull origin gh-pages
|
||||
git add docs/"$(basename ${{ steps.get-json.outputs.json_file }})"
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git commit -m "Add new ${{ steps.get-json.outputs.json_file }} for build-all" || echo "No changes to commit"
|
||||
git push origin gh-pages
|
||||
|
||||
get_and_build:
|
||||
needs: [setup]
|
||||
strategy:
|
||||
matrix:
|
||||
model: ${{ fromJson(needs.setup.outputs.model_matrix) }}
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/build-single-tinygrad-model.yaml
|
||||
with:
|
||||
upstream_branch: ${{ matrix.model.ref }}
|
||||
custom_name: ${{ matrix.model.display_name }}
|
||||
recompiled_dir: ${{ needs.setup.outputs.recompiled_dir }}
|
||||
json_version: ${{ needs.setup.outputs.json_version }}
|
||||
secrets: inherit
|
||||
|
||||
retry_failed_models:
|
||||
needs: [setup, get_and_build]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.setup.result != 'failure' && !cancelled() }}
|
||||
outputs:
|
||||
retry_matrix: ${{ steps.set-retry-matrix.outputs.retry_matrix }}
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: model-*
|
||||
path: output
|
||||
|
||||
- id: set-retry-matrix
|
||||
run: |
|
||||
echo '${{ needs.setup.outputs.model_matrix }}' > matrix.json
|
||||
built=(); while IFS= read -r line; do built+=("$line"); done < <(
|
||||
find output -maxdepth 1 -name 'model-*' -printf "%f\n" | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
|
||||
)
|
||||
jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
|
||||
'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' matrix.json > retry_matrix.json
|
||||
echo "retry_matrix=$(cat retry_matrix.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
retry_get_and_build:
|
||||
needs: [setup, get_and_build, retry_failed_models]
|
||||
if: ${{ needs.get_and_build.result == 'failure' || (needs.retry_failed_models.outputs.retry_matrix != '[]' && needs.retry_failed_models.outputs.retry_matrix != '') }}
|
||||
strategy:
|
||||
matrix:
|
||||
model: ${{ fromJson(needs.retry_failed_models.outputs.retry_matrix) }}
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/build-single-tinygrad-model.yaml
|
||||
with:
|
||||
upstream_branch: ${{ matrix.model.ref }}
|
||||
custom_name: ${{ matrix.model.display_name }}
|
||||
recompiled_dir: ${{ needs.setup.outputs.recompiled_dir }}
|
||||
json_version: ${{ needs.setup.outputs.json_version }}
|
||||
artifact_suffix: -retry
|
||||
secrets: inherit
|
||||
|
||||
publish_models:
|
||||
name: Publish models sequentially
|
||||
needs: [setup, get_and_build, retry_failed_models, retry_get_and_build]
|
||||
if: ${{ !cancelled() && (needs.get_and_build.result != 'failure' || needs.retry_get_and_build.result == 'success' || (needs.retry_failed_models.outputs.retry_matrix != '[]' && needs.retry_failed_models.outputs.retry_matrix != '')) }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
model: ${{ fromJson(needs.setup.outputs.model_matrix) }}
|
||||
env:
|
||||
RECOMPILED_DIR: recompiled${{ needs.setup.outputs.recompiled_dir }}
|
||||
JSON_FILE: ${{ needs.setup.outputs.json_file }}
|
||||
ARTIFACT_NAME_INPUT: ${{ matrix.model.display_name }}
|
||||
steps:
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab.com SSH key to known_hosts
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Clone GitLab docs repo
|
||||
env:
|
||||
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
|
||||
run: |
|
||||
echo "Cloning GitLab"
|
||||
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
|
||||
cd gitlab_docs
|
||||
echo "checkout models/${RECOMPILED_DIR}"
|
||||
git sparse-checkout set --no-cone models/${RECOMPILED_DIR}
|
||||
git checkout main
|
||||
cd ..
|
||||
|
||||
- name: Checkout docs repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot-models
|
||||
ref: gh-pages
|
||||
path: docs
|
||||
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
|
||||
|
||||
- name: Validate recompiled dir and JSON version
|
||||
run: |
|
||||
if [ ! -d "gitlab_docs/models/$RECOMPILED_DIR" ]; then
|
||||
echo "Recompiled dir $RECOMPILED_DIR does not exist in GitLab repo"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$JSON_FILE" ]; then
|
||||
echo "JSON file $JSON_FILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Download artifact name file
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact-name-${{ env.ARTIFACT_NAME_INPUT }}
|
||||
path: artifact_name
|
||||
|
||||
- name: Read artifact name
|
||||
id: read-artifact-name
|
||||
run: |
|
||||
ARTIFACT_NAME=$(cat artifact_name/artifact_name.txt)
|
||||
echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download model artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
||||
path: output
|
||||
|
||||
- name: Remove onnx files bc not needed for recompiled dir since they already exist from single build
|
||||
run: |
|
||||
find output -type f -name '*.onnx' -delete
|
||||
find output -type f -name 'big_*.pkl' -delete
|
||||
find output -type f -name 'dmonitoring_model_tinygrad.pkl' -delete
|
||||
|
||||
- name: Copy model artifacts to gitlab
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
||||
run: |
|
||||
ARTIFACT_DIR="gitlab_docs/models/${RECOMPILED_DIR}/${ARTIFACT_NAME}"
|
||||
mkdir -p "$ARTIFACT_DIR"
|
||||
for path in output/*; do
|
||||
if [ "$(basename "$path")" = "artifact_name.txt" ]; then
|
||||
continue
|
||||
fi
|
||||
name="$(basename "$path")"
|
||||
if [ -d "$path" ]; then
|
||||
mkdir -p "$ARTIFACT_DIR/$name"
|
||||
cp -r "$path"/* "$ARTIFACT_DIR/$name/"
|
||||
echo "Copied dir $name -> $ARTIFACT_DIR/$name"
|
||||
else
|
||||
cp "$path" "$ARTIFACT_DIR/"
|
||||
echo "Copied file $name -> $ARTIFACT_DIR/"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Push recompiled dir to GitLab
|
||||
env:
|
||||
GITLAB_SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
cd gitlab_docs
|
||||
git checkout main
|
||||
git pull origin main
|
||||
for d in models/"$RECOMPILED_DIR"/*/; do
|
||||
git sparse-checkout add "$d"
|
||||
done
|
||||
git add models/"$RECOMPILED_DIR"
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git commit -m "Update $RECOMPILED_DIR with model from build-all-tinygrad-models" || echo "No changes to commit"
|
||||
git push origin main
|
||||
- run: |
|
||||
cd docs
|
||||
git pull origin gh-pages
|
||||
|
||||
- name: update json
|
||||
run: |
|
||||
ARGS=""
|
||||
[ -n "${{ inputs.set_min_version }}" ] && ARGS="$ARGS --set-min-version \"${{ inputs.set_min_version }}\""
|
||||
ARGS="$ARGS --sort-by-date"
|
||||
ARGS="$ARGS --tinygrad-ref \"${{ needs.setup.outputs.tinygrad_ref }}\""
|
||||
eval python3 docs/json_parser.py \
|
||||
--json-path "$JSON_FILE" \
|
||||
--recompiled-dir "gitlab_docs/models/$RECOMPILED_DIR" \
|
||||
$ARGS
|
||||
|
||||
- name: Push updated json to GitHub
|
||||
run: |
|
||||
cd docs
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git checkout gh-pages
|
||||
git add docs/"$(basename $JSON_FILE)"
|
||||
git commit -m "Update $(basename $JSON_FILE) after recompiling model" || echo "No changes to commit"
|
||||
git push origin gh-pages
|
||||
@@ -1,228 +0,0 @@
|
||||
name: Build Single Tinygrad Model and Push
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
upstream_branch:
|
||||
description: 'Upstream commit to build from'
|
||||
required: true
|
||||
type: string
|
||||
custom_name:
|
||||
description: 'Custom name for the model (no date, only name)'
|
||||
required: false
|
||||
type: string
|
||||
recompiled_dir:
|
||||
description: 'Existing recompiled directory number (e.g. 3 for recompiled3)'
|
||||
required: true
|
||||
type: string
|
||||
json_version:
|
||||
description: 'driving_models version number to update (e.g. 5 for driving_models_v5.json)'
|
||||
required: true
|
||||
type: string
|
||||
artifact_suffix:
|
||||
description: 'Suffix for artifact name'
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
bypass_push:
|
||||
description: 'Bypass pushing to GitLab for build-all'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upstream_branch:
|
||||
description: 'Upstream commit to build from'
|
||||
required: true
|
||||
type: string
|
||||
custom_name:
|
||||
description: 'Custom name for the model (no date, only name)'
|
||||
required: false
|
||||
type: string
|
||||
recompiled_dir:
|
||||
description: 'Existing recompiled directory number (e.g. 3 for recompiled3)'
|
||||
required: true
|
||||
type: string
|
||||
json_version:
|
||||
description: 'driving_models version number to update (e.g. 5 for driving_models_v5.json)'
|
||||
required: true
|
||||
type: string
|
||||
model_folder:
|
||||
description: 'Model folder'
|
||||
type: choice
|
||||
default: 'None'
|
||||
options:
|
||||
- None
|
||||
- Simple Plan Models
|
||||
- Space Lab Models
|
||||
- TR Models
|
||||
- DTR Models
|
||||
- Custom Merge Models
|
||||
- FOF series models
|
||||
- Other
|
||||
custom_model_folder:
|
||||
description: 'Custom model folder name (if "Other" selected)'
|
||||
required: false
|
||||
type: string
|
||||
generation:
|
||||
description: 'Model generation'
|
||||
required: false
|
||||
type: string
|
||||
version:
|
||||
description: 'Minimum selector version'
|
||||
required: false
|
||||
type: string
|
||||
env:
|
||||
RECOMPILED_DIR: recompiled${{ inputs.recompiled_dir }}
|
||||
JSON_FILE: docs/docs/driving_models_v${{ inputs.json_version }}.json
|
||||
|
||||
jobs:
|
||||
build_model:
|
||||
uses: ./.github/workflows/sunnypilot-build-model.yaml
|
||||
with:
|
||||
upstream_branch: ${{ inputs.upstream_branch }}
|
||||
custom_name: ${{ inputs.custom_name || inputs.upstream_branch }}
|
||||
is_20hz: true
|
||||
artifact_suffix: ${{ inputs.artifact_suffix }}
|
||||
secrets: inherit
|
||||
|
||||
publish_model:
|
||||
if: ${{ !inputs.bypass_push && !cancelled() }}
|
||||
concurrency:
|
||||
group: gitlab-push-${{ inputs.recompiled_dir }}
|
||||
cancel-in-progress: false
|
||||
needs: build_model
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab.com SSH key to known_hosts
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Clone GitLab docs repo
|
||||
env:
|
||||
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
|
||||
run: |
|
||||
echo "Cloning GitLab"
|
||||
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
|
||||
cd gitlab_docs
|
||||
echo "checkout models/${RECOMPILED_DIR}"
|
||||
git sparse-checkout set --no-cone models/${RECOMPILED_DIR}
|
||||
git checkout main
|
||||
cd ..
|
||||
|
||||
- name: Checkout docs repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot-models
|
||||
ref: gh-pages
|
||||
path: docs
|
||||
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
|
||||
|
||||
- name: Validate recompiled dir and JSON version
|
||||
run: |
|
||||
if [ ! -d "gitlab_docs/models/$RECOMPILED_DIR" ]; then
|
||||
echo "Recompiled dir $RECOMPILED_DIR does not exist in GitLab repo"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$JSON_FILE" ]; then
|
||||
echo "JSON file $JSON_FILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Download artifact name file
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact-name-${{ inputs.custom_name || inputs.upstream_branch }}
|
||||
path: artifact_name
|
||||
|
||||
- name: Read artifact name
|
||||
id: read-artifact-name
|
||||
run: |
|
||||
ARTIFACT_NAME=$(cat artifact_name/artifact_name.txt)
|
||||
echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download and extract model artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
||||
path: output
|
||||
|
||||
- name: Remove unwanted files
|
||||
run: |
|
||||
find output -type f -name 'dmonitoring_model_tinygrad.pkl' -delete
|
||||
find output -type f -name 'dmonitoring_model.onnx' -delete
|
||||
|
||||
- name: Copy model artifact(s) to GitLab recompiled dir
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
|
||||
run: |
|
||||
ARTIFACT_DIR="gitlab_docs/models/${RECOMPILED_DIR}/${ARTIFACT_NAME}"
|
||||
mkdir -p "$ARTIFACT_DIR"
|
||||
for path in output/*; do
|
||||
if [ "$(basename "$path")" = "artifact_name.txt" ]; then
|
||||
continue
|
||||
fi
|
||||
name="$(basename "$path")"
|
||||
if [ -d "$path" ]; then
|
||||
mkdir -p "$ARTIFACT_DIR/$name"
|
||||
cp -r "$path"/* "$ARTIFACT_DIR/$name/"
|
||||
echo "Copied dir $name -> $ARTIFACT_DIR/$name"
|
||||
else
|
||||
cp "$path" "$ARTIFACT_DIR/"
|
||||
echo "Copied file $name -> $ARTIFACT_DIR/"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Push recompiled dir to GitLab
|
||||
env:
|
||||
GITLAB_SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
cd gitlab_docs
|
||||
git checkout main
|
||||
git pull origin main
|
||||
for d in models/"$RECOMPILED_DIR"/*/; do
|
||||
git sparse-checkout add "$d"
|
||||
done
|
||||
git add models/"$RECOMPILED_DIR"
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git commit -m "Create/Update $RECOMPILED_DIR with new/updated model from build-single-tinygrad-model" || echo "No changes to commit"
|
||||
git push origin main
|
||||
|
||||
- run: |
|
||||
cd docs
|
||||
git pull origin gh-pages
|
||||
|
||||
- name: Run json_parser.py to update JSON
|
||||
run: |
|
||||
FOLDER="${{ inputs.model_folder }}"
|
||||
if [ "$FOLDER" = "Other" ]; then
|
||||
FOLDER="${{ inputs.custom_model_folder }}"
|
||||
fi
|
||||
ARGS=""
|
||||
if [ "$FOLDER" != "None" ] && [ -n "$FOLDER" ]; then
|
||||
ARGS="$ARGS --model-folder \"$FOLDER\""
|
||||
fi
|
||||
[ -n "${{ inputs.generation }}" ] && ARGS="$ARGS --generation \"${{ inputs.generation }}\""
|
||||
[ -n "${{ inputs.version }}" ] && ARGS="$ARGS --version \"${{ inputs.version }}\""
|
||||
eval python3 docs/json_parser.py \
|
||||
--json-path "$JSON_FILE" \
|
||||
--recompiled-dir "gitlab_docs/models/$RECOMPILED_DIR" \
|
||||
--sort-by-date \
|
||||
$ARGS
|
||||
|
||||
- name: Push updated JSON to GitHub docs repo
|
||||
run: |
|
||||
cd docs
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
git checkout gh-pages
|
||||
git add docs/"$(basename $JSON_FILE)"
|
||||
git commit -m "Update $(basename $JSON_FILE) after recompiling model" || echo "No changes to commit"
|
||||
git push origin gh-pages
|
||||
@@ -1,78 +0,0 @@
|
||||
name: cereal validation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- 'cereal/**'
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
run_number:
|
||||
default: '1'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: cereal-validation-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI: 1
|
||||
|
||||
jobs:
|
||||
generate_cereal_artifact:
|
||||
name: Generate cereal validation artifacts
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: scons -j$(nproc) cereal
|
||||
- name: Dump sunnypilot schema
|
||||
run: |
|
||||
export PYTHONPATH=${{ github.workspace }}
|
||||
python3 cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema.json
|
||||
- name: 'Prepare artifact'
|
||||
run: |
|
||||
mkdir -p "cereal/messaging/tests/cereal_validations"
|
||||
cp cereal/messaging/tests/validate_sp_cereal_upstream.py "cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py"
|
||||
cp schema.json "cereal/messaging/tests/cereal_validations/schema.json"
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cereal_validations
|
||||
path: cereal/messaging/tests/cereal_validations
|
||||
|
||||
validate_cereal_with_upstream:
|
||||
name: Validate cereal with Upstream
|
||||
runs-on: ubuntu-24.04
|
||||
needs: generate_cereal_artifact
|
||||
steps:
|
||||
- name: Checkout sunnypilot
|
||||
uses: actions/checkout@v6
|
||||
- name: Checkout upstream openpilot
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: 'commaai/openpilot'
|
||||
path: openpilot
|
||||
submodules: true
|
||||
ref: "refs/heads/master"
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
working-directory: openpilot
|
||||
run: scons -j$(nproc) cereal
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: cereal_validations
|
||||
path: openpilot/cereal/messaging/tests/cereal_validations
|
||||
- name: 'Validate sunnypilot schema against upstream'
|
||||
run: |
|
||||
export PYTHONPATH=${{ github.workspace }}/openpilot
|
||||
chmod +x openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
|
||||
python3 openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f openpilot/cereal/messaging/tests/cereal_validations/schema.json
|
||||
@@ -1,65 +0,0 @@
|
||||
name: docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
workflow_call:
|
||||
inputs:
|
||||
run_number:
|
||||
default: '1'
|
||||
required: true
|
||||
type: string
|
||||
concurrency:
|
||||
group: docs-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: build docs
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: commaai/timeout@v1
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
# Build
|
||||
- name: Build docs
|
||||
run: |
|
||||
git lfs pull
|
||||
pip install zensical
|
||||
python scripts/docs.py build
|
||||
|
||||
# Push to docs.comma.ai
|
||||
- uses: actions/checkout@v6
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'sunnypilot/sunnypilot'
|
||||
with:
|
||||
path: openpilot-docs
|
||||
ssh-key: ${{ secrets.OPENPILOT_DOCS_KEY }}
|
||||
repository: sunnypilot/sunnypilot-docs
|
||||
- name: Push
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'sunnypilot/sunnypilot'
|
||||
run: |
|
||||
set -x
|
||||
|
||||
source release/identity.sh
|
||||
|
||||
cd openpilot-docs
|
||||
git checkout --orphan tmp
|
||||
git rm -rf .
|
||||
|
||||
# copy over docs
|
||||
cp -r ../docs_site/ docs/
|
||||
|
||||
# GitHub pages config
|
||||
touch docs/.nojekyll
|
||||
echo -n docs.comma.ai > docs/CNAME
|
||||
|
||||
git add -f .
|
||||
git commit -m "build docs"
|
||||
|
||||
# docs live in different repo to not bloat openpilot's full clone size
|
||||
git push -f origin tmp:gh-pages
|
||||
@@ -1,96 +0,0 @@
|
||||
name: jenkins scan
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
cleanup-branches:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Delete stale Jenkins branches
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const cutoff = Date.now() - 24 * 60 * 60 * 1000;
|
||||
const prefixes = ['tmp-jenkins', '__jenkins'];
|
||||
|
||||
for await (const response of github.paginate.iterator(github.rest.repos.listBranches, {
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: 100,
|
||||
})) {
|
||||
for (const branch of response.data) {
|
||||
if (!prefixes.some(p => branch.name.startsWith(p))) continue;
|
||||
|
||||
const { data: commit } = await github.rest.repos.getCommit({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: branch.commit.sha,
|
||||
});
|
||||
|
||||
const commitDate = new Date(commit.commit.committer.date).getTime();
|
||||
if (commitDate < cutoff) {
|
||||
console.log(`Deleting branch: ${branch.name} (last commit: ${commit.commit.committer.date})`);
|
||||
await github.rest.git.deleteRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: `heads/${branch.name}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scan-comments:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.issue.pull_request }}
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
steps:
|
||||
- name: Check for trigger phrase
|
||||
id: check_comment
|
||||
uses: actions/github-script@v8
|
||||
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@v6
|
||||
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 }}
|
||||
|
||||
- name: Delete trigger comment
|
||||
if: steps.check_comment.outputs.result == 'true' && always()
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.deleteComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
comment_id: context.payload.comment.id,
|
||||
});
|
||||
@@ -1,72 +0,0 @@
|
||||
name: Sync comma's LFS
|
||||
|
||||
env:
|
||||
LFS_URL: 'https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs'
|
||||
LFS_PUSH_URL: 'ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
workflow_dispatch: # enables manual triggering
|
||||
inputs:
|
||||
upstream_branch:
|
||||
default: 'master'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
# Skip if PR is in draft mode
|
||||
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)) && !github.event.pull_request.head.repo.fork
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'commaai/openpilot'
|
||||
ref: ${{ inputs.upstream_branch }}
|
||||
|
||||
- name: LFS Fetch
|
||||
run: |
|
||||
git lfs fetch
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name 'GitHub Action'
|
||||
git config --global user.email 'action@github.com'
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab public keys
|
||||
run: |
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Ensure branch
|
||||
run: |
|
||||
if git symbolic-ref -q HEAD >/dev/null; then
|
||||
echo "Already on a branch, proceeding with push"
|
||||
else
|
||||
echo "Detached HEAD state detected, creating temporary branch"
|
||||
git checkout -b temp_branch
|
||||
fi
|
||||
|
||||
- name: Update LFS Config
|
||||
run: |
|
||||
echo '[lfs]' > .lfsconfig
|
||||
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
|
||||
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
|
||||
echo ' locksverify = false' >> .lfsconfig
|
||||
|
||||
- name: Push LFS
|
||||
id: sync-and-commit
|
||||
run: |
|
||||
git lfs ls-files -l
|
||||
git lfs push --all origin
|
||||
@@ -1,42 +0,0 @@
|
||||
name: "model review"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
paths:
|
||||
- 'selfdrive/modeld/models/*.onnx'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'commaai/openpilot'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Checkout master
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
path: base
|
||||
- run: git lfs pull
|
||||
- run: cd base && git lfs pull
|
||||
|
||||
- name: scripts/reporter.py
|
||||
id: report
|
||||
run: |
|
||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "## Model Review" >> $GITHUB_OUTPUT
|
||||
PYTHONPATH=${{ github.workspace }} MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Post model report comment
|
||||
uses: marocchino/sticky-pull-request-comment@baa7203ed60924babbe5dcd0ac8eae3b66ec5e16
|
||||
with:
|
||||
header: model-review
|
||||
message: ${{ steps.report.outputs.content }}
|
||||
@@ -1,105 +0,0 @@
|
||||
name: 'Post to Discourse'
|
||||
description: 'Posts a message to a Discourse topic (existing or new)'
|
||||
|
||||
inputs:
|
||||
discourse-url:
|
||||
description: 'Discourse instance URL (e.g., https://discourse.example.com)'
|
||||
required: true
|
||||
api-key:
|
||||
description: 'Discourse API key'
|
||||
required: true
|
||||
api-username:
|
||||
description: 'Discourse API username'
|
||||
required: true
|
||||
topic-id:
|
||||
description: 'Discourse topic ID to post to (use this OR category-id + title)'
|
||||
required: false
|
||||
category-id:
|
||||
description: 'Category ID for new topic (required if topic-id not provided)'
|
||||
required: false
|
||||
title:
|
||||
description: 'Title for new topic (required if topic-id not provided)'
|
||||
required: false
|
||||
message:
|
||||
description: 'Message content (markdown supported)'
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
post-number:
|
||||
description: 'The post number in the topic'
|
||||
value: ${{ steps.post.outputs.post_number }}
|
||||
post-url:
|
||||
description: 'Direct URL to the post'
|
||||
value: ${{ steps.post.outputs.post_url }}
|
||||
topic-id:
|
||||
description: 'The topic ID (useful when creating a new topic)'
|
||||
value: ${{ steps.post.outputs.topic_id }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Post to Discourse
|
||||
id: post
|
||||
shell: bash
|
||||
run: |
|
||||
# Validate inputs
|
||||
if [ -z "${{ inputs.topic-id }}" ] && ([ -z "${{ inputs.category-id }}" ] || [ -z "${{ inputs.title }}" ]); then
|
||||
echo "❌ Error: Must provide either topic-id OR both category-id and title"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${{ inputs.topic-id }}" ] && ([ -n "${{ inputs.category-id }}" ] || [ -n "${{ inputs.title }}" ]); then
|
||||
echo "⚠️ Warning: Both topic-id and category-id/title provided. Will post to existing topic."
|
||||
fi
|
||||
|
||||
# Determine if creating new topic or posting to existing
|
||||
if [ -n "${{ inputs.topic-id }}" ]; then
|
||||
echo "📝 Posting to existing topic ID: ${{ inputs.topic-id }}"
|
||||
|
||||
# Create JSON payload for posting to existing topic
|
||||
PAYLOAD=$(jq -n \
|
||||
--arg content '${{ inputs.message }}' \
|
||||
--arg topic_id "${{ inputs.topic-id }}" \
|
||||
'{topic_id: $topic_id, raw: $content}')
|
||||
else
|
||||
echo "✨ Creating new topic: ${{ inputs.title }}"
|
||||
|
||||
# Create JSON payload for new topic
|
||||
PAYLOAD=$(jq -n \
|
||||
--arg content '${{ inputs.message }}' \
|
||||
--arg title "${{ inputs.title }}" \
|
||||
--arg category "${{ inputs.category-id }}" \
|
||||
'{title: $title, category: ($category | tonumber), raw: $content}')
|
||||
fi
|
||||
|
||||
# Post to Discourse
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||
-X POST "${{ inputs.discourse-url }}/posts.json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Api-Key: ${{ inputs.api-key }}" \
|
||||
-H "Api-Username: ${{ inputs.api-username }}" \
|
||||
-d "$PAYLOAD")
|
||||
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||
BODY=$(echo "$RESPONSE" | sed '$d')
|
||||
|
||||
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
|
||||
echo "✅ Successfully posted to Discourse!"
|
||||
|
||||
POST_NUMBER=$(echo "$BODY" | jq -r '.post_number // "unknown"')
|
||||
TOPIC_ID=$(echo "$BODY" | jq -r '.topic_id // "${{ inputs.topic-id }}"')
|
||||
POST_URL="${{ inputs.discourse-url }}/t/${TOPIC_ID}/${POST_NUMBER}"
|
||||
|
||||
echo "post_number=${POST_NUMBER}" >> $GITHUB_OUTPUT
|
||||
echo "post_url=${POST_URL}" >> $GITHUB_OUTPUT
|
||||
echo "topic_id=${TOPIC_ID}" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "Topic ID: ${TOPIC_ID}"
|
||||
echo "Post number: ${POST_NUMBER}"
|
||||
echo "URL: ${POST_URL}"
|
||||
else
|
||||
echo "❌ Failed to post to Discourse"
|
||||
echo "HTTP Code: ${HTTP_CODE}"
|
||||
echo "Response: ${BODY}"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,39 +0,0 @@
|
||||
name: prebuilt
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD: release/ci/docker_build_sp.sh
|
||||
|
||||
jobs:
|
||||
build_prebuilt:
|
||||
name: build prebuilt
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
env:
|
||||
PUSH_IMAGE: true
|
||||
permissions:
|
||||
checks: read
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Wait for green check mark
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
|
||||
with:
|
||||
ref: master
|
||||
wait-interval: 30
|
||||
running-workflow-name: 'build prebuilt'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
check-regexp: ^((?!.*(build master-ci|create badges).*).)*$
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: git lfs pull
|
||||
- name: Build and Push docker image
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
eval "$BUILD"
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v6
|
||||
with:
|
||||
config-name: release-drafter.yml
|
||||
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,31 +0,0 @@
|
||||
name: release
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 9 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build___nightly:
|
||||
name: build __nightly
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
permissions:
|
||||
checks: read
|
||||
contents: write
|
||||
steps:
|
||||
- name: Wait for green check mark
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
|
||||
with:
|
||||
ref: master
|
||||
wait-interval: 30
|
||||
running-workflow-name: 'build __nightly'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
check-regexp: ^((?!.*(build prebuilt|create badges).*).)*$
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Push __nightly
|
||||
run: BRANCH=__nightly release/build_stripped.sh
|
||||
@@ -1,77 +0,0 @@
|
||||
name: repo maintenance
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 14 * * 1" # every Monday at 2am UTC (6am PST)
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
package_updates:
|
||||
name: package_updates
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: uv lock
|
||||
run: uv lock --upgrade
|
||||
- name: uv pip tree
|
||||
id: pip_tree
|
||||
run: |
|
||||
echo 'PIP_TREE<<EOF' >> $GITHUB_OUTPUT
|
||||
uv pip tree >> $GITHUB_OUTPUT
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
- name: venv size
|
||||
id: venv_size
|
||||
run: |
|
||||
echo 'VENV_SIZE<<EOF' >> $GITHUB_OUTPUT
|
||||
echo "Total: $(du -sh .venv | cut -f1)" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
echo "Top 10 by size:" >> $GITHUB_OUTPUT
|
||||
du -sh .venv/lib/python*/site-packages/* 2>/dev/null \
|
||||
| grep -v '\.dist-info' \
|
||||
| grep -v '__pycache__' \
|
||||
| sort -rh \
|
||||
| head -10 \
|
||||
| while IFS=$'\t' read size path; do echo "$size ${path##*/}"; done >> $GITHUB_OUTPUT
|
||||
echo 'EOF' >> $GITHUB_OUTPUT
|
||||
- name: bump submodules
|
||||
run: |
|
||||
git config submodule.msgq.update none
|
||||
git config submodule.rednose_repo.update none
|
||||
git config submodule.teleoprtc_repo.update none
|
||||
git config submodule.tinygrad.update none
|
||||
git submodule update --remote
|
||||
git add .
|
||||
- name: update car docs
|
||||
run: |
|
||||
python selfdrive/car/docs.py
|
||||
git add docs/CARS.md
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
|
||||
with:
|
||||
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
||||
token: ${{ github.repository == 'commaai/openpilot' && secrets.ACTIONS_CREATE_PR_PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: Update Python packages
|
||||
title: '[bot] Update Python packages'
|
||||
branch: auto-package-updates
|
||||
base: master
|
||||
delete-branch: true
|
||||
body: |
|
||||
Automatic PR from repo-maintenance -> package_updates
|
||||
|
||||
```
|
||||
$ du -sh .venv && du -sh .venv/lib/python*/site-packages/* | sort -rh | head -10
|
||||
${{ steps.venv_size.outputs.VENV_SIZE }}
|
||||
```
|
||||
|
||||
```
|
||||
$ uv pip tree
|
||||
${{ steps.pip_tree.outputs.PIP_TREE }}
|
||||
```
|
||||
labels: bot
|
||||
@@ -1,52 +0,0 @@
|
||||
name: stale
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DAYS_BEFORE_PR_CLOSE: 7
|
||||
DAYS_BEFORE_PR_STALE: 24
|
||||
DAYS_BEFORE_PR_STALE_DRAFT: 30
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
exempt-all-milestones: true
|
||||
|
||||
# pull request config
|
||||
stale-pr-message: 'This PR has had no activity for ${{ env.DAYS_BEFORE_PR_STALE }} days. It will be automatically closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days if there is no activity.'
|
||||
close-pr-message: 'This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.'
|
||||
stale-pr-label: stale
|
||||
delete-branch: ${{ github.event.pull_request.head.repo.full_name == 'sunnypilot/sunnypilot' }} # only delete branches on the main repo
|
||||
exempt-pr-labels: "ignore stale,needs testing" # if wip or it needs testing from the community, don't mark as stale
|
||||
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
|
||||
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
|
||||
exempt-draft-pr: false
|
||||
|
||||
# issue config
|
||||
days-before-issue-stale: -1 # ignore issues for now
|
||||
|
||||
# same as above, but give draft PRs more time
|
||||
stale_drafts:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
exempt-all-milestones: true
|
||||
|
||||
# pull request config
|
||||
stale-pr-message: 'This PR has had no activity for ${{ env.DAYS_BEFORE_PR_STALE_DRAFT }} days. It will be automatically closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days if there is no activity.'
|
||||
close-pr-message: 'This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.'
|
||||
stale-pr-label: stale
|
||||
delete-branch: ${{ github.event.pull_request.head.repo.full_name == 'commaai/openpilot' }} # only delete branches on the main repo
|
||||
exempt-pr-labels: "ignore stale,needs testing" # if wip or it needs testing from the community, don't mark as stale
|
||||
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE_DRAFT }}
|
||||
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
|
||||
exempt-draft-pr: true
|
||||
|
||||
# issue config
|
||||
days-before-issue-stale: -1 # ignore issues for now
|
||||
@@ -1,229 +0,0 @@
|
||||
name: Build Model from Upstream
|
||||
|
||||
env:
|
||||
BUILD_DIR: "/data/openpilot"
|
||||
OUTPUT_DIR: ${{ github.workspace }}/output
|
||||
SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache
|
||||
UPSTREAM_REPO: "commaai/openpilot"
|
||||
TINYGRAD_PATH: ${{ github.workspace }}/tinygrad_repo
|
||||
MODELS_DIR: ${{ github.workspace }}/selfdrive/modeld/models
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
upstream_branch:
|
||||
description: 'Upstream branch to build from'
|
||||
required: true
|
||||
default: 'master'
|
||||
type: string
|
||||
custom_name:
|
||||
description: 'Custom name for the model (no date, only name)'
|
||||
required: false
|
||||
type: string
|
||||
is_20hz:
|
||||
description: 'Is this a 20Hz model'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
artifact_suffix:
|
||||
description: 'Suffix for artifact name'
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upstream_branch:
|
||||
description: 'Upstream branch to build from'
|
||||
required: true
|
||||
default: 'master'
|
||||
type: string
|
||||
custom_name:
|
||||
description: 'Custom name for the model (no date, only name)'
|
||||
required: false
|
||||
type: string
|
||||
is_20hz:
|
||||
description: 'Is this a 20Hz model'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
|
||||
run-name: Build model [${{ inputs.custom_name || inputs.upstream_branch }}] from ref [${{ inputs.upstream_branch }}]
|
||||
|
||||
jobs:
|
||||
get_model:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
REF: ${{ inputs.upstream_branch }}
|
||||
outputs:
|
||||
model_date: ${{ steps.commit-date.outputs.model_date }}
|
||||
steps:
|
||||
# Note: To allow dynamic models from both openpilot and sunnypilot (merges/mashups), we try commaai as default,
|
||||
# and fallback to sunnypilot if the ref checkout fails.
|
||||
- name: Checkout commaai/openpilot
|
||||
id: checkout_upstream
|
||||
continue-on-error: true
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: commaai/openpilot
|
||||
ref: ${{ inputs.upstream_branch }}
|
||||
submodules: recursive
|
||||
path: openpilot
|
||||
|
||||
- name: Fallback to sunnypilot/sunnypilot
|
||||
if: steps.checkout_upstream.outcome == 'failure'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: sunnypilot/sunnypilot
|
||||
ref: ${{ inputs.upstream_branch }}
|
||||
submodules: recursive
|
||||
path: openpilot
|
||||
- name: Get commit date
|
||||
id: commit-date
|
||||
run: |
|
||||
cd ${{ github.workspace }}/openpilot
|
||||
commit_date=$(git log -1 --format=%cd --date=format:'%B %d, %Y')
|
||||
echo "model_date=${commit_date}" >> $GITHUB_OUTPUT
|
||||
cat $GITHUB_OUTPUT
|
||||
- run: |
|
||||
cd ${{ github.workspace }}/openpilot
|
||||
git lfs pull
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models/*.onnx
|
||||
|
||||
build_model:
|
||||
runs-on: [self-hosted, tici]
|
||||
needs: get_model
|
||||
env:
|
||||
MODEL_NAME: ${{ inputs.custom_name || inputs.upstream_branch }} (${{ needs.get_model.outputs.model_date }})
|
||||
REF: ${{ inputs.upstream_branch }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- run: git lfs pull
|
||||
- name: Cache SCons
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.SCONS_CACHE_DIR}}
|
||||
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model-${{ github.sha }}
|
||||
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
|
||||
# for security. Only caches from the default branch are shared across all builds. This is by design and cannot be overridden.
|
||||
restore-keys: |
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_NEW_BRANCH }}-model
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_BRANCH }}-model
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_NEW_BRANCH }}
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_BRANCH }}
|
||||
scons-${{ runner.os }}-${{ runner.arch }}
|
||||
|
||||
- name: Set environment variables
|
||||
id: set-env
|
||||
run: |
|
||||
# Set up common environment
|
||||
source /etc/profile;
|
||||
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
printenv >> $GITHUB_ENV
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
cat $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
mkdir -p "${BUILD_DIR}/"
|
||||
sudo find $BUILD_DIR/ -mindepth 1 -delete
|
||||
echo "Starting build stage..."
|
||||
echo "BUILD_DIR: ${BUILD_DIR}"
|
||||
echo "CI_DIR: ${CI_DIR}"
|
||||
echo "VERSION: ${{ steps.set-env.outputs.version }}"
|
||||
echo "UV_PROJECT_ENVIRONMENT: ${UV_PROJECT_ENVIRONMENT}"
|
||||
echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
|
||||
echo "-------"
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
printenv
|
||||
fi
|
||||
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --disable
|
||||
rm -rf ${{ env.MODELS_DIR }}/*.onnx
|
||||
|
||||
- name: Download model artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/selfdrive/modeld/models
|
||||
- run: |
|
||||
rm -f ${{ github.workspace }}/selfdrive/modeld/models/{dmonitoring_model,big_driving_policy,big_driving_vision}.onnx
|
||||
|
||||
- name: Build Model
|
||||
run: |
|
||||
source /etc/profile
|
||||
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}"
|
||||
|
||||
# Loop through all .onnx files
|
||||
find "${{ env.MODELS_DIR }}" -maxdepth 1 -name '*.onnx' | while IFS= read -r onnx_file; do
|
||||
base_name=$(basename "$onnx_file" .onnx)
|
||||
output_file="${{ env.MODELS_DIR }}/${base_name}_tinygrad.pkl"
|
||||
|
||||
echo "Compiling: $onnx_file -> $output_file"
|
||||
QCOM=1 python3 "${{ env.TINYGRAD_PATH }}/examples/openpilot/compile3.py" "$onnx_file" "$output_file"
|
||||
DEV=QCOM FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
|
||||
done
|
||||
|
||||
- name: Validate Model Outputs
|
||||
run: |
|
||||
source /etc/profile
|
||||
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
|
||||
--validate-only \
|
||||
--model-dir "${{ env.MODELS_DIR }}"
|
||||
|
||||
- name: Prepare Output
|
||||
run: |
|
||||
sudo rm -rf ${{ env.OUTPUT_DIR }}
|
||||
mkdir -p ${{ env.OUTPUT_DIR }}
|
||||
|
||||
# Copy the model files
|
||||
rsync -avm \
|
||||
--include='*.dlc' \
|
||||
--include='*.pkl' \
|
||||
--include='*.onnx' \
|
||||
--exclude='*' \
|
||||
--delete-excluded \
|
||||
--chown=comma:comma \
|
||||
${{ env.MODELS_DIR }}/ ${{ env.OUTPUT_DIR }}/
|
||||
|
||||
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
|
||||
--model-dir "${{ env.MODELS_DIR }}" \
|
||||
--output-dir "${{ env.OUTPUT_DIR }}" \
|
||||
--custom-name "${{ env.MODEL_NAME }}" \
|
||||
--upstream-branch "${{ inputs.upstream_branch }}" \
|
||||
${{ inputs.is_20hz && '--is-20hz' || '' }}
|
||||
|
||||
- name: Write artifact name to file
|
||||
run: echo "model-${{ env.MODEL_NAME }}${{ inputs.artifact_suffix }}-${{ github.run_number }}" > ${{ env.OUTPUT_DIR }}/artifact_name.txt
|
||||
|
||||
- name: Upload Build Artifacts
|
||||
id: upload-artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: model-${{ env.MODEL_NAME }}${{ inputs.artifact_suffix }}-${{ github.run_number }}
|
||||
path: ${{ env.OUTPUT_DIR }}
|
||||
|
||||
- name: Upload artifact name file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifact-name-${{ inputs.custom_name || inputs.upstream_branch }}
|
||||
path: ${{ env.OUTPUT_DIR }}/artifact_name.txt
|
||||
|
||||
- name: Re-enable powersave
|
||||
if: always()
|
||||
run: |
|
||||
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --enable
|
||||
@@ -1,369 +0,0 @@
|
||||
name: sunnypilot prebuilt action
|
||||
|
||||
env:
|
||||
BUILD_DIR: "/data/openpilot"
|
||||
OUTPUT_DIR: ${{ github.workspace }}/output
|
||||
CI_DIR: ${{ github.workspace }}/release/ci
|
||||
SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache
|
||||
PUBLIC_REPO_URL: "https://github.com/sunnypilot/sunnypilot"
|
||||
|
||||
# Branch configurations
|
||||
STAGING_SOURCE_BRANCH: 'master'
|
||||
|
||||
# Runtime configuration
|
||||
SOURCE_BRANCH: "${{ github.head_ref || github.ref_name }}"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, master-dev ]
|
||||
tags: [ 'release/*' ]
|
||||
pull_request_target:
|
||||
types: [ labeled ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
wait_for_tests:
|
||||
description: 'Wait for tests to finish'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
prepare_strategy:
|
||||
runs-on: ubuntu-24.04
|
||||
if: (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
|
||||
outputs:
|
||||
environment: ${{ steps.strategy.outputs.environment }}
|
||||
new_branch: ${{ steps.strategy.outputs.new_branch }}
|
||||
extra_version_identifier: ${{ steps.strategy.outputs.extra_version_identifier }}
|
||||
version: ${{ steps.strategy.outputs.version }}
|
||||
cancel_publish_in_progress: ${{ steps.strategy.outputs.cancel_publish_in_progress }}
|
||||
publish_concurrency_group: ${{ steps.strategy.outputs.publish_concurrency_group }}
|
||||
is_stable_branch: ${{ steps.strategy.outputs.is_stable_branch }}
|
||||
build: ${{ steps.strategy.outputs.build }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Extract deploy strategy
|
||||
id: strategy
|
||||
run: |
|
||||
echo '::group::Strategy Extraction'
|
||||
BRANCH="${{ github.head_ref || github.ref_name }}"
|
||||
echo "Current branch: $BRANCH"
|
||||
|
||||
STRATEGY_JSON='${{ vars.DEPLOY_STRATEGY }}'
|
||||
CONFIG=$(echo "$STRATEGY_JSON" | jq -r --arg branch "$BRANCH" '
|
||||
.configs[] | select(.branch == $branch)
|
||||
')
|
||||
|
||||
BUILD="$(date '+%Y.%m.%d')-${{ github.run_number }}"
|
||||
if [[ -z "$CONFIG" || "$CONFIG" == "null" ]]; then
|
||||
echo "No exact strategy match found. Falling back to feature/fork logic."
|
||||
IS_FORK="${{ github.event.pull_request.head.repo.fork && 'true' || 'false' }}"
|
||||
FORK_SUFFIX=$( [[ "$IS_FORK" == "true" ]] && echo "-fork" || echo "" )
|
||||
NEW_BRANCH="${BRANCH}${FORK_SUFFIX}-prebuilt"
|
||||
|
||||
echo "new_branch=$NEW_BRANCH" >> $GITHUB_OUTPUT
|
||||
echo "version=$BUILD" >> $GITHUB_OUTPUT
|
||||
echo "cancel_publish_in_progress=true" >> $GITHUB_OUTPUT
|
||||
echo "publish_concurrency_group=publish-${BRANCH}" >> $GITHUB_OUTPUT
|
||||
echo "environment=feature-branch" >> $GITHUB_OUTPUT
|
||||
echo "extra_version_identifier=feature-branch" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Matched config: $CONFIG"
|
||||
environment=$(echo "$CONFIG" | jq -r '.environment')
|
||||
echo "environment=$environment" >> $GITHUB_OUTPUT
|
||||
echo "new_branch=$(echo "$CONFIG" | jq -r '.target_branch')" >> $GITHUB_OUTPUT
|
||||
cancel="$(echo "$CONFIG" | jq -r '.cancel_publish_in_progress')";
|
||||
echo "cancel_publish_in_progress=$( [ "$cancel" = "null" ] && echo "true" || echo $cancel)" >> $GITHUB_OUTPUT
|
||||
echo "publish_concurrency_group=publish-${BRANCH}$( [ "$cancel" = "null" ] || [ "$cancel" = "true" ] || echo "${{ github.sha }}" )" >> $GITHUB_OUTPUT
|
||||
|
||||
is_stable_branch="$(echo "$CONFIG" | jq -r '.stable_branch // false')";
|
||||
echo "is_stable_branch=$is_stable_branch" >> $GITHUB_OUTPUT
|
||||
|
||||
stable_version=$(cat sunnypilot/common/version.h | grep SUNNYPILOT_VERSION | sed -e 's/[^0-9|.]//g');
|
||||
echo "version=$([ "$is_stable_branch" = "true" ] && echo "$stable_version" || echo "$BUILD")" >> $GITHUB_OUTPUT
|
||||
echo "extra_version_identifier=${environment}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "build=$BUILD" >> $GITHUB_OUTPUT
|
||||
cat $GITHUB_OUTPUT
|
||||
|
||||
validate_tests:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [ prepare_strategy ]
|
||||
if: ${{
|
||||
((github.event_name == 'workflow_dispatch' && inputs.wait_for_tests) ||
|
||||
(github.event_name == 'push' && needs.prepare_strategy.outputs.is_stable_branch == 'true') ||
|
||||
contains(github.event_name, 'pull_request') && (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
|
||||
}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Wait for Tests
|
||||
uses: ./.github/workflows/wait-for-action # Path to where you place the action
|
||||
with:
|
||||
workflow: tests.yaml # The workflow file to monitor
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
should-wait-for-start: ${{ github.event_name == 'push' && 'true' || 'false' }}
|
||||
|
||||
build:
|
||||
needs: [ validate_tests, prepare_strategy ]
|
||||
concurrency:
|
||||
group: build-${{ github.head_ref || github.ref_name }}
|
||||
cancel-in-progress: false
|
||||
runs-on: [self-hosted, tici]
|
||||
outputs:
|
||||
new_branch: ${{ needs.prepare_strategy.outputs.new_branch }}
|
||||
version: ${{ needs.prepare_strategy.outputs.version }}
|
||||
extra_version_identifier: ${{ needs.prepare_strategy.outputs.extra_version_identifier }}
|
||||
commit_sha: ${{ github.sha }}
|
||||
if: ${{
|
||||
(always() && !cancelled() && !failure()) &&
|
||||
needs.prepare_strategy.result == 'success' &&
|
||||
(needs.validate_tests.result == 'success' || needs.validate_tests.result == 'skipped') &&
|
||||
(!contains(github.event_name, 'pull_request') ||
|
||||
(github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
|
||||
}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ env.SOURCE_BRANCH }}
|
||||
repository: ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.head.repo.full_name || github.repository }}
|
||||
- run: git lfs pull
|
||||
|
||||
- name: Cache SCons
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.SCONS_CACHE_DIR}}
|
||||
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ env.SOURCE_BRANCH }}-${{ github.sha }}
|
||||
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
|
||||
# for security. Only caches from the default branch are shared across all builds. This is by design and cannot be overridden.
|
||||
restore-keys: |
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.SOURCE_BRANCH }}
|
||||
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.STAGING_SOURCE_BRANCH }}
|
||||
scons-${{ runner.os }}-${{ runner.arch }}
|
||||
|
||||
- name: Set environment variables
|
||||
id: set-env
|
||||
run: |
|
||||
echo "new_branch=${{ needs.prepare_strategy.outputs.new_branch }}" >> $GITHUB_OUTPUT
|
||||
echo "version=${{ needs.prepare_strategy.outputs.version }}" >> $GITHUB_OUTPUT
|
||||
echo "extra_version_identifier=${{ needs.prepare_strategy.outputs.extra_version_identifier }}" >> $GITHUB_OUTPUT
|
||||
echo "commit_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Set up common environment
|
||||
source /etc/profile;
|
||||
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
printenv >> $GITHUB_ENV
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
cat $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
mkdir -p "${BUILD_DIR}/"
|
||||
sudo find $BUILD_DIR/ -mindepth 1 -delete
|
||||
echo "Starting build stage..."
|
||||
echo "BUILD_DIR: ${BUILD_DIR}"
|
||||
echo "CI_DIR: ${CI_DIR}"
|
||||
echo "VERSION: ${{ steps.set-env.outputs.version }}"
|
||||
echo "UV_PROJECT_ENVIRONMENT: ${UV_PROJECT_ENVIRONMENT}"
|
||||
echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
|
||||
echo "-------"
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
printenv
|
||||
fi
|
||||
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --disable
|
||||
|
||||
- name: Build Main Project
|
||||
run: |
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
./release/release_files.py | sort | uniq | rsync -rRl${RUNNER_DEBUG:+v} --files-from=- . $BUILD_DIR/
|
||||
cd $BUILD_DIR
|
||||
sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py
|
||||
echo "Building sunnypilot's modeld_v2..."
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld_v2
|
||||
echo "Building sunnypilot's locationd..."
|
||||
scons -j2 cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/selfdrive/locationd
|
||||
echo "Building openpilot's locationd..."
|
||||
scons -j1 cache_dir=${{env.SCONS_CACHE_DIR}} --minimal selfdrive/locationd
|
||||
echo "Building rest of sunnypilot"
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal
|
||||
touch ${BUILD_DIR}/prebuilt
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
ls -la ${BUILD_DIR}
|
||||
fi
|
||||
|
||||
- name: Prepare Output
|
||||
run: |
|
||||
sudo rm -rf ${OUTPUT_DIR}
|
||||
mkdir -p ${OUTPUT_DIR}
|
||||
rsync -am${RUNNER_DEBUG:+v} \
|
||||
--exclude='.sconsign.dblite' \
|
||||
--exclude='*.a' \
|
||||
--exclude='*.o' \
|
||||
--exclude='*.os' \
|
||||
--exclude='*.pyc' \
|
||||
--exclude='moc_*' \
|
||||
--exclude='__pycache__' \
|
||||
--exclude='Jenkinsfile' \
|
||||
--exclude='**/release/' \
|
||||
--exclude='**/.github/' \
|
||||
--exclude='**/selfdrive/ui/replay/' \
|
||||
--exclude='**/__pycache__/' \
|
||||
--exclude='${{env.SCONS_CACHE_DIR}}' \
|
||||
--exclude='**/.git/' \
|
||||
--exclude='**/SConstruct' \
|
||||
--exclude='**/SConscript' \
|
||||
--exclude='**/.venv/' \
|
||||
--exclude='selfdrive/modeld/models/driving_vision.onnx' \
|
||||
--exclude='selfdrive/modeld/models/driving_policy.onnx' \
|
||||
--exclude='third_party/*x86*' \
|
||||
--exclude='third_party/*Darwin*' \
|
||||
--delete-excluded \
|
||||
--chown=comma:comma \
|
||||
${BUILD_DIR}/ ${OUTPUT_DIR}/
|
||||
|
||||
- name: 'Tar.gz files'
|
||||
run: |
|
||||
tar czf prebuilt.tar.gz -C ${{ env.OUTPUT_DIR }} .
|
||||
ls -la prebuilt.tar.gz
|
||||
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: prebuilt
|
||||
path: prebuilt.tar.gz
|
||||
|
||||
- name: Re-enable powersave
|
||||
if: always()
|
||||
run: |
|
||||
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --enable
|
||||
|
||||
|
||||
publish:
|
||||
concurrency:
|
||||
# We do a bit of a hack here to avoid canceling the publishing job if a new commit comes in while we're publishing by adding the sha to the group name.
|
||||
# This means that if multiple commits come in while we're publishing, they will be queued up and publish one after the other.
|
||||
# Otherwise, if a job is waiting to be published due to environment wait time, it would be canceled by a new commit and restart the wait time.
|
||||
group: ${{ needs.prepare_strategy.outputs.publish_concurrency_group }}
|
||||
cancel-in-progress: ${{ needs.prepare_strategy.outputs.cancel_publish_in_progress == 'true' }}
|
||||
if: ${{ (always() && !cancelled() && !failure()) && needs.build.result == 'success' && needs.prepare_strategy.result == 'success' && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
|
||||
needs: [ build, prepare_strategy ]
|
||||
runs-on: ubuntu-24.04
|
||||
environment: ${{ needs.prepare_strategy.outputs.environment }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: prebuilt
|
||||
|
||||
- name: Untar prebuilt
|
||||
run: |
|
||||
mkdir -p ${{ env.OUTPUT_DIR }}
|
||||
tar xzf prebuilt.tar.gz -C ${{ env.OUTPUT_DIR }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
|
||||
- name: Publish to Public Repository
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo '${{ toJSON(needs.build.outputs) }}'
|
||||
ls -la ${{ env.OUTPUT_DIR }}
|
||||
|
||||
${{ env.CI_DIR }}/publish.sh \
|
||||
"${{ github.workspace }}" \
|
||||
"${{ env.OUTPUT_DIR }}" \
|
||||
"${{ needs.build.outputs.new_branch }}" \
|
||||
"${{ needs.build.outputs.version }}" \
|
||||
"https://x-access-token:${{github.token}}@github.com/sunnypilot/sunnypilot.git" \
|
||||
"${{ needs.build.outputs.extra_version_identifier }}"
|
||||
|
||||
echo ""
|
||||
echo "---- ℹ️ To update the list of branches that auto deploy prebuilts -----"
|
||||
echo ""
|
||||
echo "1. Go to: ${{ github.server_url }}/${{ github.repository }}/settings/variables/actions/AUTO_DEPLOY_PREBUILT_BRANCHES"
|
||||
echo "2. Current value: ${{ vars.AUTO_DEPLOY_PREBUILT_BRANCHES }}"
|
||||
echo "3. Update as needed (JSON array with no spaces)"
|
||||
|
||||
- name: Tag ${{ needs.prepare_strategy.outputs.environment }}
|
||||
if: ${{ needs.prepare_strategy.outputs.is_stable_branch == 'true' && (github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/')) }}
|
||||
run: |
|
||||
TAG="${{ needs.prepare_strategy.outputs.environment }}/${{ needs.prepare_strategy.outputs.version }}/${{ needs.prepare_strategy.outputs.build }}"
|
||||
git tag -f -a ${TAG} -m "${{ needs.prepare_strategy.outputs.environment }} @ ${{ needs.prepare_strategy.outputs.version }} of build ${{ needs.build.outputs.build }}."
|
||||
git push -f origin ${TAG}
|
||||
|
||||
notify:
|
||||
needs:
|
||||
- prepare_strategy
|
||||
- build
|
||||
- publish
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ (always() && !cancelled() && !failure())
|
||||
&& needs.publish.result == 'success'
|
||||
&& (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
|
||||
&& (fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES_V2)[github.head_ref || github.ref_name] != null) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare notification message
|
||||
id: message
|
||||
run: |
|
||||
TEMPLATE='${{ vars.DISCOURSE_GENERAL_UPDATE_NOTICE }}'
|
||||
export VERSION="${{ needs.prepare_strategy.outputs.version }}"
|
||||
export branch_name="${{ env.SOURCE_BRANCH }}"
|
||||
export new_branch="${{ needs.prepare_strategy.outputs.new_branch }}"
|
||||
export commit_sha="${{ github.sha }}"
|
||||
export commit_short_sha="${{ github.sha }}"
|
||||
export commit_short_sha="${commit_short_sha:0:7}"
|
||||
export extra_version_identifier="${{ needs.prepare_strategy.outputs.extra_version_identifier || github.run_number }}"
|
||||
export PUBLIC_REPO_URL="${{ env.PUBLIC_REPO_URL }}"
|
||||
|
||||
MESSAGE=$(cat << 'EOF' | envsubst
|
||||
${{ vars.DISCOURSE_GENERAL_UPDATE_NOTICE }}
|
||||
EOF
|
||||
)
|
||||
|
||||
{
|
||||
echo 'content<<EOFMARKER'
|
||||
echo "$MESSAGE"
|
||||
echo 'EOFMARKER'
|
||||
} >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Post to Discourse
|
||||
uses: ./.github/workflows/post-to-discourse
|
||||
with:
|
||||
discourse-url: ${{ vars.DISCOURSE_URL }}
|
||||
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
api-username: "system"
|
||||
topic-id: ${{ fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES_V2)[github.head_ref || github.ref_name].topic_id }}
|
||||
message: ${{ steps.message.outputs.content }}
|
||||
|
||||
manage-pr-labels:
|
||||
name: Remove prebuilt label
|
||||
runs-on: ubuntu-latest
|
||||
if: (always() && contains(github.event_name, 'pull_request') && (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
|
||||
env:
|
||||
LABEL: prebuilt
|
||||
steps:
|
||||
- name: Remove trust-fork-pr label if present
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const prNumber = context.payload.pull_request.number;
|
||||
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: prNumber,
|
||||
name: process.env.LABEL
|
||||
});
|
||||
|
||||
console.log(`Removed '${process.env.LABEL}' label from PR #${prNumber}`);
|
||||
@@ -1,243 +0,0 @@
|
||||
name: Build dev
|
||||
|
||||
env:
|
||||
DEFAULT_SOURCE_BRANCH: "master"
|
||||
DEFAULT_TARGET_BRANCH: "master-dev"
|
||||
LFS_URL: 'https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs'
|
||||
LFS_PUSH_URL: 'ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
types: [ labeled ]
|
||||
branches:
|
||||
- 'master'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
source_branch:
|
||||
description: 'Source branch to reset from'
|
||||
required: true
|
||||
default: 'master'
|
||||
type: string
|
||||
target_branch:
|
||||
description: 'Target branch to reset and squash into'
|
||||
required: true
|
||||
default: 'master-dev'
|
||||
type: string
|
||||
cancel_in_progress:
|
||||
description: 'Cancel any in-progress runs of this workflow'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: ${{ inputs.cancel_in_progress || github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||
|
||||
jobs:
|
||||
reset-and-squash:
|
||||
runs-on: ubuntu-latest
|
||||
if: (
|
||||
(github.event_name == 'workflow_dispatch')
|
||||
|| (github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|
||||
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == vars.PREBUILT_PR_LABEL || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, vars.PREBUILT_PR_LABEL))))
|
||||
)
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for all branches
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Wait for Tests
|
||||
uses: ./.github/workflows/wait-for-action # Path to where you place the action
|
||||
if: (
|
||||
(github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|
||||
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == vars.PREBUILT_PR_LABEL || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, vars.PREBUILT_PR_LABEL))))
|
||||
)
|
||||
with:
|
||||
workflow: tests.yaml # The workflow file to monitor
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab public keys
|
||||
run: |
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install PyGithub
|
||||
|
||||
- name: Check branches exist
|
||||
run: |
|
||||
# Check if source branch exists
|
||||
if ! git ls-remote --heads origin ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }} | grep -q "${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"; then
|
||||
echo "Source branch ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }} does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we have the latest source branch
|
||||
git fetch origin ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
|
||||
|
||||
# Check if target branch exists
|
||||
if ! git ls-remote --heads origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} | grep -q "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"; then
|
||||
echo "Target branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} does not exist, creating it from ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
|
||||
git checkout -b ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} origin/${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
|
||||
git push origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}
|
||||
else
|
||||
# Fetch target branch if it exists
|
||||
git fetch origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}
|
||||
fi
|
||||
|
||||
- name: Reset target branch
|
||||
run: |
|
||||
echo "Resetting ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} to match ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
|
||||
# Delete if exists and recreate pointing to source
|
||||
git branch -D ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} || true
|
||||
git branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} origin/${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
|
||||
|
||||
- name: Get PRs to squash
|
||||
id: get-prs
|
||||
run: |
|
||||
# Use GitHub API to get PRs with specific label, ordered by creation date
|
||||
PR_LIST=$(gh api graphql -f query='
|
||||
query($search_query:String!) {
|
||||
search(query: $search_query, type:ISSUE, first:40) {
|
||||
nodes {
|
||||
... on PullRequest {
|
||||
number
|
||||
headRefName
|
||||
title
|
||||
createdAt
|
||||
labels(last:10) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
headRepository {
|
||||
name
|
||||
nameWithOwner
|
||||
url
|
||||
isFork
|
||||
}
|
||||
commits(last: 1) {
|
||||
nodes {
|
||||
commit {
|
||||
statusCheckRollup {
|
||||
state
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -F search_query="repo:${{ github.repository }} is:pr is:open label:${{ vars.PREBUILT_PR_LABEL }},${{ vars.PREBUILT_PR_LABEL }}-c3 draft:false sort:created-asc")
|
||||
|
||||
PR_LIST=${PR_LIST//\'/}
|
||||
echo "PR_LIST=${PR_LIST}" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Process PRs
|
||||
run: |
|
||||
cp ${{ github.workspace }}/release/ci/squash_and_merge.py /tmp/squash_and_merge.py && \
|
||||
chmod +x /tmp/squash_and_merge.py && \
|
||||
python3 ${{ github.workspace }}/release/ci/squash_and_merge_prs.py \
|
||||
--pr-data '${{ steps.get-prs.outputs.PR_LIST }}' \
|
||||
--target-branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} \
|
||||
--squash-script-path '/tmp/squash_and_merge.py'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update LFS Config
|
||||
run: |
|
||||
echo '[lfs]' > .lfsconfig
|
||||
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
|
||||
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
|
||||
echo ' locksverify = false' >> .lfsconfig
|
||||
|
||||
- name: Restore workflows from source
|
||||
run: |
|
||||
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
|
||||
SOURCE_BRANCH="${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
|
||||
|
||||
# Ensure we are on the target branch
|
||||
git checkout $TARGET_BRANCH
|
||||
|
||||
echo "Restoring .github/workflows from $SOURCE_BRANCH"
|
||||
git checkout origin/$SOURCE_BRANCH -- .github/workflows
|
||||
|
||||
if ! git diff --cached --quiet; then
|
||||
echo "Workflows differ. Committing restoration."
|
||||
git commit -m "chore: restore .github/workflows from $SOURCE_BRANCH"
|
||||
else
|
||||
echo "Workflows match $SOURCE_BRANCH."
|
||||
fi
|
||||
|
||||
- uses: actions/create-github-app-token@v2
|
||||
id: ci-token
|
||||
with:
|
||||
app-id: ${{ secrets.CI_GITHUB_ACTIONS_TOKEN_APP_ID }}
|
||||
private-key: ${{ secrets.CI_GITHUB_ACTIONS_TOKEN_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Push changes if there are diffs
|
||||
id: push-changes
|
||||
run: |
|
||||
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
|
||||
|
||||
# Use the App Token to set the remote URL with authentication
|
||||
git remote set-url origin "https://x-access-token:${{ steps.ci-token.outputs.token }}@github.com/${{ github.repository }}.git"
|
||||
|
||||
# Fetch the latest from remote
|
||||
git fetch origin $TARGET_BRANCH
|
||||
|
||||
# Check for diffs between local and remote
|
||||
if git diff $TARGET_BRANCH origin/$TARGET_BRANCH --quiet; then
|
||||
echo "No changes to push - local and remote branches are identical"
|
||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Push with the authenticated origin
|
||||
if ! git push origin $TARGET_BRANCH --force; then
|
||||
echo "Failed to push changes to $TARGET_BRANCH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Branch $TARGET_BRANCH has been reset and updated with squashed PRs"
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Trigger and wait for selfdrive tests
|
||||
if: steps.push-changes.outputs.has_changes == 'true'
|
||||
run: |
|
||||
echo "Triggering selfdrive tests..."
|
||||
gh workflow run tests.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
|
||||
|
||||
echo "Sleeping for 120s to give plenty of time for the action to start and then we wait"
|
||||
sleep 120
|
||||
|
||||
echo "Getting latest run ID..."
|
||||
RUN_ID=$(gh run list --workflow=tests.yaml --branch="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}" --limit=1 --json databaseId --jq '.[0].databaseId')
|
||||
|
||||
echo "Watching run ID: $RUN_ID"
|
||||
gh run watch "$RUN_ID"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,78 +0,0 @@
|
||||
name: Debug Discourse Posting
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test-discourse-post:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Post test message to Discourse
|
||||
uses: ./.github/workflows/post-to-discourse
|
||||
with:
|
||||
discourse-url: ${{ vars.DISCOURSE_URL }}
|
||||
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
||||
topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
||||
message: |
|
||||
## 🧪 Test Post from GitHub Actions
|
||||
|
||||
**This is a test post to verify Discourse integration**
|
||||
|
||||
- **Workflow**: ${{ github.workflow }}
|
||||
- **Run Number**: #${{ github.run_number }}
|
||||
- **Branch**: `${{ github.ref_name }}`
|
||||
- **Commit**: ${{ github.sha }}
|
||||
- **Actor**: @${{ github.actor }}
|
||||
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
||||
|
||||
---
|
||||
|
||||
### Fake Build Info (for testing)
|
||||
- **Version**: 0.9.8-test
|
||||
- **Build**: #42
|
||||
- **Branch**: release-test
|
||||
|
||||
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
||||
|
||||
*This is an automated test message. Drive safe! 🚗💨*
|
||||
|
||||
|
||||
- name: Create topic on Discourse
|
||||
uses: ./.github/workflows/post-to-discourse
|
||||
with:
|
||||
discourse-url: ${{ vars.DISCOURSE_URL }}
|
||||
api-key: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
|
||||
#topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
|
||||
category-id: 4
|
||||
title: "This is a test of a new topic instead of a reply"
|
||||
message: |
|
||||
## 🧪 Test Post from GitHub Actions
|
||||
|
||||
**This is a test post to verify Discourse integration**
|
||||
|
||||
- **Workflow**: ${{ github.workflow }}
|
||||
- **Run Number**: #${{ github.run_number }}
|
||||
- **Branch**: `${{ github.ref_name }}`
|
||||
- **Commit**: ${{ github.sha }}
|
||||
- **Actor**: @${{ github.actor }}
|
||||
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
|
||||
|
||||
---
|
||||
|
||||
### Fake Build Info (for testing)
|
||||
- **Version**: 0.9.8-test
|
||||
- **Build**: #42
|
||||
- **Branch**: release-test
|
||||
|
||||
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
||||
|
||||
*This is an automated test message. Drive safe! 🚗💨*
|
||||
- name: Display results
|
||||
if: always()
|
||||
run: |
|
||||
echo "::notice::Discourse post test completed"
|
||||
echo "Check your Discourse topic to verify the post appeared correctly"
|
||||
@@ -1,248 +0,0 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
run_number:
|
||||
default: '1'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI: 1
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
PYTEST: pytest --continue-on-collection-errors --durations=0 -n logical
|
||||
|
||||
jobs:
|
||||
build_release:
|
||||
name: build release
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
env:
|
||||
STRIPPED_DIR: /tmp/releasepilot
|
||||
PYTHONPATH: /tmp/releasepilot
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Getting LFS files
|
||||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e
|
||||
with:
|
||||
timeout_minutes: 2
|
||||
max_attempts: 3
|
||||
command: git lfs pull
|
||||
- name: Build devel
|
||||
timeout-minutes: 1
|
||||
run: TARGET_DIR=$STRIPPED_DIR release/build_stripped.sh
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot and run checks
|
||||
timeout-minutes: 30
|
||||
working-directory: ${{ env.STRIPPED_DIR }}
|
||||
run: python3 system/manager/build.py
|
||||
- name: Run tests
|
||||
timeout-minutes: 1
|
||||
working-directory: ${{ env.STRIPPED_DIR }}
|
||||
run: release/check-dirty.sh
|
||||
- name: Check submodules
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
timeout-minutes: 3
|
||||
run: |
|
||||
if [ "${{ github.ref }}" != "refs/heads/master" ]; then
|
||||
git fetch origin master:refs/remotes/origin/master
|
||||
|
||||
SUBMODULE_PATHS=$(git diff origin/master HEAD --name-only | grep -E '^[^/]+$' | while read path; do
|
||||
if git ls-files --stage "$path" | grep -q "^160000"; then
|
||||
echo "$path"
|
||||
fi
|
||||
done | tr '\n' ' ')
|
||||
|
||||
if [ -n "$SUBMODULE_PATHS" ]; then
|
||||
echo "Changed submodule paths: $SUBMODULE_PATHS"
|
||||
export SUBMODULE_PATHS="$SUBMODULE_PATHS"
|
||||
export CHECK_PR_REFS=true
|
||||
fi
|
||||
fi
|
||||
release/check-submodules.sh
|
||||
|
||||
build_mac:
|
||||
name: build macOS
|
||||
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Remove Homebrew from environment
|
||||
run: |
|
||||
FILTERED=$(echo "$PATH" | tr ':' '\n' | grep -v '/opt/homebrew' | tr '\n' ':')
|
||||
echo "PATH=${FILTERED}/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_ENV
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Building openpilot
|
||||
run: scons
|
||||
|
||||
static_analysis:
|
||||
name: static analysis
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Static analysis
|
||||
timeout-minutes: 1
|
||||
run: scripts/lint/lint.sh
|
||||
|
||||
unit_tests:
|
||||
name: unit tests
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: scons -j$(nproc)
|
||||
- name: Run unit tests
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 999 }}
|
||||
run: |
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
# Pre-compile Python bytecode so each pytest worker doesn't need to
|
||||
$PYTEST --collect-only -m 'not slow' -qq
|
||||
MAX_EXAMPLES=1 $PYTEST -m 'not slow'
|
||||
|
||||
process_replay:
|
||||
name: process replay
|
||||
if: false # disable process_replay for forks
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: scons -j$(nproc)
|
||||
- name: Run replay
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 20 }}
|
||||
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
|
||||
run: selfdrive/test/process_replay/test_processes.py -j$(nproc)
|
||||
- name: Print diff
|
||||
id: print-diff
|
||||
if: always()
|
||||
run: cat selfdrive/test/process_replay/diff.txt
|
||||
- name: Print diff report
|
||||
if: always()
|
||||
run: cat selfdrive/test/process_replay/diff_report.txt
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: process_replay_diff.txt
|
||||
path: selfdrive/test/process_replay/diff.txt
|
||||
- name: Upload diff report
|
||||
uses: actions/upload-artifact@v6
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: diff_report_${{ github.event.number }}
|
||||
path: selfdrive/test/process_replay/diff_report.txt
|
||||
- name: Checkout ci-artifacts
|
||||
if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: commaai/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/ci-artifacts
|
||||
- name: Push refs
|
||||
if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master'
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git fetch origin process-replay || true
|
||||
git checkout process-replay 2>/dev/null || git checkout --orphan process-replay
|
||||
cp ${{ github.workspace }}/selfdrive/test/process_replay/fakedata/*.zst .
|
||||
echo "${{ github.sha }}" > ref_commit
|
||||
git add .
|
||||
git commit -m "process-replay refs for ${{ github.repository }}@${{ github.sha }}" || echo "No changes to commit"
|
||||
git push origin process-replay --force
|
||||
- name: Run regen
|
||||
if: false
|
||||
timeout-minutes: 4
|
||||
env:
|
||||
ONNXCPU: 1
|
||||
run: $PYTEST selfdrive/test/process_replay/test_regen.py
|
||||
|
||||
simulator_driving:
|
||||
name: simulator driving
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
if: false # FIXME: Started to timeout recently
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: scons -j$(nproc)
|
||||
- name: Driving test
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
pytest -s tools/sim/tests/test_metadrive_bridge.py
|
||||
|
||||
create_ui_report:
|
||||
name: Create UI Report
|
||||
runs-on: ${{
|
||||
(github.repository == 'commaai/openpilot') &&
|
||||
((github.event_name != 'pull_request') ||
|
||||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
|
||||
&& fromJSON('["namespace-profile-amd64-8x16"]')
|
||||
|| fromJSON('["ubuntu-24.04"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
- run: ./tools/op.sh setup
|
||||
- name: Build openpilot
|
||||
run: scons -j$(nproc)
|
||||
- name: Create UI Report
|
||||
run: |
|
||||
source selfdrive/test/setup_xvfb.sh
|
||||
python3 selfdrive/ui/tests/diff/replay.py
|
||||
python3 selfdrive/ui/tests/diff/replay.py --big
|
||||
- name: Upload UI Report
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ui-report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
path: selfdrive/ui/tests/diff/report
|
||||
@@ -1,175 +0,0 @@
|
||||
name: "ui preview"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
types: [assigned, opened, synchronize, reopened, edited]
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'selfdrive/assets/**'
|
||||
- 'selfdrive/ui/**'
|
||||
- 'system/ui/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
UI_JOB_NAME: "Create UI Report"
|
||||
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
|
||||
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
|
||||
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-ui-preview"
|
||||
REPORT_FILES_BRANCH_NAME: "mici-raylib-ui-reports"
|
||||
|
||||
# variant:video_prefix:master_branch
|
||||
VARIANTS: "mici:mici_ui_replay:openpilot_master_ui_mici_raylib big:tizi_ui_replay:openpilot_master_ui_big_raylib"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: github.repository == 'sunnypilot/sunnypilot'
|
||||
name: preview
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
actions: read
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Waiting for ui generation to end
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ env.SHA }}
|
||||
check-name: ${{ env.UI_JOB_NAME }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed-conclusions: success
|
||||
wait-interval: 20
|
||||
|
||||
- name: Getting workflow run ID
|
||||
id: get_run_id
|
||||
run: |
|
||||
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ env.SHA }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Getting proposed ui
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ steps.get_run_id.outputs.run_id }}
|
||||
search_artifacts: true
|
||||
name: ui-report-1-${{ env.REPORT_NAME }}
|
||||
path: ${{ github.workspace }}/pr_ui
|
||||
|
||||
- name: Getting mici master ui
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_mici
|
||||
ref: openpilot_master_ui_mici_raylib
|
||||
|
||||
- name: Getting big master ui
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: sunnypilot/ci-artifacts
|
||||
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
|
||||
path: ${{ github.workspace }}/master_big
|
||||
ref: openpilot_master_ui_big_raylib
|
||||
|
||||
- name: Saving new master ui
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
run: |
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name video branch <<< "$variant"
|
||||
master_dir="${{ github.workspace }}/master_${name}"
|
||||
cd "$master_dir"
|
||||
git checkout --orphan=new_branch
|
||||
git rm -rf *
|
||||
git branch -D "$branch"
|
||||
git branch -m "$branch"
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
cp "${{ github.workspace }}/pr_ui/${video}.mp4" .
|
||||
git add .
|
||||
git commit -m "${name} video for commit ${{ env.SHA }}"
|
||||
git push origin "$branch" --force
|
||||
done
|
||||
|
||||
- name: Setup FFmpeg
|
||||
uses: AnimMouse/setup-ffmpeg@ae28d57dabbb148eff63170b6bf7f2b60062cbae
|
||||
|
||||
- name: Finding diffs
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: find_diff
|
||||
run: |
|
||||
export PYTHONPATH=${{ github.workspace }}
|
||||
baseurl="https://github.com/sunnypilot/ci-artifacts/raw/refs/heads/${{ env.BRANCH_NAME }}"
|
||||
|
||||
COMMENT=""
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name video _ <<< "$variant"
|
||||
diff_name="${name}_diff"
|
||||
|
||||
mv "${{ github.workspace }}/pr_ui/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_proposed.mp4"
|
||||
cp "${{ github.workspace }}/master_${name}/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_master.mp4"
|
||||
|
||||
diff_exit_code=0
|
||||
python3 ${{ github.workspace }}/selfdrive/ui/tests/diff/diff.py \
|
||||
"${{ github.workspace }}/pr_ui/${video}_master.mp4" \
|
||||
"${{ github.workspace }}/pr_ui/${video}_proposed.mp4" \
|
||||
"${diff_name}.html" --basedir "$baseurl" --no-open || diff_exit_code=$?
|
||||
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${{ github.workspace }}/pr_ui/"
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.mp4" "${{ github.workspace }}/pr_ui/"
|
||||
|
||||
REPORT_URL="https://sunnypilot.github.io/ci-artifacts/${diff_name}_pr_${{ github.event.number }}.html"
|
||||
if [ $diff_exit_code -eq 0 ]; then
|
||||
COMMENT+="**${name}**: Videos are identical! [View Diff Report]($REPORT_URL)"$'\n'
|
||||
else
|
||||
COMMENT+="**${name}**: ⚠️ <strong>Videos differ!</strong> [View Diff Report]($REPORT_URL)"$'\n'
|
||||
fi
|
||||
done
|
||||
|
||||
{
|
||||
echo "COMMENT<<EOF"
|
||||
echo "$COMMENT"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Saving proposed ui
|
||||
if: github.event_name == 'pull_request_target'
|
||||
working-directory: ${{ github.workspace }}/master_mici
|
||||
run: |
|
||||
git config user.name "GitHub Actions Bot"
|
||||
git config user.email "<>"
|
||||
git checkout --orphan=${{ env.BRANCH_NAME }}
|
||||
git rm -rf *
|
||||
mv ${{ github.workspace }}/pr_ui/* .
|
||||
git add .
|
||||
git commit -m "ui videos for PR #${{ github.event.number }}"
|
||||
git push origin ${{ env.BRANCH_NAME }} --force
|
||||
|
||||
# Append diff reports to report files branch
|
||||
git fetch origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
git checkout ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
for variant in $VARIANTS; do
|
||||
IFS=':' read -r name _ _ <<< "$variant"
|
||||
diff_name="${name}_diff"
|
||||
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${diff_name}_pr_${{ github.event.number }}.html"
|
||||
git add "${diff_name}_pr_${{ github.event.number }}.html"
|
||||
done
|
||||
git commit -m "ui diff reports for PR #${{ github.event.number }}" || echo "No changes to commit"
|
||||
git push origin ${{ env.REPORT_FILES_BRANCH_NAME }}
|
||||
|
||||
- name: Comment on PR
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
<!-- _(run_id_ui_preview **${{ github.run_id }}**)_ -->
|
||||
## UI Preview
|
||||
${{ steps.find_diff.outputs.COMMENT }}
|
||||
comment_tag: run_id_ui_preview
|
||||
pr_number: ${{ github.event.number }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,52 +0,0 @@
|
||||
name: 'Wait for Tests'
|
||||
description: 'Action to wait for workflow tests to start and complete'
|
||||
inputs:
|
||||
workflow:
|
||||
description: 'The workflow file name to monitor'
|
||||
required: true
|
||||
default: 'tests.yaml'
|
||||
branch:
|
||||
description: 'The branch to monitor (defaults to current branch)'
|
||||
required: false
|
||||
default: ''
|
||||
github-token:
|
||||
description: 'GitHub token for API access'
|
||||
required: true
|
||||
wait-time:
|
||||
description: 'Initial sleep time in seconds before monitoring starts'
|
||||
required: false
|
||||
default: '30'
|
||||
should-wait-for-start:
|
||||
description: 'Whether to wait for tests to start'
|
||||
required: false
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Wait for tests to start
|
||||
if: inputs.should-wait-for-start == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Sleeping for ${{ inputs.wait-time }} seconds to give some time for the action to start and then we'll wait"
|
||||
sleep ${{ inputs.wait-time }}
|
||||
|
||||
- name: Wait for tests to finish
|
||||
shell: bash
|
||||
run: |
|
||||
BRANCH="${{ inputs.branch || github.head_ref || github.ref_name }}"
|
||||
|
||||
echo "Looking for workflow runs of ${{ inputs.workflow }} on branch $BRANCH"
|
||||
RUN_ID=$(gh run list --workflow=${{ inputs.workflow }} --branch="$BRANCH" --limit=1 --json databaseId --jq '.[0].databaseId')
|
||||
echo "Watching run ID: $RUN_ID"
|
||||
gh run watch "$RUN_ID"
|
||||
|
||||
CONCLUSION=$(gh run view "$RUN_ID" --json conclusion --jq '.conclusion')
|
||||
echo "Run concluded with: $CONCLUSION"
|
||||
|
||||
if [[ "$CONCLUSION" != "success" ]]; then
|
||||
echo "❌ Workflow run failed with conclusion: $CONCLUSION"
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.github-token }}
|
||||
@@ -1,21 +0,0 @@
|
||||
[submodule "panda"]
|
||||
path = panda
|
||||
url = https://github.com/sunnyhaibin/panda.git
|
||||
[submodule "opendbc"]
|
||||
path = opendbc_repo
|
||||
url = https://github.com/sunnypilot/opendbc.git
|
||||
[submodule "msgq"]
|
||||
path = msgq_repo
|
||||
url = https://github.com/commaai/msgq.git
|
||||
[submodule "rednose_repo"]
|
||||
path = rednose_repo
|
||||
url = https://github.com/commaai/rednose.git
|
||||
[submodule "teleoprtc_repo"]
|
||||
path = teleoprtc_repo
|
||||
url = https://github.com/commaai/teleoprtc
|
||||
[submodule "tinygrad"]
|
||||
path = tinygrad_repo
|
||||
url = https://github.com/sunnypilot/tinygrad.git
|
||||
[submodule "sunnypilot/neural_network_data"]
|
||||
path = sunnypilot/neural_network_data
|
||||
url = https://github.com/sunnypilot/neural-network-data.git
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CLionExternalBuildManager">
|
||||
<target id="a62f99e8-5ec4-434c-8122-49efed5af108" name="uv Scons Build Debug" defaultType="TOOL">
|
||||
<configuration id="b93ec964-16e5-4962-a12e-3ed360ce8f02" name="uv Scons Build Debug">
|
||||
<build type="TOOL">
|
||||
<tool actionId="Tool_External Tools_uv Scons Build Debug" />
|
||||
</build>
|
||||
<clean type="TOOL">
|
||||
<tool actionId="Tool_External Tools_uv Scons Clean" />
|
||||
</clean>
|
||||
</configuration>
|
||||
</target>
|
||||
<target id="edd8ad9d-183b-467c-a355-0d9a0ecab026" name="uv Scons Build Release" defaultType="TOOL">
|
||||
<configuration id="09523339-5ce3-4223-ab9e-904f38ad7752" name="uv Scons Build Release">
|
||||
<build type="TOOL">
|
||||
<tool actionId="Tool_External Tools_uv Scons Build Release" />
|
||||
</build>
|
||||
<clean type="TOOL">
|
||||
<tool actionId="Tool_External Tools_uv Scons Clean" />
|
||||
</clean>
|
||||
</configuration>
|
||||
</target>
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,23 +0,0 @@
|
||||
<toolSet name="External Tools">
|
||||
<tool name="uv Scons Build Debug" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -u -j$(nproc) --ccflags=\"-fno-inline\""" />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
<tool name="uv Scons Clean" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -c" " />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
<tool name="uv Scons Build Release" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
|
||||
<exec>
|
||||
<option name="COMMAND" value="bash" />
|
||||
<option name="PARAMETERS" value="-c "source .venv/bin/activate && scons -u -j$(nproc)" " />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
</toolSet>
|
||||
@@ -1,4 +0,0 @@
|
||||
[lfs]
|
||||
url = https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git
|
||||
locksverify = false
|
||||
@@ -1,4 +0,0 @@
|
||||
[lfs]
|
||||
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
|
||||
locksverify = false
|
||||
@@ -1,10 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Debug" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="sunnypilot" TARGET_NAME="uv Scons Build Debug" CONFIG_NAME="uv Scons Build Debug" RUN_PATH="ui">
|
||||
<envs>
|
||||
<env name="QT_DBL_CLICK_DIST" value="150" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,10 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Release" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="sunnypilot" TARGET_NAME="uv Scons Build Release" CONFIG_NAME="uv Scons Build Release" RUN_PATH="ui">
|
||||
<envs>
|
||||
<env name="QT_DBL_CLICK_DIST" value="150" />
|
||||
</envs>
|
||||
<method v="2">
|
||||
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,26 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build_BIG_UI" type="PythonConfigurationType" factoryName="Python">
|
||||
<module name="sunnypilot" />
|
||||
<option name="ENV_FILES" value="" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="BIG" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$ProjectFileDir$/selfdrive/ui/ui.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2">
|
||||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_uv Scons Build Debug" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build_SMALL_UI" type="PythonConfigurationType" factoryName="Python">
|
||||
<module name="sunnypilot" />
|
||||
<option name="ENV_FILES" value="" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<option name="SCRIPT_NAME" value="$ProjectFileDir$/selfdrive/ui/ui.py" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2">
|
||||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_uv Scons Build Debug" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,7 +1,28 @@
|
||||
sunnypilot Version 2026.001.007 (2026-05-27)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* Revert "DM: Lancia Delta HF Integrale model" by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.006 (2026-05-17)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* sunnylink SDUI: tweak DisableUpdate param for clarity by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.005 (2026-05-13)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* sunnylink: add CarParams fallback for brand-specific capabilities by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.004 (2026-05-10)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* sunnylink: switch athena domain by @DevTekVE
|
||||
* sunnylink: fix max time offroad values by @nayan8teen
|
||||
|
||||
sunnypilot Version 2026.001.003 (2026-05-08)
|
||||
========================
|
||||
* What's Changed (sunnypilot/sunnypilot)
|
||||
* manager: disable DEVELOPMENT_ONLY reset by @jason-wen
|
||||
* manager: disable DEVELOPMENT_ONLY reset by @sunnyhaibin
|
||||
|
||||
sunnypilot Version 2026.001.002 (2026-05-07)
|
||||
========================
|
||||
|
||||
@@ -1,260 +0,0 @@
|
||||
def retryWithDelay(int maxRetries, int delay, Closure body) {
|
||||
for (int i = 0; i < maxRetries; i++) {
|
||||
try {
|
||||
return body()
|
||||
} catch (Exception e) {
|
||||
sleep(delay)
|
||||
}
|
||||
}
|
||||
throw Exception("Failed after ${maxRetries} retries")
|
||||
}
|
||||
|
||||
def device(String ip, String step_label, String cmd) {
|
||||
withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) {
|
||||
def ssh_cmd = """
|
||||
ssh -o ConnectTimeout=5 -o ServerAliveInterval=5 -o ServerAliveCountMax=2 -o BatchMode=yes -o StrictHostKeyChecking=no -i ${key_file} 'comma@${ip}' exec /usr/bin/bash <<'END'
|
||||
|
||||
set -e
|
||||
|
||||
export TERM=xterm-256color
|
||||
|
||||
shopt -s huponexit # kill all child processes when the shell exits
|
||||
|
||||
export CI=1
|
||||
export PYTHONWARNINGS=error
|
||||
#export LOGPRINT=debug # this has gotten too spammy...
|
||||
export TEST_DIR=${env.TEST_DIR}
|
||||
export SOURCE_DIR=${env.SOURCE_DIR}
|
||||
export GIT_BRANCH=${env.GIT_BRANCH}
|
||||
export GIT_COMMIT=${env.GIT_COMMIT}
|
||||
export CI_ARTIFACTS_TOKEN=${env.CI_ARTIFACTS_TOKEN}
|
||||
export GITHUB_COMMENTS_TOKEN=${env.GITHUB_COMMENTS_TOKEN}
|
||||
export AZURE_TOKEN='${env.AZURE_TOKEN}'
|
||||
# only use 1 thread for tici tests since most require HIL
|
||||
export PYTEST_ADDOPTS="-n0 -s"
|
||||
|
||||
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
source ~/.bash_profile
|
||||
if [ -f /TICI ]; then
|
||||
source /etc/profile
|
||||
|
||||
rm -rf /tmp/tmp*
|
||||
rm -rf ~/.commacache
|
||||
rm -rf /dev/shm/*
|
||||
rm -rf /dev/tmp/tmp*
|
||||
|
||||
if ! systemctl is-active --quiet systemd-resolved; then
|
||||
echo "restarting resolved"
|
||||
sudo systemctl start systemd-resolved
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# restart aux USB
|
||||
if [ -e /sys/bus/usb/drivers/hub/3-0:1.0 ]; then
|
||||
echo "restarting aux usb"
|
||||
echo "3-0:1.0" | sudo tee /sys/bus/usb/drivers/hub/unbind
|
||||
sleep 0.5
|
||||
echo "3-0:1.0" | sudo tee /sys/bus/usb/drivers/hub/bind
|
||||
fi
|
||||
fi
|
||||
if [ -f /data/openpilot/launch_env.sh ]; then
|
||||
source /data/openpilot/launch_env.sh
|
||||
fi
|
||||
|
||||
ln -snf ${env.TEST_DIR} /data/pythonpath
|
||||
|
||||
cd ${env.TEST_DIR} || true
|
||||
time ${cmd}
|
||||
END"""
|
||||
|
||||
sh script: ssh_cmd, label: step_label
|
||||
}
|
||||
}
|
||||
|
||||
def deviceStage(String stageName, String deviceType, List extra_env, def steps) {
|
||||
stage(stageName) {
|
||||
if (currentBuild.result != null) {
|
||||
return
|
||||
}
|
||||
|
||||
if (isReplay()) {
|
||||
error("REPLAYING TESTS IS NOT ALLOWED. FIX THEM INSTEAD.")
|
||||
}
|
||||
|
||||
def extra = extra_env.collect { "export ${it}" }.join('\n');
|
||||
def branch = env.BRANCH_NAME ?: 'master';
|
||||
def gitDiff = sh returnStdout: true, script: 'curl -s -H "Authorization: Bearer ${GITHUB_COMMENTS_TOKEN}" https://api.github.com/repos/commaai/openpilot/compare/master...${GIT_BRANCH} | jq .files[].filename || echo "/"', label: 'Getting changes'
|
||||
|
||||
lock(resource: "", label: deviceType, inversePrecedence: true, variable: 'device_ip', quantity: 1, resourceSelectStrategy: 'random') {
|
||||
docker.image('ghcr.io/commaai/alpine-ssh').inside('--user=root') {
|
||||
timeout(time: 35, unit: 'MINUTES') {
|
||||
retry (3) {
|
||||
def date = sh(script: 'date', returnStdout: true).trim();
|
||||
device(device_ip, "set time", "date -s '" + date + "'")
|
||||
device(device_ip, "git checkout", extra + "\n" + readFile("selfdrive/test/setup_device_ci.sh"))
|
||||
}
|
||||
steps.each { item ->
|
||||
def name = item[0]
|
||||
def cmd = item[1]
|
||||
|
||||
def args = item[2]
|
||||
def diffPaths = args.diffPaths ?: []
|
||||
def cmdTimeout = args.timeout ?: 9999
|
||||
|
||||
if (branch != "master" && !branch.contains("__jenkins_loop_") && diffPaths && !hasPathChanged(gitDiff, diffPaths)) {
|
||||
println "Skipping ${name}: no changes in ${diffPaths}."
|
||||
return
|
||||
} else {
|
||||
timeout(time: cmdTimeout, unit: 'SECONDS') {
|
||||
device(device_ip, name, cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def hasPathChanged(String gitDiff, List<String> paths) {
|
||||
for (path in paths) {
|
||||
if (gitDiff.contains(path)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
def isReplay() {
|
||||
def replayClass = "org.jenkinsci.plugins.workflow.cps.replay.ReplayCause"
|
||||
return currentBuild.rawBuild.getCauses().any{ cause -> cause.toString().contains(replayClass) }
|
||||
}
|
||||
|
||||
def setupCredentials() {
|
||||
withCredentials([
|
||||
string(credentialsId: 'azure_token', variable: 'AZURE_TOKEN'),
|
||||
]) {
|
||||
env.AZURE_TOKEN = "${AZURE_TOKEN}"
|
||||
}
|
||||
|
||||
withCredentials([
|
||||
string(credentialsId: 'ci_artifacts_pat', variable: 'CI_ARTIFACTS_TOKEN'),
|
||||
]) {
|
||||
env.CI_ARTIFACTS_TOKEN = "${CI_ARTIFACTS_TOKEN}"
|
||||
}
|
||||
|
||||
withCredentials([
|
||||
string(credentialsId: 'post_comments_github_pat', variable: 'GITHUB_COMMENTS_TOKEN'),
|
||||
]) {
|
||||
env.GITHUB_COMMENTS_TOKEN = "${GITHUB_COMMENTS_TOKEN}"
|
||||
}
|
||||
}
|
||||
|
||||
def step(String name, String cmd, Map args = [:]) {
|
||||
return [name, cmd, args]
|
||||
}
|
||||
|
||||
node {
|
||||
env.CI = "1"
|
||||
env.PYTHONWARNINGS = "error"
|
||||
env.TEST_DIR = "/data/openpilot"
|
||||
env.SOURCE_DIR = "/data/openpilot_source/"
|
||||
setupCredentials()
|
||||
|
||||
env.GIT_BRANCH = checkout(scm).GIT_BRANCH
|
||||
env.GIT_COMMIT = checkout(scm).GIT_COMMIT
|
||||
|
||||
def excludeBranches = ['__nightly', 'devel', 'devel-staging', 'release3', 'release3-staging',
|
||||
'release-tici', 'release-tizi', 'release-tizi-staging', 'release-mici-staging', 'testing-closet*', 'hotfix-*']
|
||||
def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*')
|
||||
|
||||
if (env.BRANCH_NAME != 'master' && !env.BRANCH_NAME.contains('__jenkins_loop_')) {
|
||||
properties([
|
||||
disableConcurrentBuilds(abortPrevious: true)
|
||||
])
|
||||
}
|
||||
|
||||
try {
|
||||
if (env.BRANCH_NAME == 'devel-staging') {
|
||||
deviceStage("build release-tizi-staging", "tizi-needs-can", [], [
|
||||
step("build release-tizi-staging", "RELEASE_BRANCH=release-tizi-staging $SOURCE_DIR/release/build_release.sh && git push -f origin release-tizi-staging:release-mici-staging"),
|
||||
])
|
||||
}
|
||||
|
||||
if (env.BRANCH_NAME == '__nightly') {
|
||||
parallel (
|
||||
'nightly': {
|
||||
deviceStage("build nightly", "tizi-needs-can", [], [
|
||||
step("build nightly", "RELEASE_BRANCH=nightly $SOURCE_DIR/release/build_release.sh"),
|
||||
])
|
||||
},
|
||||
'nightly-dev': {
|
||||
deviceStage("build nightly-dev", "tizi-needs-can", [], [
|
||||
step("build nightly-dev", "PANDA_DEBUG_BUILD=1 RELEASE_BRANCH=nightly-dev $SOURCE_DIR/release/build_release.sh"),
|
||||
])
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
if (!env.BRANCH_NAME.matches(excludeRegex)) {
|
||||
parallel (
|
||||
'onroad tests': {
|
||||
deviceStage("onroad", "tizi-needs-can", ["UNSAFE=1"], [
|
||||
step("build openpilot", "cd system/manager && ./build.py"),
|
||||
step("check dirty", "release/check-dirty.sh"),
|
||||
step("onroad tests", "pytest selfdrive/test/test_onroad.py -s", [timeout: 60]),
|
||||
])
|
||||
},
|
||||
'HW + Unit Tests': {
|
||||
deviceStage("tizi-hardware", "tizi-common", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test power draw", "pytest -s system/hardware/tici/tests/test_power_draw.py"),
|
||||
step("test encoder", "LD_LIBRARY_PATH=/usr/local/lib pytest system/loggerd/tests/test_encoder.py", [diffPaths: ["system/loggerd/"]]),
|
||||
step("test manager", "pytest system/manager/test/test_manager.py"),
|
||||
])
|
||||
},
|
||||
'camerad OX03C10': {
|
||||
deviceStage("OX03C10", "tizi-ox03c10", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py"),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
|
||||
])
|
||||
},
|
||||
'camerad OS04C10': {
|
||||
deviceStage("OS04C10", "tici-os04c10", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py"),
|
||||
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
|
||||
])
|
||||
},
|
||||
'sensord': {
|
||||
deviceStage("LSM + MMC", "tizi-lsmc", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py"),
|
||||
step("test sensord", "pytest system/sensord/tests/test_sensord.py"),
|
||||
])
|
||||
},
|
||||
'replay': {
|
||||
deviceStage("model-replay", "tizi-replay", ["UNSAFE=1"], [
|
||||
step("build", "cd system/manager && ./build.py", [diffPaths: ["selfdrive/modeld/", "tinygrad_repo", "selfdrive/test/process_replay/model_replay.py"]]),
|
||||
step("model replay", "selfdrive/test/process_replay/model_replay.py", [diffPaths: ["selfdrive/modeld/", "tinygrad_repo", "selfdrive/test/process_replay/model_replay.py"]]),
|
||||
])
|
||||
},
|
||||
'tizi': {
|
||||
deviceStage("tizi", "tizi", ["UNSAFE=1"], [
|
||||
step("build openpilot", "cd system/manager && ./build.py"),
|
||||
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
|
||||
step("test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"),
|
||||
step("test amp", "pytest system/hardware/tici/tests/test_amplifier.py"),
|
||||
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
|
||||
])
|
||||
},
|
||||
|
||||
)
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILED'
|
||||
throw e
|
||||
}
|
||||
}
|
||||
@@ -1,269 +0,0 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
import platform
|
||||
import shlex
|
||||
import importlib
|
||||
import numpy as np
|
||||
|
||||
import SCons.Errors
|
||||
from SCons.Defaults import _stripixes
|
||||
|
||||
SCons.Warnings.warningAsException(True)
|
||||
|
||||
Decider('MD5-timestamp')
|
||||
|
||||
SetOption('num_jobs', max(1, int(os.cpu_count()/2)))
|
||||
|
||||
AddOption('--ccflags', action='store', type='string', default='', help='pass arbitrary flags over the command line')
|
||||
AddOption('--verbose', action='store_true', default=False, help='show full build commands')
|
||||
AddOption('--minimal',
|
||||
action='store_false',
|
||||
dest='extras',
|
||||
default=os.path.exists(File('#.gitattributes').abspath), # minimal by default on release branch (where there's no LFS)
|
||||
help='the minimum build to run openpilot. no tests, tools, etc.')
|
||||
|
||||
# Detect platform
|
||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
elif arch == "aarch64" and os.path.isfile('/TICI'):
|
||||
arch = "larch64"
|
||||
assert arch in [
|
||||
"larch64", # linux tici arm64
|
||||
"aarch64", # linux pc arm64
|
||||
"x86_64", # linux pc x64
|
||||
"Darwin", # macOS arm64 (x86 not supported)
|
||||
]
|
||||
|
||||
pkg_names = ['bzip2', 'capnproto', 'eigen', 'ffmpeg', 'libjpeg', 'libyuv', 'ncurses', 'zeromq', 'zstd']
|
||||
pkgs = [importlib.import_module(name) for name in pkg_names]
|
||||
|
||||
|
||||
# ***** enforce a whitelist of system libraries *****
|
||||
# this prevents silently relying on a 3rd party package,
|
||||
# e.g. apt-installed libusb. all libraries should either
|
||||
# be distributed with all Linux distros and macOS, or
|
||||
# vendored in commaai/dependencies.
|
||||
allowed_system_libs = {
|
||||
"EGL", "GLESv2", "GL",
|
||||
"Qt5Charts", "Qt5Core", "Qt5Gui", "Qt5Widgets",
|
||||
"dl", "drm", "gbm", "m", "pthread",
|
||||
}
|
||||
|
||||
def _resolve_lib(env, name):
|
||||
for d in env.Flatten(env.get('LIBPATH', [])):
|
||||
p = Dir(str(d)).abspath
|
||||
for ext in ('.a', '.so', '.dylib'):
|
||||
f = File(os.path.join(p, f'lib{name}{ext}'))
|
||||
if f.exists() or f.has_builder():
|
||||
return name
|
||||
if name in allowed_system_libs:
|
||||
return name
|
||||
raise SCons.Errors.UserError(f"Unexpected non-vendored library '{name}'")
|
||||
|
||||
def _libflags(target, source, env, for_signature):
|
||||
libs = []
|
||||
lp = env.subst('$LIBLITERALPREFIX')
|
||||
for lib in env.Flatten(env.get('LIBS', [])):
|
||||
if isinstance(lib, str):
|
||||
if os.sep in lib or lib.startswith('#'):
|
||||
libs.append(File(lib))
|
||||
elif lib.startswith('-') or (lp and lib.startswith(lp)):
|
||||
libs.append(lib)
|
||||
else:
|
||||
libs.append(_resolve_lib(env, lib))
|
||||
else:
|
||||
libs.append(lib)
|
||||
return _stripixes(env['LIBLINKPREFIX'], libs, env['LIBLINKSUFFIX'],
|
||||
env['LIBPREFIXES'], env['LIBSUFFIXES'], env, env['LIBLITERALPREFIX'])
|
||||
|
||||
env = Environment(
|
||||
ENV={
|
||||
"PATH": os.environ['PATH'],
|
||||
"PYTHONPATH": Dir("#").abspath + ':' + Dir(f"#third_party/acados").abspath,
|
||||
"ACADOS_SOURCE_DIR": Dir("#third_party/acados").abspath,
|
||||
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#third_party/acados/acados_template").abspath,
|
||||
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
|
||||
},
|
||||
CCFLAGS=[
|
||||
"-g",
|
||||
"-fPIC",
|
||||
"-O2",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
"-Wshadow" if arch in ("Darwin", "larch64") else "-Wshadow=local",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Wno-c99-designator",
|
||||
"-Wno-reorder-init-list",
|
||||
"-Wno-vla-cxx-extension",
|
||||
],
|
||||
CFLAGS=["-std=gnu11"],
|
||||
CXXFLAGS=["-std=c++1z"],
|
||||
CPPPATH=[
|
||||
"#",
|
||||
"#msgq",
|
||||
"#third_party",
|
||||
"#third_party/json11",
|
||||
"#third_party/linux/include",
|
||||
"#third_party/acados/include",
|
||||
"#third_party/acados/include/blasfeo/include",
|
||||
"#third_party/acados/include/hpipm/include",
|
||||
"#third_party/catch2/include",
|
||||
[x.INCLUDE_DIR for x in pkgs],
|
||||
],
|
||||
LIBPATH=[
|
||||
"#common",
|
||||
"#msgq_repo",
|
||||
"#third_party",
|
||||
"#selfdrive/pandad",
|
||||
"#rednose/helpers",
|
||||
f"#third_party/acados/{arch}/lib",
|
||||
[x.LIB_DIR for x in pkgs],
|
||||
],
|
||||
RPATH=[],
|
||||
CYTHONCFILESUFFIX=".cpp",
|
||||
COMPILATIONDB_USE_ABSPATH=True,
|
||||
REDNOSE_ROOT="#",
|
||||
tools=["default", "cython", "compilation_db", "rednose_filter"],
|
||||
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
|
||||
)
|
||||
if arch != "larch64":
|
||||
env['_LIBFLAGS'] = _libflags
|
||||
|
||||
# Arch-specific flags and paths
|
||||
if arch == "larch64":
|
||||
env["CC"] = "clang"
|
||||
env["CXX"] = "clang++"
|
||||
env.Append(LIBPATH=[
|
||||
"/usr/lib/aarch64-linux-gnu",
|
||||
])
|
||||
arch_flags = ["-D__TICI__", "-mcpu=cortex-a57", "-DQCOM2"]
|
||||
env.Append(CCFLAGS=arch_flags)
|
||||
env.Append(CXXFLAGS=arch_flags)
|
||||
elif arch == "Darwin":
|
||||
env.Append(LIBPATH=[
|
||||
"/System/Library/Frameworks/OpenGL.framework/Libraries",
|
||||
])
|
||||
env.Append(CCFLAGS=["-DGL_SILENCE_DEPRECATION"])
|
||||
env.Append(CXXFLAGS=["-DGL_SILENCE_DEPRECATION"])
|
||||
|
||||
_extra_cc = shlex.split(GetOption('ccflags') or '')
|
||||
if _extra_cc:
|
||||
env.Append(CCFLAGS=_extra_cc)
|
||||
|
||||
# no --as-needed on mac linker
|
||||
if arch != "Darwin":
|
||||
env.Append(LINKFLAGS=["-Wl,--as-needed", "-Wl,--no-undefined"])
|
||||
|
||||
# Shorter build output: show brief descriptions instead of full commands.
|
||||
# Full command lines are still printed on failure by scons.
|
||||
if not GetOption('verbose'):
|
||||
for action, short in (
|
||||
("CC", "CC"),
|
||||
("CXX", "CXX"),
|
||||
("LINK", "LINK"),
|
||||
("SHCC", "CC"),
|
||||
("SHCXX", "CXX"),
|
||||
("SHLINK", "LINK"),
|
||||
("AR", "AR"),
|
||||
("RANLIB", "RANLIB"),
|
||||
("AS", "AS"),
|
||||
):
|
||||
env[f"{action}COMSTR"] = f" [{short}] $TARGET"
|
||||
|
||||
# progress output
|
||||
node_interval = 5
|
||||
node_count = 0
|
||||
def progress_function(node):
|
||||
global node_count
|
||||
node_count += node_interval
|
||||
sys.stderr.write("progress: %d\n" % node_count)
|
||||
if os.environ.get('SCONS_PROGRESS'):
|
||||
Progress(progress_function, interval=node_interval)
|
||||
|
||||
# ********** Cython build environment **********
|
||||
envCython = env.Clone()
|
||||
envCython["CPPPATH"] += [sysconfig.get_paths()['include'], np.get_include()]
|
||||
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
|
||||
envCython["CCFLAGS"].remove("-Werror")
|
||||
|
||||
envCython["LIBS"] = []
|
||||
if arch == "Darwin":
|
||||
envCython["LINKFLAGS"] = env["LINKFLAGS"] + ["-bundle", "-undefined", "dynamic_lookup"]
|
||||
else:
|
||||
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
||||
|
||||
np_version = SCons.Script.Value(np.__version__)
|
||||
Export('envCython', 'np_version')
|
||||
|
||||
Export('env', 'arch')
|
||||
|
||||
# Setup cache dir
|
||||
default_cache_dir = '/data/scons_cache' if arch == "larch64" else '/tmp/scons_cache'
|
||||
cache_dir = ARGUMENTS.get('cache_dir', default_cache_dir)
|
||||
CacheDir(cache_dir)
|
||||
Clean(["."], cache_dir)
|
||||
|
||||
# ********** start building stuff **********
|
||||
|
||||
# Build common module
|
||||
SConscript(['common/SConscript'])
|
||||
Import('_common')
|
||||
common = [_common, 'json11', 'zmq']
|
||||
Export('common')
|
||||
|
||||
# Build messaging (cereal + msgq + socketmaster + their dependencies)
|
||||
# Enable swaglog include in submodules
|
||||
env_swaglog = env.Clone()
|
||||
env_swaglog['CXXFLAGS'].append('-DSWAGLOG="\\"common/swaglog.h\\""')
|
||||
SConscript(['msgq_repo/SConscript'], exports={'env': env_swaglog})
|
||||
|
||||
SConscript(['cereal/SConscript'])
|
||||
|
||||
Import('socketmaster', 'msgq')
|
||||
messaging = [socketmaster, msgq, 'capnp', 'kj',]
|
||||
Export('messaging')
|
||||
|
||||
|
||||
# Build other submodules
|
||||
SConscript(['panda/SConscript'])
|
||||
|
||||
# Build rednose library
|
||||
SConscript(['rednose/SConscript'])
|
||||
|
||||
# Build system services
|
||||
SConscript([
|
||||
'system/loggerd/SConscript',
|
||||
])
|
||||
|
||||
if arch == "larch64":
|
||||
SConscript(['system/camerad/SConscript'])
|
||||
|
||||
# Build openpilot
|
||||
SConscript(['third_party/SConscript'])
|
||||
|
||||
# Build selfdrive
|
||||
SConscript([
|
||||
'selfdrive/pandad/SConscript',
|
||||
'selfdrive/controls/lib/lateral_mpc_lib/SConscript',
|
||||
'selfdrive/controls/lib/longitudinal_mpc_lib/SConscript',
|
||||
'selfdrive/locationd/SConscript',
|
||||
'selfdrive/modeld/SConscript',
|
||||
'selfdrive/ui/SConscript',
|
||||
])
|
||||
|
||||
SConscript(['sunnypilot/SConscript'])
|
||||
|
||||
# Build tools
|
||||
if arch != "larch64":
|
||||
SConscript([
|
||||
'tools/replay/SConscript',
|
||||
'tools/cabana/SConscript',
|
||||
'tools/jotpluggler/SConscript',
|
||||
])
|
||||
|
||||
|
||||
env.CompilationDatabase('compile_commands.json')
|
||||
@@ -1,20 +0,0 @@
|
||||
Import('env', 'common', 'msgq')
|
||||
|
||||
cereal_dir = Dir('.')
|
||||
gen_dir = Dir('gen')
|
||||
|
||||
# Build cereal
|
||||
schema_files = ['log.capnp', 'car.capnp', 'deprecated.capnp', 'custom.capnp']
|
||||
env.Command([f'gen/cpp/{s}.c++' for s in schema_files] + [f'gen/cpp/{s}.h' for s in schema_files],
|
||||
schema_files,
|
||||
f"capnpc --src-prefix={cereal_dir.path} $SOURCES -o c++:{gen_dir.path}/cpp/")
|
||||
|
||||
cereal = env.Library('cereal', [f'gen/cpp/{s}.c++' for s in schema_files])
|
||||
|
||||
# Build messaging
|
||||
services_h = env.Command(['services.h'], ['services.py'], 'python3 ' + cereal_dir.path + '/services.py > $TARGET')
|
||||
env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc', 'messaging/bridge_zmq.cc'], LIBS=[msgq, common, 'pthread'])
|
||||
|
||||
socketmaster = env.Library('socketmaster', ['messaging/socketmaster.cc'])
|
||||
|
||||
Export('cereal', 'socketmaster')
|
||||
@@ -2054,16 +2054,14 @@ struct DriverStateV2 {
|
||||
facePosition @2 :List(Float32);
|
||||
facePositionStd @3 :List(Float32);
|
||||
faceProb @4 :Float32;
|
||||
eyesVisibleProb @14 :Float32;
|
||||
eyesClosedProb @15 :Float32;
|
||||
leftEyeProb @5 :Float32;
|
||||
rightEyeProb @6 :Float32;
|
||||
leftBlinkProb @7 :Float32;
|
||||
rightBlinkProb @8 :Float32;
|
||||
sunglassesProb @9 :Float32;
|
||||
phoneProb @13 :Float32;
|
||||
|
||||
deprecated :group {
|
||||
leftEyeProb @5 :Float32;
|
||||
rightEyeProb @6 :Float32;
|
||||
leftBlinkProb @7 :Float32;
|
||||
rightBlinkProb @8 :Float32;
|
||||
sunglassesProb @9 :Float32;
|
||||
notReadyProb @12 :List(Float32);
|
||||
occludedProb @10 :Float32;
|
||||
readyProb @11 :List(Float32);
|
||||
|
||||
@@ -13,6 +13,7 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
@@ -104,8 +105,15 @@ def collect_schema(root: Any) -> dict[str, dict]:
|
||||
return structs
|
||||
|
||||
|
||||
def dump_schema(path: str) -> None:
|
||||
from cereal import log
|
||||
def load_log(cereal_dir: str) -> Any:
|
||||
import capnp
|
||||
cereal_dir = os.path.abspath(cereal_dir)
|
||||
capnp.remove_import_hook()
|
||||
return capnp.load(os.path.join(cereal_dir, "log.capnp"), imports=[cereal_dir])
|
||||
|
||||
|
||||
def dump_schema(cereal_dir: str, path: str) -> None:
|
||||
log = load_log(cereal_dir)
|
||||
payload = {
|
||||
"root": hex_id(log.Event.schema.node.id),
|
||||
"structs": collect_schema(log.Event.schema),
|
||||
@@ -206,8 +214,8 @@ def load_peer(path: str) -> dict:
|
||||
return json.load(handle)
|
||||
|
||||
|
||||
def run_read(peer_path: str) -> int:
|
||||
from cereal import log
|
||||
def run_read(cereal_dir: str, peer_path: str) -> int:
|
||||
log = load_log(cereal_dir)
|
||||
peer_dump = load_peer(peer_path)
|
||||
local_dump = {
|
||||
"root": hex_id(log.Event.schema.node.id),
|
||||
@@ -235,16 +243,13 @@ def main() -> int:
|
||||
mode.add_argument("-g", "--generate", action="store_true", help="dump local schema to JSON")
|
||||
mode.add_argument("-r", "--read", action="store_true", help="load peer JSON and diff against local")
|
||||
parser.add_argument("-f", "--file", default="schema.json", help="JSON file path (default: schema.json)")
|
||||
parser.add_argument("--cereal-dir", required=True, help="path to cereal directory containing log.capnp")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
if args.generate:
|
||||
dump_schema(args.file)
|
||||
return 0
|
||||
return run_read(args.file)
|
||||
except ImportError as exc:
|
||||
print(f"error: cannot import cereal ({exc}). did scons build cereal?")
|
||||
return 2
|
||||
if args.generate:
|
||||
dump_schema(args.cereal_dir, args.file)
|
||||
return 0
|
||||
return run_read(args.cereal_dir, args.file)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* THIS IS AN AUTOGENERATED FILE, PLEASE EDIT services.py */
|
||||
#ifndef __SERVICES_H
|
||||
#define __SERVICES_H
|
||||
#include <map>
|
||||
#include <string>
|
||||
struct service { std::string name; bool should_log; float frequency; int decimation; size_t queue_size; };
|
||||
static std::map<std::string, service> services = {
|
||||
{ "gyroscope", {"gyroscope", true, 104.000000, 104, 256000}},
|
||||
{ "accelerometer", {"accelerometer", true, 104.000000, 104, 256000}},
|
||||
{ "magnetometer", {"magnetometer", true, 25.000000, -1, 256000}},
|
||||
{ "lightSensor", {"lightSensor", true, 100.000000, 100, 256000}},
|
||||
{ "temperatureSensor", {"temperatureSensor", true, 2.000000, 200, 256000}},
|
||||
{ "gpsNMEA", {"gpsNMEA", true, 9.000000, -1, 256000}},
|
||||
{ "deviceState", {"deviceState", true, 2.000000, 1, 256000}},
|
||||
{ "touch", {"touch", true, 20.000000, 1, 256000}},
|
||||
{ "can", {"can", true, 100.000000, 2053, 10485760}},
|
||||
{ "controlsState", {"controlsState", true, 100.000000, 10, 2097152}},
|
||||
{ "selfdriveState", {"selfdriveState", true, 100.000000, 10, 256000}},
|
||||
{ "pandaStates", {"pandaStates", true, 10.000000, 1, 256000}},
|
||||
{ "peripheralState", {"peripheralState", true, 2.000000, 1, 256000}},
|
||||
{ "radarState", {"radarState", true, 20.000000, 5, 256000}},
|
||||
{ "roadEncodeIdx", {"roadEncodeIdx", false, 20.000000, 1, 256000}},
|
||||
{ "liveTracks", {"liveTracks", true, 20.000000, -1, 256000}},
|
||||
{ "sendcan", {"sendcan", true, 100.000000, 139, 2097152}},
|
||||
{ "logMessage", {"logMessage", true, 0.000000, -1, 10485760}},
|
||||
{ "errorLogMessage", {"errorLogMessage", true, 0.000000, 1, 10485760}},
|
||||
{ "liveCalibration", {"liveCalibration", true, 4.000000, 4, 256000}},
|
||||
{ "liveTorqueParameters", {"liveTorqueParameters", true, 4.000000, 1, 256000}},
|
||||
{ "liveDelay", {"liveDelay", true, 4.000000, 1, 256000}},
|
||||
{ "androidLog", {"androidLog", true, 0.000000, -1, 256000}},
|
||||
{ "carState", {"carState", true, 100.000000, 10, 256000}},
|
||||
{ "carControl", {"carControl", true, 100.000000, 10, 256000}},
|
||||
{ "carOutput", {"carOutput", true, 100.000000, 10, 256000}},
|
||||
{ "longitudinalPlan", {"longitudinalPlan", true, 20.000000, 10, 256000}},
|
||||
{ "lateralManeuverPlan", {"lateralManeuverPlan", true, 20.000000, -1, 256000}},
|
||||
{ "driverAssistance", {"driverAssistance", true, 20.000000, 20, 256000}},
|
||||
{ "procLog", {"procLog", true, 0.500000, 15, 10485760}},
|
||||
{ "gpsLocationExternal", {"gpsLocationExternal", true, 10.000000, 10, 256000}},
|
||||
{ "gpsLocation", {"gpsLocation", true, 1.000000, 1, 256000}},
|
||||
{ "ubloxGnss", {"ubloxGnss", true, 10.000000, -1, 256000}},
|
||||
{ "qcomGnss", {"qcomGnss", true, 2.000000, -1, 256000}},
|
||||
{ "gnssMeasurements", {"gnssMeasurements", true, 10.000000, 10, 256000}},
|
||||
{ "clocks", {"clocks", true, 0.100000, 1, 256000}},
|
||||
{ "ubloxRaw", {"ubloxRaw", true, 20.000000, -1, 256000}},
|
||||
{ "livePose", {"livePose", true, 20.000000, 4, 256000}},
|
||||
{ "liveParameters", {"liveParameters", true, 20.000000, 5, 256000}},
|
||||
{ "cameraOdometry", {"cameraOdometry", true, 20.000000, 10, 256000}},
|
||||
{ "thumbnail", {"thumbnail", true, 0.016667, 1, 256000}},
|
||||
{ "onroadEvents", {"onroadEvents", true, 1.000000, 1, 256000}},
|
||||
{ "carParams", {"carParams", true, 0.020000, 1, 256000}},
|
||||
{ "roadCameraState", {"roadCameraState", true, 20.000000, 20, 256000}},
|
||||
{ "driverCameraState", {"driverCameraState", true, 20.000000, 20, 256000}},
|
||||
{ "driverEncodeIdx", {"driverEncodeIdx", false, 20.000000, 1, 256000}},
|
||||
{ "driverStateV2", {"driverStateV2", true, 20.000000, 10, 256000}},
|
||||
{ "driverMonitoringState", {"driverMonitoringState", true, 20.000000, 10, 256000}},
|
||||
{ "wideRoadEncodeIdx", {"wideRoadEncodeIdx", false, 20.000000, 1, 256000}},
|
||||
{ "wideRoadCameraState", {"wideRoadCameraState", true, 20.000000, 20, 256000}},
|
||||
{ "drivingModelData", {"drivingModelData", true, 20.000000, 10, 256000}},
|
||||
{ "modelV2", {"modelV2", true, 20.000000, -1, 10485760}},
|
||||
{ "managerState", {"managerState", true, 2.000000, 1, 256000}},
|
||||
{ "uploaderState", {"uploaderState", true, 0.000000, 1, 256000}},
|
||||
{ "navInstruction", {"navInstruction", true, 1.000000, 10, 256000}},
|
||||
{ "navRoute", {"navRoute", true, 0.000000, -1, 256000}},
|
||||
{ "navThumbnail", {"navThumbnail", true, 0.000000, -1, 256000}},
|
||||
{ "qRoadEncodeIdx", {"qRoadEncodeIdx", false, 20.000000, -1, 256000}},
|
||||
{ "userBookmark", {"userBookmark", true, 0.000000, 1, 256000}},
|
||||
{ "soundPressure", {"soundPressure", true, 10.000000, 10, 256000}},
|
||||
{ "rawAudioData", {"rawAudioData", false, 20.000000, -1, 256000}},
|
||||
{ "bookmarkButton", {"bookmarkButton", true, 0.000000, 1, 256000}},
|
||||
{ "audioFeedback", {"audioFeedback", true, 0.000000, 1, 256000}},
|
||||
{ "roadEncodeData", {"roadEncodeData", false, 20.000000, -1, 10485760}},
|
||||
{ "driverEncodeData", {"driverEncodeData", false, 20.000000, -1, 10485760}},
|
||||
{ "wideRoadEncodeData", {"wideRoadEncodeData", false, 20.000000, -1, 10485760}},
|
||||
{ "qRoadEncodeData", {"qRoadEncodeData", false, 20.000000, -1, 10485760}},
|
||||
{ "modelManagerSP", {"modelManagerSP", false, 1.000000, 1, 10485760}},
|
||||
{ "backupManagerSP", {"backupManagerSP", false, 1.000000, 1, 10485760}},
|
||||
{ "selfdriveStateSP", {"selfdriveStateSP", true, 100.000000, 10, 256000}},
|
||||
{ "longitudinalPlanSP", {"longitudinalPlanSP", true, 20.000000, 10, 256000}},
|
||||
{ "onroadEventsSP", {"onroadEventsSP", true, 1.000000, 1, 256000}},
|
||||
{ "carParamsSP", {"carParamsSP", true, 0.020000, 1, 256000}},
|
||||
{ "carControlSP", {"carControlSP", true, 100.000000, 10, 256000}},
|
||||
{ "carStateSP", {"carStateSP", true, 100.000000, 10, 256000}},
|
||||
{ "liveMapDataSP", {"liveMapDataSP", true, 1.000000, 1, 256000}},
|
||||
{ "modelDataV2SP", {"modelDataV2SP", true, 20.000000, -1, 10485760}},
|
||||
{ "liveLocationKalman", {"liveLocationKalman", true, 20.000000, -1, 256000}},
|
||||
{ "uiDebug", {"uiDebug", true, 0.000000, 1, 256000}},
|
||||
{ "testJoystick", {"testJoystick", true, 0.000000, -1, 256000}},
|
||||
{ "alertDebug", {"alertDebug", true, 20.000000, 5, 256000}},
|
||||
{ "livestreamWideRoadEncodeIdx", {"livestreamWideRoadEncodeIdx", false, 20.000000, -1, 256000}},
|
||||
{ "livestreamRoadEncodeIdx", {"livestreamRoadEncodeIdx", false, 20.000000, -1, 256000}},
|
||||
{ "livestreamDriverEncodeIdx", {"livestreamDriverEncodeIdx", false, 20.000000, -1, 256000}},
|
||||
{ "livestreamWideRoadEncodeData", {"livestreamWideRoadEncodeData", false, 20.000000, -1, 2097152}},
|
||||
{ "livestreamRoadEncodeData", {"livestreamRoadEncodeData", false, 20.000000, -1, 2097152}},
|
||||
{ "livestreamDriverEncodeData", {"livestreamDriverEncodeData", false, 20.000000, -1, 2097152}},
|
||||
{ "customReservedRawData0", {"customReservedRawData0", true, 0.000000, -1, 256000}},
|
||||
{ "customReservedRawData1", {"customReservedRawData1", true, 0.000000, -1, 256000}},
|
||||
{ "customReservedRawData2", {"customReservedRawData2", true, 0.000000, -1, 256000}},
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
Import('env', 'envCython')
|
||||
|
||||
common_libs = [
|
||||
'params.cc',
|
||||
'swaglog.cc',
|
||||
'util.cc',
|
||||
'ratekeeper.cc',
|
||||
]
|
||||
|
||||
_common = env.Library('common', common_libs, LIBS="json11")
|
||||
Export('_common')
|
||||
|
||||
if GetOption('extras'):
|
||||
env.Program('tests/test_common',
|
||||
['tests/test_runner.cc', 'tests/test_params.cc', 'tests/test_util.cc', 'tests/test_swaglog.cc'],
|
||||
LIBS=[_common, 'json11', 'zmq', 'pthread'])
|
||||
|
||||
# Cython bindings
|
||||
params_python = envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])
|
||||
|
||||
common_python = [params_python]
|
||||
|
||||
Export('common_python')
|
||||
@@ -0,0 +1,596 @@
|
||||
[
|
||||
{
|
||||
"command": "clang++ -o common/params.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include common/params.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/common/params.cc",
|
||||
"output": "/data/openpilot/common/params.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o common/swaglog.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include common/swaglog.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/common/swaglog.cc",
|
||||
"output": "/data/openpilot/common/swaglog.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o common/util.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include common/util.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/common/util.cc",
|
||||
"output": "/data/openpilot/common/util.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o common/ratekeeper.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include common/ratekeeper.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/common/ratekeeper.cc",
|
||||
"output": "/data/openpilot/common/ratekeeper.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o common/params_pyx.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include common/params_pyx.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/common/params_pyx.cpp",
|
||||
"output": "/data/openpilot/common/params_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/ipc.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/ipc.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/ipc.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/ipc.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/event.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/event.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/event.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/event.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/impl_msgq.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/impl_msgq.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/impl_msgq.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/impl_msgq.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/impl_fake.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/impl_fake.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/impl_fake.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/impl_fake.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/msgq.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/msgq.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/msgq.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/msgq.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/ipc_pyx.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include msgq_repo/msgq/ipc_pyx.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/ipc_pyx.cpp",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/ipc_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/visionipc/visionipc.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/visionipc/visionipc.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/visionipc/visionipc_server.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/visionipc/visionipc_server.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_server.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_server.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/visionipc/visionipc_client.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/visionipc/visionipc_client.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_client.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_client.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/visionipc/visionbuf_ion.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -DSWAGLOG=\"\\\"common/swaglog.h\\\"\" -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include msgq_repo/msgq/visionipc/visionbuf_ion.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/visionipc/visionbuf_ion.cc",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/visionipc/visionbuf_ion.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o msgq_repo/msgq/visionipc/visionipc_pyx.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include msgq_repo/msgq/visionipc/visionipc_pyx.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_pyx.cpp",
|
||||
"output": "/data/openpilot/msgq_repo/msgq/visionipc/visionipc_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/gen/cpp/log.capnp.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/gen/cpp/log.capnp.c++",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/gen/cpp/log.capnp.c++",
|
||||
"output": "/data/openpilot/cereal/gen/cpp/log.capnp.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/gen/cpp/car.capnp.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/gen/cpp/car.capnp.c++",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/gen/cpp/car.capnp.c++",
|
||||
"output": "/data/openpilot/cereal/gen/cpp/car.capnp.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/gen/cpp/deprecated.capnp.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/gen/cpp/deprecated.capnp.c++",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/gen/cpp/deprecated.capnp.c++",
|
||||
"output": "/data/openpilot/cereal/gen/cpp/deprecated.capnp.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/gen/cpp/custom.capnp.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/gen/cpp/custom.capnp.c++",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/gen/cpp/custom.capnp.c++",
|
||||
"output": "/data/openpilot/cereal/gen/cpp/custom.capnp.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/messaging/bridge.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/messaging/bridge.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/messaging/bridge.cc",
|
||||
"output": "/data/openpilot/cereal/messaging/bridge.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/messaging/msgq_to_zmq.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/messaging/msgq_to_zmq.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/messaging/msgq_to_zmq.cc",
|
||||
"output": "/data/openpilot/cereal/messaging/msgq_to_zmq.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/messaging/bridge_zmq.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/messaging/bridge_zmq.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/messaging/bridge_zmq.cc",
|
||||
"output": "/data/openpilot/cereal/messaging/bridge_zmq.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o cereal/messaging/socketmaster.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include cereal/messaging/socketmaster.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/cereal/messaging/socketmaster.cc",
|
||||
"output": "/data/openpilot/cereal/messaging/socketmaster.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"output": "/data/openpilot/panda/board/stm32h7/board/obj/panda_h7startup_stm32h7x5xx.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/rsa.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/panda_h7rsa.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/sha.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/panda_h7sha.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/bootstub.c",
|
||||
"output": "/data/openpilot/panda/board/board/obj/panda_h7bootstub.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/main.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/main.c",
|
||||
"output": "/data/openpilot/panda/board/board/obj/panda_h7main.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_jungle_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"output": "/data/openpilot/panda/board/stm32h7/board/obj/panda_jungle_h7startup_stm32h7x5xx.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/rsa.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/panda_jungle_h7rsa.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/sha.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/panda_jungle_h7sha.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_jungle_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/bootstub.c",
|
||||
"output": "/data/openpilot/panda/board/board/obj/panda_jungle_h7bootstub.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/jungle/board/obj/panda_jungle_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/jungle/main.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/jungle/main.c",
|
||||
"output": "/data/openpilot/panda/board/jungle/board/obj/panda_jungle_h7main.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/body_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s",
|
||||
"output": "/data/openpilot/panda/board/stm32h7/board/obj/body_h7startup_stm32h7x5xx.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/rsa.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/body_h7rsa.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/crypto/sha.c",
|
||||
"output": "/data/openpilot/panda/board/crypto/board/obj/body_h7sha.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/board/obj/body_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/bootstub.c",
|
||||
"output": "/data/openpilot/panda/board/board/obj/body_h7bootstub.o"
|
||||
},
|
||||
{
|
||||
"command": "arm-none-eabi-gcc -o panda/board/body/board/obj/body_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xBE6AD9D2U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/body/main.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/panda/board/body/main.c",
|
||||
"output": "/data/openpilot/panda/board/body/board/obj/body_h7main.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o rednose/helpers/ekf_load.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include rednose/helpers/ekf_load.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/rednose/helpers/ekf_load.cc",
|
||||
"output": "/data/openpilot/rednose/helpers/ekf_load.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o rednose/helpers/ekf_sym.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include rednose/helpers/ekf_sym.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/rednose/helpers/ekf_sym.cc",
|
||||
"output": "/data/openpilot/rednose/helpers/ekf_sym.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o rednose/helpers/ekf_sym_pyx.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include rednose/helpers/ekf_sym_pyx.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/rednose/helpers/ekf_sym_pyx.cpp",
|
||||
"output": "/data/openpilot/rednose/helpers/ekf_sym_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/logger.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/logger.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/logger.cc",
|
||||
"output": "/data/openpilot/system/loggerd/logger.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/zstd_writer.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/zstd_writer.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/zstd_writer.cc",
|
||||
"output": "/data/openpilot/system/loggerd/zstd_writer.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/video_writer.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/video_writer.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/video_writer.cc",
|
||||
"output": "/data/openpilot/system/loggerd/video_writer.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/encoder/encoder.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/encoder/encoder.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/encoder/encoder.cc",
|
||||
"output": "/data/openpilot/system/loggerd/encoder/encoder.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/encoder/v4l_encoder.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/encoder/v4l_encoder.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/encoder/v4l_encoder.cc",
|
||||
"output": "/data/openpilot/system/loggerd/encoder/v4l_encoder.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/encoder/jpeg_encoder.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/encoder/jpeg_encoder.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/encoder/jpeg_encoder.cc",
|
||||
"output": "/data/openpilot/system/loggerd/encoder/jpeg_encoder.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/loggerd.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/loggerd.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/loggerd.cc",
|
||||
"output": "/data/openpilot/system/loggerd/loggerd.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/encoderd.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/encoderd.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/encoderd.cc",
|
||||
"output": "/data/openpilot/system/loggerd/encoderd.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/loggerd/bootlog.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/loggerd/bootlog.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/loggerd/bootlog.cc",
|
||||
"output": "/data/openpilot/system/loggerd/bootlog.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/cameras/camera_qcom2.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/cameras/camera_qcom2.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/cameras/camera_qcom2.cc",
|
||||
"output": "/data/openpilot/system/camerad/cameras/camera_qcom2.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/cameras/camera_common.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/cameras/camera_common.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/cameras/camera_common.cc",
|
||||
"output": "/data/openpilot/system/camerad/cameras/camera_common.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/cameras/spectra.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/cameras/spectra.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/cameras/spectra.cc",
|
||||
"output": "/data/openpilot/system/camerad/cameras/spectra.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/cameras/cdm.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/cameras/cdm.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/cameras/cdm.cc",
|
||||
"output": "/data/openpilot/system/camerad/cameras/cdm.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/sensors/ox03c10.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/sensors/ox03c10.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/sensors/ox03c10.cc",
|
||||
"output": "/data/openpilot/system/camerad/sensors/ox03c10.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/sensors/os04c10.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/sensors/os04c10.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/sensors/os04c10.cc",
|
||||
"output": "/data/openpilot/system/camerad/sensors/os04c10.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o system/camerad/main.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include system/camerad/main.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/system/camerad/main.cc",
|
||||
"output": "/data/openpilot/system/camerad/main.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o third_party/json11/json11.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unqualified-std-cast-call -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include third_party/json11/json11.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/third_party/json11/json11.cpp",
|
||||
"output": "/data/openpilot/third_party/json11/json11.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/pandad/panda.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/pandad/panda.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/pandad/panda.cc",
|
||||
"output": "/data/openpilot/selfdrive/pandad/panda.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/pandad/spi.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/pandad/spi.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/pandad/spi.cc",
|
||||
"output": "/data/openpilot/selfdrive/pandad/spi.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/pandad/main.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/pandad/main.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/pandad/main.cc",
|
||||
"output": "/data/openpilot/selfdrive/pandad/main.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/pandad/pandad.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/pandad/pandad.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/pandad/pandad.cc",
|
||||
"output": "/data/openpilot/selfdrive/pandad/pandad.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/pandad/panda_safety.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/pandad/panda_safety.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/pandad/panda_safety.cc",
|
||||
"output": "/data/openpilot/selfdrive/pandad/panda_safety.o"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_lat.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_lat.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_lat.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_lat.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_ode_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_ode_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_ode_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_ode_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_vde_forw.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_vde_forw.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_vde_forw.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_model/lat_expl_vde_forw.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_e_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/lat_cost/lat_cost_y_0_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_ocp_solver_pyx.o -c -std=gnu11 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_ocp_solver_pyx.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_ocp_solver_pyx.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_ocp_solver_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.os -c -std=gnu11 -DACADOS_WITH_QPOASES -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-unused -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.os"
|
||||
},
|
||||
{
|
||||
"command": "clang -o selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_ocp_solver_pyx.o -c -std=gnu11 -g -fPIC -O2 -Wunused -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -Wno-#warnings -Wno-cpp -Wno-shadow -Wno-deprecated-declarations -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include -I/usr/include/python3.12 -I/usr/local/venv/lib/python3.12/site-packages/numpy/_core/include selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_ocp_solver_pyx.c",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_ocp_solver_pyx.c",
|
||||
"output": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_ocp_solver_pyx.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/locationd/models/generated/pose.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/locationd/models/generated/pose.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/locationd/models/generated/pose.cpp",
|
||||
"output": "/data/openpilot/selfdrive/locationd/models/generated/pose.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o selfdrive/locationd/models/generated/car.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include selfdrive/locationd/models/generated/car.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/selfdrive/locationd/models/generated/car.cpp",
|
||||
"output": "/data/openpilot/selfdrive/locationd/models/generated/car.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o sunnypilot/common/transformations/orientation.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include sunnypilot/common/transformations/orientation.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/sunnypilot/common/transformations/orientation.cc",
|
||||
"output": "/data/openpilot/sunnypilot/common/transformations/orientation.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o sunnypilot/common/transformations/coordinates.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include sunnypilot/common/transformations/coordinates.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/sunnypilot/common/transformations/coordinates.cc",
|
||||
"output": "/data/openpilot/sunnypilot/common/transformations/coordinates.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o sunnypilot/selfdrive/locationd/models/generated/live.os -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -fPIC -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include sunnypilot/selfdrive/locationd/models/generated/live.cpp",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.cpp",
|
||||
"output": "/data/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.os"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o sunnypilot/selfdrive/locationd/locationd.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include sunnypilot/selfdrive/locationd/locationd.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/sunnypilot/selfdrive/locationd/locationd.cc",
|
||||
"output": "/data/openpilot/sunnypilot/selfdrive/locationd/locationd.o"
|
||||
},
|
||||
{
|
||||
"command": "clang++ -o sunnypilot/selfdrive/locationd/models/live_kf.o -c -std=c++1z -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-vla-cxx-extension -D__TICI__ -mcpu=cortex-a57 -DQCOM2 -I. -Imsgq -Ithird_party -Ithird_party/json11 -Ithird_party/linux/include -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -I/usr/local/venv/lib/python3.12/site-packages/bzip2/install/include -I/usr/local/venv/lib/python3.12/site-packages/capnproto/install/include -I/usr/local/venv/lib/python3.12/site-packages/eigen/install -I/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libjpeg/install/include -I/usr/local/venv/lib/python3.12/site-packages/libyuv/install/include -I/usr/local/venv/lib/python3.12/site-packages/ncurses/install/include -I/usr/local/venv/lib/python3.12/site-packages/zeromq/install/include -I/usr/local/venv/lib/python3.12/site-packages/zstd/install/include sunnypilot/selfdrive/locationd/models/live_kf.cc",
|
||||
"directory": "/data/openpilot",
|
||||
"file": "/data/openpilot/sunnypilot/selfdrive/locationd/models/live_kf.cc",
|
||||
"output": "/data/openpilot/sunnypilot/selfdrive/locationd/models/live_kf.o"
|
||||
}
|
||||
]
|
||||
@@ -1,3 +1,56 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3142658fa2782d266028dcab491e02ab329a2cadcf9efb1846a5f9631d64cac1
|
||||
size 1947
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="19.999983"
|
||||
height="19"
|
||||
viewBox="0 0 19.999983 19"
|
||||
version="1.1"
|
||||
id="svg1425"
|
||||
sodipodi:docname="icon-star-empty.svg"
|
||||
style="fill:none"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata1431">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1429" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1198"
|
||||
inkscape:window-height="631"
|
||||
id="namedview1427"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="-8.3559301"
|
||||
inkscape:cy="8.9999925"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="1267"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1425" />
|
||||
<path
|
||||
d="m 10.258402,14.841908 -0.2584,-0.1559 -0.2583999,0.1559 -5.16547,3.1177 1.3708,-5.876 0.06856,-0.2939 -0.2281,-0.1976 -4.56431,-3.9540698 6.00919,-0.50982 0.30043,-0.02549 0.11766,-0.27761 2.3496399,-5.54381 2.3496,5.54381 0.1177,0.27761 0.3004,0.02549 6.0092,0.50982 -4.5643,3.9540698 -0.2281,0.1976 0.0686,0.2939 1.3708,5.876 z"
|
||||
id="path1423"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke:#b7b7b7" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.9 KiB |
@@ -1,3 +1,56 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5fdcc85f3d8c9d0c2fb76b98ddd9f118c0e4a12c859a4281a04a0870d5de12c8
|
||||
size 1950
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="19.999983"
|
||||
height="19"
|
||||
viewBox="0 0 19.999983 19"
|
||||
version="1.1"
|
||||
id="svg817"
|
||||
sodipodi:docname="icon-star-full.svg"
|
||||
style="fill:none"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata823">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs821" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1198"
|
||||
inkscape:window-height="1898"
|
||||
id="namedview819"
|
||||
showgrid="false"
|
||||
inkscape:zoom="20.005229"
|
||||
inkscape:cx="8.4325646"
|
||||
inkscape:cy="3.9969093"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg817" />
|
||||
<path
|
||||
d="m 10.258402,14.841908 -0.2584,-0.1559 -0.2583999,0.1559 -5.16547,3.1177 1.3708,-5.876 0.06856,-0.2939 -0.2281,-0.1976 -4.56431,-3.9540698 6.00919,-0.50982 0.30043,-0.02549 0.11766,-0.27761 2.3496399,-5.54381 2.3496,5.54381 0.1177,0.27761 0.3004,0.02549 6.0092,0.50982 -4.5643,3.9540698 -0.2281,0.1976 0.0686,0.2939 1.3708,5.876 z"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f5c543;stroke:#f0a43b" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.9 KiB |
@@ -1,3 +1,66 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cdf5e7ae57626f4cda35973873a4696252babbbe473913fe0aafdd8ba39d7fc3
|
||||
size 2508
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="19.999983"
|
||||
height="19.000008"
|
||||
viewBox="0 0 19.999983 19.000008"
|
||||
version="1.1"
|
||||
id="svg831"
|
||||
sodipodi:docname="icon-star-half.svg"
|
||||
style="fill:none"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata837">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs835" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1198"
|
||||
inkscape:window-height="948"
|
||||
id="namedview833"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="-8.3559301"
|
||||
inkscape:cy="9"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="950"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg831" />
|
||||
<path
|
||||
d="M 10.000002,8.1671631e-6 V 15.270008 l -6.1799999,3.73 1.64,-7.03 L 2.0565151e-6,7.2400082 7.1900021,6.6300082 Z"
|
||||
id="path825"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f5c543" />
|
||||
<path
|
||||
d="m 10.258402,14.841908 -0.2584,-0.1559 -0.2583999,0.1559 -5.16547,3.1177 1.3708,-5.876 0.06856,-0.2939 -0.2281,-0.1976 -4.56431,-3.9540698 6.00919,-0.50982 0.30043,-0.02549 0.11766,-0.27761 2.3496399,-5.54381 2.3496,5.54381 0.1177,0.27761 0.3004,0.02549 6.0092,0.50982 -4.5643,3.9540698 -0.2281,0.1976 0.0686,0.2939 1.3708,5.876 z"
|
||||
id="path827"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke:#b7b7b7" />
|
||||
<path
|
||||
d="m 5.3322621,16.919208 3.66774,-2.2137 0.9999999,-0.6055 v 1.17 l -6.1799999,3.73 1.64,-7.03 L 2.0565151e-6,7.2400082 7.1900021,6.6300082 10.000002,8.1671631e-6 V 2.6000082 l -0.9999999,2.32203 -1.1246,2.65341 -5.42923,0.46066 4.12481,3.5732998 z"
|
||||
id="path829"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f0a43b" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
@@ -1,3 +1,12 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cb64f9da10b818c56763a7c48347f6043da20a2a77fb14f6d60d9457c575b6b
|
||||
size 1278
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg viewBox="500.972 178.81 20 14.375" width="20" height="14.375" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com">
|
||||
<defs>
|
||||
<clipPath id="clip0_1674_1768">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clip0_1674_1768)" transform="matrix(1, 0, 0, 1, 500.971771, 175.81041)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.582 5.2447C19.352 4.3611 18.6743 3.66531 17.8138 3.42916C16.2542 3 10 3 10 3C10 3 3.7458 3 2.18614 3.42916C1.32557 3.66531 0.647841 4.3611 0.417841 5.2447C0 6.84612 0 10.1875 0 10.1875C0 10.1875 0 13.5288 0.417841 15.1303C0.647841 16.0139 1.32557 16.7097 2.18614 16.946C3.7458 17.375 10 17.375 10 17.375C10 17.375 16.2542 17.375 17.8138 16.946C18.6743 16.7097 19.352 16.0139 19.582 15.1303C20 13.5288 20 10.1875 20 10.1875C20 10.1875 20 6.84612 19.582 5.2447ZM8.12509 13.6255V7.37549L13.1251 10.5006L8.12509 13.6255Z" fill="#FF0000"/>
|
||||
</g>
|
||||
<path d="M 425.503 122.113 L 428.63 127.117 L 422.376 127.117 L 425.503 122.113 Z" style="stroke: rgb(0, 0, 0); stroke-width: 0px; fill: rgb(255, 255, 255);" transform="matrix(0, 1, -1, 0, 636.212463, -239.192383)" bx:shape="triangle 422.376 122.113 6.254 5.004 0.5 0 1@278e08c4"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 118 KiB |
@@ -0,0 +1,24 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ./test.sh
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ['macos-latest', 'ubuntu-latest']
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: ./test.sh
|
||||
@@ -0,0 +1,19 @@
|
||||
/gen/
|
||||
*.tmp
|
||||
*.pyc
|
||||
__pycache__
|
||||
.*.swp
|
||||
.*.swo
|
||||
*.os
|
||||
*.so
|
||||
*.o
|
||||
*.a
|
||||
uv.lock
|
||||
catch2/
|
||||
|
||||
test_runner
|
||||
|
||||
libmessaging.*
|
||||
libmessaging_shared.*
|
||||
.sconsign.dblite
|
||||
.mypy_cache/
|
||||
@@ -0,0 +1,54 @@
|
||||
# MSGQ: A lock free single producer multi consumer message queue
|
||||
|
||||
## What is this library?
|
||||
MSGQ is a generic high performance IPC pub sub system with a single publisher and multiple subscribers. It uses a ring buffer in shared memory to efficiently read and write data. Each read requires a copy. Writing can be done without a copy, as long as the size of the data is known in advance. This library also provides a spoofed implementation that can be used for deterministic testing, and visionipc, an IPC system specifically for large contiguous buffers (like images/video).
|
||||
|
||||
## Storage
|
||||
The storage for the queue consists of an area of metadata, and the actual buffer. The metadata contains:
|
||||
|
||||
1. A counter to the number of readers that are active
|
||||
2. A pointer to the head of the queue for writing. From now on referred to as *write pointer*
|
||||
3. A cycle counter for the writer. This counter is incremented when the writer wraps around
|
||||
4. N pointers, pointing to the current read position for all the readers. From now on referred to as *read pointer*
|
||||
5. N counters, counting the number of cycles for all the readers
|
||||
6. N booleans, indicating validity for all the readers. From now on referred to as *validity flag*
|
||||
|
||||
The counter and the pointer are both 32 bit values, packed into 64 bit so they can be read and written atomically.
|
||||
|
||||
The data buffer is a ring buffer. All messages are prefixed by an 8 byte size field, followed by the data. A size of -1 indicates a wrap-around, and means the next message is stored at the beginning of the buffer.
|
||||
|
||||
|
||||
## Writing
|
||||
Writing involves the following steps:
|
||||
|
||||
1. Check if the area that is to be written overlaps with any of the read pointers, mark those readers as invalid by clearing the validity flag.
|
||||
2. Write the message
|
||||
3. Increase the write pointer by the size of the message
|
||||
|
||||
In case there is not enough space at the end of the buffer, a special empty message with a prefix of -1 is written. The cycle counter is incremented by one. In this case step 1 will check there are no read pointers pointing to the remainder of the buffer. Then another write cycle will start with the actual message.
|
||||
|
||||
There always needs to be 8 bytes of empty space at the end of the buffer. By doing this there is always space to write the -1.
|
||||
|
||||
## Reset reader
|
||||
When the reader is lagging too much behind the read pointer becomes invalid and no longer points to the beginning of a valid message. To reset a reader to the current write pointer, the following steps are performed:
|
||||
|
||||
1. Set valid flag
|
||||
2. Set read cycle counter to that of the writer
|
||||
3. Set read pointer to write pointer
|
||||
|
||||
## Reading
|
||||
Reading involves the following steps:
|
||||
|
||||
1. Read the size field at the current read pointer
|
||||
2. Read the validity flag
|
||||
3. Copy the data out of the buffer
|
||||
4. Increase the read pointer by the size of the message
|
||||
5. Check the validity flag again
|
||||
|
||||
Before starting the copy, the valid flag is checked. This is to prevent a race condition where the size prefix was invalid, and the read could read outside of the buffer. Make sure that step 1 and 2 are not reordered by your compiler or CPU.
|
||||
|
||||
If a writer overwrites the data while it's being copied out, the data will be invalid. Therefore the validity flag is also checked after reading it. The order of step 4 and 5 does not matter.
|
||||
|
||||
If at steps 2 or 5 the validity flag is not set, the reader is reset. Any data that was already read is discarded. After the reader is reset, the reading starts from the beginning.
|
||||
|
||||
If a message with size -1 is encountered, step 3 and 4 are replaced by increasing the cycle counter and setting the read pointer to the beginning of the buffer. After that another read is performed.
|
||||
@@ -0,0 +1,39 @@
|
||||
Import('env', 'envCython', 'arch', 'common')
|
||||
|
||||
|
||||
visionipc_dir = Dir('msgq/visionipc')
|
||||
|
||||
# Build msgq
|
||||
msgq_objects = env.SharedObject([
|
||||
'msgq/ipc.cc',
|
||||
'msgq/event.cc',
|
||||
'msgq/impl_msgq.cc',
|
||||
'msgq/impl_fake.cc',
|
||||
'msgq/msgq.cc',
|
||||
])
|
||||
msgq = env.Library('msgq', msgq_objects)
|
||||
msgq_python = envCython.Program('msgq/ipc_pyx.so', 'msgq/ipc_pyx.pyx', LIBS=envCython["LIBS"]+[msgq, common])
|
||||
|
||||
# Build Vision IPC
|
||||
vipc_files = ['visionipc.cc', 'visionipc_server.cc', 'visionipc_client.cc']
|
||||
if arch == "larch64":
|
||||
vipc_files += ['visionbuf_ion.cc']
|
||||
else:
|
||||
vipc_files += ['visionbuf.cc']
|
||||
vipc_sources = [f'{visionipc_dir.abspath}/{f}' for f in vipc_files]
|
||||
|
||||
vipc_objects = env.SharedObject(vipc_sources)
|
||||
visionipc = env.Library('visionipc', vipc_objects)
|
||||
|
||||
|
||||
vipc_libs = envCython["LIBS"] + [visionipc, msgq, common]
|
||||
envCython.Program(f'{visionipc_dir.abspath}/visionipc_pyx.so', f'{visionipc_dir.abspath}/visionipc_pyx.pyx',
|
||||
LIBS=vipc_libs)
|
||||
|
||||
if GetOption('extras'):
|
||||
env.Program('msgq/test_runner', ['msgq/test_runner.cc', 'msgq/msgq_tests.cc'], LIBS=[msgq, common])
|
||||
env.Program(f'{visionipc_dir.abspath}/test_runner',
|
||||
[f'{visionipc_dir.abspath}/test_runner.cc', f'{visionipc_dir.abspath}/visionipc_tests.cc'],
|
||||
LIBS=['pthread'] + vipc_libs)
|
||||
|
||||
Export('visionipc', 'msgq', 'msgq_python')
|
||||
@@ -0,0 +1,83 @@
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import sysconfig
|
||||
import numpy as np
|
||||
|
||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
|
||||
common = ''
|
||||
|
||||
cpppath = [
|
||||
f"#/",
|
||||
'#msgq/',
|
||||
'/usr/lib/include',
|
||||
sysconfig.get_paths()['include'],
|
||||
]
|
||||
|
||||
AddOption('--minimal',
|
||||
action='store_false',
|
||||
dest='extras',
|
||||
default=True,
|
||||
help='the minimum build. no tests, tools, etc.')
|
||||
|
||||
AddOption('--asan',
|
||||
action='store_true',
|
||||
help='turn on ASAN')
|
||||
|
||||
AddOption('--ubsan',
|
||||
action='store_true',
|
||||
help='turn on UBSan')
|
||||
|
||||
ccflags = []
|
||||
ldflags = []
|
||||
if GetOption('ubsan'):
|
||||
flags = [
|
||||
"-fsanitize=undefined",
|
||||
"-fno-sanitize-recover=undefined",
|
||||
]
|
||||
ccflags += flags
|
||||
ldflags += flags
|
||||
elif GetOption('asan'):
|
||||
ccflags += ["-fsanitize=address", "-fno-omit-frame-pointer"]
|
||||
ldflags += ["-fsanitize=address"]
|
||||
|
||||
env = Environment(
|
||||
ENV=os.environ,
|
||||
CCFLAGS=[
|
||||
"-g",
|
||||
"-fPIC",
|
||||
"-O2",
|
||||
"-Wunused",
|
||||
"-Werror",
|
||||
"-Wshadow" if arch == "Darwin" else "-Wshadow=local",
|
||||
"-Wno-vla-cxx-extension",
|
||||
"-Wno-unknown-warning-option",
|
||||
] + ccflags,
|
||||
LDFLAGS=ldflags,
|
||||
LINKFLAGS=ldflags,
|
||||
|
||||
CFLAGS="-std=gnu11",
|
||||
CXXFLAGS="-std=c++1z",
|
||||
CPPPATH=cpppath,
|
||||
CYTHONCFILESUFFIX=".cpp",
|
||||
tools=["default", "cython"]
|
||||
)
|
||||
|
||||
Export('env', 'arch', 'common')
|
||||
|
||||
envCython = env.Clone(LIBS=[])
|
||||
envCython["CPPPATH"] += [np.get_include()]
|
||||
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
|
||||
envCython["CCFLAGS"].remove('-Werror')
|
||||
if arch == "Darwin":
|
||||
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"]
|
||||
else:
|
||||
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
||||
|
||||
Export('envCython')
|
||||
|
||||
|
||||
SConscript(['SConscript'])
|
||||
@@ -0,0 +1,32 @@
|
||||
output:
|
||||
- meta # Print lefthook version
|
||||
- summary # Print summary block (successful and failed steps)
|
||||
- empty_summary # Print summary heading when there are no steps to run
|
||||
- success # Print successful steps
|
||||
- failure # Print failed steps printing
|
||||
- execution # Print any execution logs
|
||||
#- execution_out # Print execution output
|
||||
#- execution_info # Print `EXECUTE > ...` logging
|
||||
- skips # Print "skip" (i.e. no files matched)
|
||||
|
||||
test:
|
||||
parallel: true
|
||||
commands:
|
||||
# *** static analysis ***
|
||||
ruff:
|
||||
run: ruff check .
|
||||
ty:
|
||||
run: ty check .
|
||||
codespell:
|
||||
run: codespell {files} -L ned,stdio,master --builtin clear,rare,informal,usage,code,names,en-GB_to_en-US -S uv.lock,*_pyx.cpp,catch2*
|
||||
files: git ls-tree -r HEAD --name-only
|
||||
cppcheck:
|
||||
run: cppcheck --error-exitcode=1 --inline-suppr --language=c++ --force --quiet -j4 --check-level=exhaustive $(git ls-files '*.cc' | grep -v -E '(msgq_tests|test_runner)\.cc')
|
||||
cpplint:
|
||||
run: cpplint --exclude=msgq/catch2/ --exclude=msgq/ipc_pyx.cpp --exclude=msgq/visionipc/visionipc_pyx.cpp --recursive --quiet --counting=detailed --linelength=240 --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces msgq/
|
||||
|
||||
# *** tests ***
|
||||
test_runner:
|
||||
run: msgq/test_runner
|
||||
pytest:
|
||||
run: pytest
|
||||
@@ -0,0 +1 @@
|
||||
ipc_pyx.cpp
|
||||
@@ -0,0 +1,61 @@
|
||||
# must be built with scons
|
||||
from msgq.ipc_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
|
||||
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
|
||||
from msgq.ipc_pyx import MultiplePublishersError, IpcError
|
||||
|
||||
from typing import Optional, List, Union
|
||||
|
||||
assert MultiplePublishersError
|
||||
assert IpcError
|
||||
assert toggle_fake_events
|
||||
assert set_fake_prefix
|
||||
assert get_fake_prefix
|
||||
assert delete_fake_prefix
|
||||
assert wait_for_one_event
|
||||
|
||||
NO_TRAVERSAL_LIMIT = 2**64-1
|
||||
|
||||
context = Context()
|
||||
|
||||
|
||||
def fake_event_handle(endpoint: str, identifier: Optional[Union[str, bytes]] = None, override: bool = True, enable: bool = False) -> SocketEventHandle:
|
||||
ident = identifier if identifier is not None else get_fake_prefix()
|
||||
handle = SocketEventHandle(endpoint, ident, override)
|
||||
if override:
|
||||
handle.enabled = enable
|
||||
|
||||
return handle
|
||||
|
||||
def pub_sock(endpoint: str, segment_size: int = 0) -> PubSocket:
|
||||
sock = PubSocket()
|
||||
sock.connect(context, endpoint, segment_size)
|
||||
return sock
|
||||
|
||||
|
||||
def sub_sock(endpoint: str, poller: Optional[Poller] = None, addr: str = "127.0.0.1",
|
||||
conflate: bool = False, timeout: Optional[int] = None, segment_size: int = 0) -> SubSocket:
|
||||
sock = SubSocket()
|
||||
sock.connect(context, endpoint, addr.encode('utf8'), conflate, segment_size)
|
||||
|
||||
if timeout is not None:
|
||||
sock.setTimeout(timeout)
|
||||
|
||||
if poller is not None:
|
||||
poller.registerSocket(sock)
|
||||
return sock
|
||||
|
||||
def drain_sock_raw(sock: SubSocket, wait_for_one: bool = False) -> List[bytes]:
|
||||
"""Receive all message currently available on the queue"""
|
||||
ret: List[bytes] = []
|
||||
while 1:
|
||||
if wait_for_one and len(ret) == 0:
|
||||
dat = sock.receive()
|
||||
else:
|
||||
dat = sock.receive(non_blocking=True)
|
||||
|
||||
if dat is None:
|
||||
break
|
||||
|
||||
ret.append(dat)
|
||||
|
||||
return ret
|
||||
@@ -0,0 +1,6 @@
|
||||
import pytest
|
||||
import msgq
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def msgq_context():
|
||||
msgq.context = msgq.Context()
|
||||
@@ -0,0 +1,238 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "msgq/event.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
void event_state_shm_mmap(std::string endpoint, std::string identifier, char **shm_mem, std::string *shm_path) {
|
||||
const char* op_prefix = std::getenv("OPENPILOT_PREFIX");
|
||||
|
||||
std::string full_path = "/dev/shm/msgq_";
|
||||
if (op_prefix) {
|
||||
full_path += std::string(op_prefix) + "/";
|
||||
}
|
||||
full_path += CEREAL_EVENTS_PREFIX + "/";
|
||||
if (identifier.size() > 0) {
|
||||
full_path += identifier + "/";
|
||||
}
|
||||
std::filesystem::create_directories(full_path);
|
||||
full_path += endpoint;
|
||||
|
||||
int shm_fd = open(full_path.c_str(), O_RDWR | O_CREAT, 0664);
|
||||
if (shm_fd < 0) {
|
||||
throw std::runtime_error("Could not open shared memory file.");
|
||||
}
|
||||
|
||||
int rc = ftruncate(shm_fd, sizeof(EventState));
|
||||
if (rc < 0){
|
||||
close(shm_fd);
|
||||
throw std::runtime_error("Could not truncate shared memory file.");
|
||||
}
|
||||
|
||||
char * mem = (char*)mmap(NULL, sizeof(EventState), PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0);
|
||||
close(shm_fd);
|
||||
if (mem == nullptr) {
|
||||
throw std::runtime_error("Could not map shared memory file.");
|
||||
}
|
||||
|
||||
if (shm_mem != nullptr)
|
||||
*shm_mem = mem;
|
||||
if (shm_path != nullptr)
|
||||
*shm_path = full_path;
|
||||
}
|
||||
|
||||
SocketEventHandle::SocketEventHandle(std::string endpoint, std::string identifier, bool override) {
|
||||
char *mem;
|
||||
event_state_shm_mmap(endpoint, identifier, &mem, &this->shm_path);
|
||||
|
||||
this->state = (EventState*)mem;
|
||||
if (override) {
|
||||
this->state->fds[0] = eventfd(0, EFD_NONBLOCK);
|
||||
this->state->fds[1] = eventfd(0, EFD_NONBLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
SocketEventHandle::~SocketEventHandle() {
|
||||
close(this->state->fds[0]);
|
||||
close(this->state->fds[1]);
|
||||
munmap(this->state, sizeof(EventState));
|
||||
unlink(this->shm_path.c_str());
|
||||
}
|
||||
|
||||
bool SocketEventHandle::is_enabled() {
|
||||
return this->state->enabled;
|
||||
}
|
||||
|
||||
void SocketEventHandle::set_enabled(bool enabled) {
|
||||
this->state->enabled = enabled;
|
||||
}
|
||||
|
||||
Event SocketEventHandle::recv_called() {
|
||||
return Event(this->state->fds[0]);
|
||||
}
|
||||
|
||||
Event SocketEventHandle::recv_ready() {
|
||||
return Event(this->state->fds[1]);
|
||||
}
|
||||
|
||||
void SocketEventHandle::toggle_fake_events(bool enabled) {
|
||||
if (enabled)
|
||||
setenv("CEREAL_FAKE", "1", true);
|
||||
else
|
||||
unsetenv("CEREAL_FAKE");
|
||||
}
|
||||
|
||||
void SocketEventHandle::set_fake_prefix(std::string prefix) {
|
||||
if (prefix.size() == 0) {
|
||||
unsetenv("CEREAL_FAKE_PREFIX");
|
||||
} else {
|
||||
setenv("CEREAL_FAKE_PREFIX", prefix.c_str(), true);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SocketEventHandle::fake_prefix() {
|
||||
const char* prefix = std::getenv("CEREAL_FAKE_PREFIX");
|
||||
if (prefix == nullptr) {
|
||||
return "";
|
||||
} else {
|
||||
return std::string(prefix);
|
||||
}
|
||||
}
|
||||
|
||||
Event::Event(int fd): event_fd(fd) {}
|
||||
|
||||
void Event::set() const {
|
||||
throw_if_invalid();
|
||||
|
||||
uint64_t val = 1;
|
||||
size_t count = write(this->event_fd, &val, sizeof(uint64_t));
|
||||
assert(count == sizeof(uint64_t));
|
||||
}
|
||||
|
||||
int Event::clear() const {
|
||||
throw_if_invalid();
|
||||
|
||||
uint64_t val = 0;
|
||||
// read the eventfd to clear it
|
||||
ssize_t ret = read(this->event_fd, &val, sizeof(uint64_t));
|
||||
assert(ret == sizeof(uint64_t));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void Event::wait(int timeout_sec) const {
|
||||
throw_if_invalid();
|
||||
|
||||
int event_count;
|
||||
struct pollfd fds = { this->event_fd, POLLIN, 0 };
|
||||
struct timespec timeout = { timeout_sec, 0 };;
|
||||
|
||||
sigset_t signals;
|
||||
sigfillset(&signals);
|
||||
sigdelset(&signals, SIGALRM);
|
||||
sigdelset(&signals, SIGINT);
|
||||
sigdelset(&signals, SIGTERM);
|
||||
sigdelset(&signals, SIGQUIT);
|
||||
|
||||
event_count = ppoll(&fds, 1, timeout_sec < 0 ? nullptr : &timeout, &signals);
|
||||
|
||||
if (event_count == 0) {
|
||||
throw std::runtime_error("Event timed out pid: " + std::to_string(getpid()));
|
||||
} else if (event_count < 0) {
|
||||
throw std::runtime_error("Event poll failed, errno: " + std::to_string(errno) + " pid: " + std::to_string(getpid()));
|
||||
}
|
||||
}
|
||||
|
||||
bool Event::peek() const {
|
||||
throw_if_invalid();
|
||||
|
||||
int event_count;
|
||||
|
||||
struct pollfd fds = { this->event_fd, POLLIN, 0 };
|
||||
|
||||
// poll with timeout zero to return status immediately
|
||||
event_count = poll(&fds, 1, 0);
|
||||
|
||||
return event_count != 0;
|
||||
}
|
||||
|
||||
bool Event::is_valid() const {
|
||||
return event_fd != -1;
|
||||
}
|
||||
|
||||
int Event::fd() const {
|
||||
return event_fd;
|
||||
}
|
||||
|
||||
int Event::wait_for_one(const std::vector<Event>& events, int timeout_sec) {
|
||||
struct pollfd fds[events.size()];
|
||||
for (size_t i = 0; i < events.size(); i++) {
|
||||
fds[i] = { events[i].fd(), POLLIN, 0 };
|
||||
}
|
||||
|
||||
struct timespec timeout = { timeout_sec, 0 };
|
||||
|
||||
sigset_t signals;
|
||||
sigfillset(&signals);
|
||||
sigdelset(&signals, SIGALRM);
|
||||
sigdelset(&signals, SIGINT);
|
||||
sigdelset(&signals, SIGTERM);
|
||||
sigdelset(&signals, SIGQUIT);
|
||||
|
||||
int event_count = ppoll(fds, events.size(), timeout_sec < 0 ? nullptr : &timeout, &signals);
|
||||
|
||||
if (event_count == 0) {
|
||||
throw std::runtime_error("Event timed out pid: " + std::to_string(getpid()));
|
||||
} else if (event_count < 0) {
|
||||
throw std::runtime_error("Event poll failed, errno: " + std::to_string(errno) + " pid: " + std::to_string(getpid()));
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < events.size(); i++) {
|
||||
if (fds[i].revents & POLLIN) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
throw std::runtime_error("Event poll failed, no events ready");
|
||||
}
|
||||
#else
|
||||
// Stub implementation for Darwin, which does not support eventfd
|
||||
void event_state_shm_mmap(std::string endpoint, std::string identifier, char **shm_mem, std::string *shm_path) {}
|
||||
|
||||
SocketEventHandle::SocketEventHandle(std::string endpoint, std::string identifier, bool override) {
|
||||
std::cerr << "SocketEventHandle not supported on macOS" << std::endl;
|
||||
assert(false);
|
||||
}
|
||||
SocketEventHandle::~SocketEventHandle() {}
|
||||
bool SocketEventHandle::is_enabled() { return this->state->enabled; }
|
||||
void SocketEventHandle::set_enabled(bool enabled) {}
|
||||
Event SocketEventHandle::recv_called() { return Event(); }
|
||||
Event SocketEventHandle::recv_ready() { return Event(); }
|
||||
void SocketEventHandle::toggle_fake_events(bool enabled) {}
|
||||
void SocketEventHandle::set_fake_prefix(std::string prefix) {}
|
||||
std::string SocketEventHandle::fake_prefix() { return ""; }
|
||||
|
||||
Event::Event(int fd): event_fd(fd) {}
|
||||
void Event::set() const {}
|
||||
int Event::clear() const { return 0; }
|
||||
void Event::wait(int timeout_sec) const {}
|
||||
bool Event::peek() const { return false; }
|
||||
bool Event::is_valid() const { return false; }
|
||||
int Event::fd() const { return this->event_fd; }
|
||||
int Event::wait_for_one(const std::vector<Event>& events, int timeout_sec) { return -1; }
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#define CEREAL_EVENTS_PREFIX std::string("cereal_events")
|
||||
|
||||
void event_state_shm_mmap(std::string endpoint, std::string identifier, char **shm_mem, std::string *shm_path);
|
||||
|
||||
enum EventPurpose {
|
||||
RECV_CALLED,
|
||||
RECV_READY
|
||||
};
|
||||
|
||||
struct EventState {
|
||||
int fds[2];
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
class Event {
|
||||
private:
|
||||
int event_fd = -1;
|
||||
|
||||
inline void throw_if_invalid() const {
|
||||
if (!this->is_valid()) {
|
||||
throw std::runtime_error("Event does not have valid file descriptor.");
|
||||
}
|
||||
}
|
||||
public:
|
||||
Event(int fd = -1);
|
||||
|
||||
void set() const;
|
||||
int clear() const;
|
||||
void wait(int timeout_sec = -1) const;
|
||||
bool peek() const;
|
||||
bool is_valid() const;
|
||||
int fd() const;
|
||||
|
||||
static int wait_for_one(const std::vector<Event>& events, int timeout_sec = -1);
|
||||
};
|
||||
|
||||
class SocketEventHandle {
|
||||
private:
|
||||
std::string shm_path;
|
||||
EventState* state;
|
||||
public:
|
||||
SocketEventHandle(std::string endpoint, std::string identifier = "", bool override = true);
|
||||
~SocketEventHandle();
|
||||
|
||||
bool is_enabled();
|
||||
void set_enabled(bool enabled);
|
||||
Event recv_called();
|
||||
Event recv_ready();
|
||||
|
||||
static void toggle_fake_events(bool enabled);
|
||||
static void set_fake_prefix(std::string prefix);
|
||||
static std::string fake_prefix();
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <vector>
|
||||
#include "msgq/impl_fake.h"
|
||||
|
||||
void FakePoller::registerSocket(SubSocket *socket) {
|
||||
this->sockets.push_back(socket);
|
||||
}
|
||||
|
||||
std::vector<SubSocket*> FakePoller::poll(int timeout) {
|
||||
return this->sockets;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "msgq/ipc.h"
|
||||
#include "msgq/event.h"
|
||||
|
||||
template<typename TSubSocket>
|
||||
class FakeSubSocket: public TSubSocket {
|
||||
private:
|
||||
Event *recv_called = nullptr;
|
||||
Event *recv_ready = nullptr;
|
||||
EventState *state = nullptr;
|
||||
|
||||
public:
|
||||
FakeSubSocket(): TSubSocket() {}
|
||||
~FakeSubSocket() {
|
||||
delete recv_called;
|
||||
delete recv_ready;
|
||||
if (state != nullptr) {
|
||||
munmap(state, sizeof(EventState));
|
||||
}
|
||||
}
|
||||
|
||||
int connect(Context *context, std::string endpoint, std::string address, bool conflate=false, bool check_endpoint=true, size_t segment_size=0) override {
|
||||
const char* cereal_prefix = std::getenv("CEREAL_FAKE_PREFIX");
|
||||
|
||||
char* mem;
|
||||
std::string identifier = cereal_prefix != nullptr ? std::string(cereal_prefix) : "";
|
||||
event_state_shm_mmap(endpoint, identifier, &mem, nullptr);
|
||||
|
||||
this->state = (EventState*)mem;
|
||||
this->recv_called = new Event(state->fds[EventPurpose::RECV_CALLED]);
|
||||
this->recv_ready = new Event(state->fds[EventPurpose::RECV_READY]);
|
||||
|
||||
return TSubSocket::connect(context, endpoint, address, conflate, check_endpoint, segment_size);
|
||||
}
|
||||
|
||||
Message *receive(bool non_blocking=false) override {
|
||||
if (this->state->enabled) {
|
||||
this->recv_called->set();
|
||||
this->recv_ready->wait();
|
||||
this->recv_ready->clear();
|
||||
}
|
||||
|
||||
return TSubSocket::receive(non_blocking);
|
||||
}
|
||||
};
|
||||
|
||||
class FakePoller: public Poller {
|
||||
private:
|
||||
std::vector<SubSocket*> sockets;
|
||||
|
||||
public:
|
||||
void registerSocket(SubSocket *socket) override;
|
||||
std::vector<SubSocket*> poll(int timeout) override;
|
||||
~FakePoller() {}
|
||||
};
|
||||
@@ -0,0 +1,169 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cerrno>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "msgq/impl_msgq.h"
|
||||
|
||||
void Message::init(size_t sz) {
|
||||
size = sz;
|
||||
data = new char[size];
|
||||
}
|
||||
|
||||
void Message::init(char * d, size_t sz) {
|
||||
size = sz;
|
||||
data = new char[size];
|
||||
memcpy(data, d, size);
|
||||
}
|
||||
|
||||
void Message::takeOwnership(char * d, size_t sz) {
|
||||
size = sz;
|
||||
data = d;
|
||||
}
|
||||
|
||||
void Message::close() {
|
||||
if (size > 0){
|
||||
delete[] data;
|
||||
}
|
||||
size = 0;
|
||||
}
|
||||
|
||||
Message::~Message() {
|
||||
this->close();
|
||||
}
|
||||
|
||||
int MSGQSubSocket::connect(Context *context, std::string endpoint, std::string address, bool conflate, bool check_endpoint, size_t segment_size){
|
||||
assert(context);
|
||||
assert(address == "127.0.0.1");
|
||||
|
||||
q = new msgq_queue_t;
|
||||
size_t size = segment_size > 0 ? segment_size : DEFAULT_SEGMENT_SIZE;
|
||||
int r = msgq_new_queue(q, endpoint.c_str(), size);
|
||||
if (r != 0){
|
||||
return r;
|
||||
}
|
||||
|
||||
msgq_init_subscriber(q);
|
||||
|
||||
if (conflate){
|
||||
q->read_conflate = true;
|
||||
}
|
||||
|
||||
timeout = -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Message * MSGQSubSocket::receive(bool non_blocking){
|
||||
msgq_msg_t msg;
|
||||
|
||||
Message *r = NULL;
|
||||
|
||||
int rc = msgq_msg_recv(&msg, q);
|
||||
|
||||
// Hack to implement blocking read with a poller. Don't use this
|
||||
while (!non_blocking && rc == 0){
|
||||
msgq_pollitem_t items[1];
|
||||
items[0].q = q;
|
||||
|
||||
int t = (timeout != -1) ? timeout : 100;
|
||||
|
||||
int n = msgq_poll(items, 1, t);
|
||||
rc = msgq_msg_recv(&msg, q);
|
||||
|
||||
// The poll indicated a message was ready, but the receive failed. Try again
|
||||
if (n == 1 && rc == 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (timeout != -1){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (rc > 0){
|
||||
r = new Message;
|
||||
r->takeOwnership(msg.data, msg.size);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void MSGQSubSocket::setTimeout(int t){
|
||||
timeout = t;
|
||||
}
|
||||
|
||||
MSGQSubSocket::~MSGQSubSocket(){
|
||||
if (q != NULL){
|
||||
msgq_close_queue(q);
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
|
||||
int PubSocket::connect(Context *context, std::string endpoint, bool check_endpoint, size_t segment_size){
|
||||
assert(context);
|
||||
|
||||
q = new msgq_queue_t;
|
||||
size_t size = segment_size > 0 ? segment_size : DEFAULT_SEGMENT_SIZE;
|
||||
int r = msgq_new_queue(q, endpoint.c_str(), size);
|
||||
if (r != 0){
|
||||
return r;
|
||||
}
|
||||
|
||||
msgq_init_publisher(q);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PubSocket::sendMessage(Message *message){
|
||||
msgq_msg_t msg;
|
||||
msg.data = message->getData();
|
||||
msg.size = message->getSize();
|
||||
|
||||
return msgq_msg_send(&msg, q);
|
||||
}
|
||||
|
||||
int PubSocket::send(char *data, size_t size){
|
||||
msgq_msg_t msg;
|
||||
msg.data = data;
|
||||
msg.size = size;
|
||||
|
||||
return msgq_msg_send(&msg, q);
|
||||
}
|
||||
|
||||
bool PubSocket::all_readers_updated() {
|
||||
return msgq_all_readers_updated(q);
|
||||
}
|
||||
|
||||
PubSocket::~PubSocket(){
|
||||
if (q != NULL){
|
||||
msgq_close_queue(q);
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MSGQPoller::registerSocket(SubSocket * socket){
|
||||
assert(num_polls + 1 < MAX_POLLERS);
|
||||
polls[num_polls].q = static_cast<MSGQSubSocket*>(socket)->getQueue();
|
||||
|
||||
sockets.push_back(socket);
|
||||
num_polls++;
|
||||
}
|
||||
|
||||
std::vector<SubSocket*> MSGQPoller::poll(int timeout){
|
||||
std::vector<SubSocket*> r;
|
||||
|
||||
msgq_poll(polls, num_polls, timeout);
|
||||
for (size_t i = 0; i < num_polls; i++){
|
||||
if (polls[i].revents){
|
||||
r.push_back(sockets[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "msgq/ipc.h"
|
||||
#include "msgq/msgq.h"
|
||||
|
||||
#define MAX_POLLERS 128
|
||||
|
||||
class MSGQSubSocket : public SubSocket {
|
||||
private:
|
||||
msgq_queue_t * q = NULL;
|
||||
int timeout;
|
||||
public:
|
||||
int connect(Context *context, std::string endpoint, std::string address, bool conflate=false, bool check_endpoint=true, size_t segment_size=0);
|
||||
void setTimeout(int timeout);
|
||||
msgq_queue_t * getQueue() {return q;}
|
||||
Message *receive(bool non_blocking=false);
|
||||
~MSGQSubSocket();
|
||||
};
|
||||
|
||||
class MSGQPoller : public Poller {
|
||||
private:
|
||||
std::vector<SubSocket*> sockets;
|
||||
msgq_pollitem_t polls[MAX_POLLERS];
|
||||
size_t num_polls = 0;
|
||||
|
||||
public:
|
||||
void registerSocket(SubSocket *socket);
|
||||
std::vector<SubSocket*> poll(int timeout);
|
||||
~MSGQPoller(){}
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "msgq/ipc.h"
|
||||
#include "msgq/impl_msgq.h"
|
||||
#include "msgq/impl_fake.h"
|
||||
|
||||
bool messaging_use_fake(){
|
||||
char* fake_enabled = std::getenv("CEREAL_FAKE");
|
||||
return fake_enabled != NULL;
|
||||
}
|
||||
|
||||
Context * Context::create(){
|
||||
return new Context();
|
||||
}
|
||||
|
||||
SubSocket * SubSocket::create(){
|
||||
if (messaging_use_fake()) {
|
||||
return new FakeSubSocket<MSGQSubSocket>();
|
||||
}
|
||||
return new MSGQSubSocket();
|
||||
}
|
||||
|
||||
SubSocket * SubSocket::create(Context * context, std::string endpoint, std::string address, bool conflate, bool check_endpoint, size_t segment_size){
|
||||
SubSocket *s = SubSocket::create();
|
||||
int r = s->connect(context, endpoint, address, conflate, check_endpoint, segment_size);
|
||||
|
||||
if (r == 0) {
|
||||
return s;
|
||||
} else {
|
||||
std::cerr << "Error, failed to connect SubSocket to " << endpoint << ": " << strerror(errno) << std::endl;
|
||||
|
||||
delete s;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
PubSocket * PubSocket::create(){
|
||||
return new PubSocket();
|
||||
}
|
||||
|
||||
PubSocket * PubSocket::create(Context * context, std::string endpoint, bool check_endpoint, size_t segment_size){
|
||||
PubSocket *s = PubSocket::create();
|
||||
int r = s->connect(context, endpoint, check_endpoint, segment_size);
|
||||
|
||||
if (r == 0) {
|
||||
return s;
|
||||
} else {
|
||||
std::cerr << "Error, failed to bind PubSocket to " << endpoint << ": " << strerror(errno) << std::endl;
|
||||
|
||||
delete s;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Poller * Poller::create(){
|
||||
if (messaging_use_fake()) {
|
||||
return new FakePoller();
|
||||
}
|
||||
return new MSGQPoller();
|
||||
}
|
||||
|
||||
Poller * Poller::create(std::vector<SubSocket*> sockets){
|
||||
Poller * p = Poller::create();
|
||||
|
||||
for (auto s : sockets){
|
||||
p->registerSocket(s);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define CLOCK_BOOTTIME CLOCK_MONOTONIC
|
||||
#endif
|
||||
|
||||
#define MSG_MULTIPLE_PUBLISHERS 100
|
||||
|
||||
class Context {
|
||||
public:
|
||||
static Context * create();
|
||||
~Context(){}
|
||||
};
|
||||
|
||||
class Message {
|
||||
private:
|
||||
char * data = nullptr;
|
||||
size_t size = 0;
|
||||
public:
|
||||
void init(size_t size);
|
||||
void init(char * data, size_t size);
|
||||
void takeOwnership(char * data, size_t size);
|
||||
void close();
|
||||
size_t getSize(){return size;}
|
||||
char * getData(){return data;}
|
||||
~Message();
|
||||
};
|
||||
|
||||
|
||||
class SubSocket {
|
||||
public:
|
||||
virtual int connect(Context *context, std::string endpoint, std::string address, bool conflate=false, bool check_endpoint=true, size_t segment_size=0) = 0;
|
||||
virtual void setTimeout(int timeout) = 0;
|
||||
virtual Message *receive(bool non_blocking=false) = 0;
|
||||
static SubSocket * create();
|
||||
static SubSocket * create(Context * context, std::string endpoint, std::string address="127.0.0.1", bool conflate=false, bool check_endpoint=true, size_t segment_size=0);
|
||||
virtual ~SubSocket(){}
|
||||
};
|
||||
|
||||
class PubSocket {
|
||||
private:
|
||||
struct msgq_queue_t * q = nullptr;
|
||||
public:
|
||||
int connect(Context *context, std::string endpoint, bool check_endpoint=true, size_t segment_size=0);
|
||||
int sendMessage(Message *message);
|
||||
int send(char *data, size_t size);
|
||||
bool all_readers_updated();
|
||||
static PubSocket * create();
|
||||
static PubSocket * create(Context * context, std::string endpoint, bool check_endpoint=true, size_t segment_size=0);
|
||||
~PubSocket();
|
||||
};
|
||||
|
||||
class Poller {
|
||||
public:
|
||||
virtual void registerSocket(SubSocket *socket) = 0;
|
||||
virtual std::vector<SubSocket*> poll(int timeout) = 0;
|
||||
static Poller * create();
|
||||
static Poller * create(std::vector<SubSocket*> sockets);
|
||||
virtual ~Poller(){}
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
# distutils: language = c++
|
||||
#cython: language_level=3
|
||||
|
||||
from libcpp.string cimport string
|
||||
from libcpp.vector cimport vector
|
||||
from libcpp cimport bool
|
||||
|
||||
|
||||
cdef extern from "msgq/impl_fake.h":
|
||||
cdef cppclass Event:
|
||||
@staticmethod
|
||||
int wait_for_one(vector[Event], int) except +
|
||||
|
||||
Event()
|
||||
Event(int)
|
||||
void set()
|
||||
int clear()
|
||||
void wait(int) except +
|
||||
bool peek()
|
||||
int fd()
|
||||
|
||||
cdef cppclass SocketEventHandle:
|
||||
@staticmethod
|
||||
void toggle_fake_events(bool)
|
||||
@staticmethod
|
||||
void set_fake_prefix(string)
|
||||
@staticmethod
|
||||
string fake_prefix()
|
||||
|
||||
SocketEventHandle(string, string, bool)
|
||||
bool is_enabled()
|
||||
void set_enabled(bool)
|
||||
Event recv_called()
|
||||
Event recv_ready()
|
||||
|
||||
|
||||
cdef extern from "msgq/ipc.h":
|
||||
cdef cppclass Context:
|
||||
@staticmethod
|
||||
Context * create()
|
||||
|
||||
cdef cppclass Message:
|
||||
void init(size_t)
|
||||
void init(char *, size_t)
|
||||
void close()
|
||||
size_t getSize()
|
||||
char *getData()
|
||||
|
||||
cdef cppclass SubSocket:
|
||||
@staticmethod
|
||||
SubSocket * create() nogil
|
||||
int connect(Context *, string, string, bool, bool, size_t) nogil
|
||||
Message * receive(bool) nogil
|
||||
void setTimeout(int) nogil
|
||||
|
||||
cdef cppclass PubSocket:
|
||||
@staticmethod
|
||||
PubSocket * create()
|
||||
int connect(Context *, string, bool, size_t)
|
||||
int sendMessage(Message *)
|
||||
int send(char *, size_t)
|
||||
bool all_readers_updated()
|
||||
|
||||
cdef cppclass Poller:
|
||||
@staticmethod
|
||||
Poller * create()
|
||||
void registerSocket(SubSocket *)
|
||||
vector[SubSocket*] poll(int) nogil
|
||||
@@ -0,0 +1,251 @@
|
||||
# distutils: language = c++
|
||||
# cython: c_string_encoding=ascii, language_level=3
|
||||
|
||||
import sys
|
||||
from libcpp.string cimport string
|
||||
from libcpp.vector cimport vector
|
||||
from libcpp cimport bool
|
||||
from libc cimport errno
|
||||
from libc.string cimport strerror
|
||||
from cython.operator import dereference
|
||||
|
||||
|
||||
from .ipc cimport Context as cppContext
|
||||
from .ipc cimport SubSocket as cppSubSocket
|
||||
from .ipc cimport PubSocket as cppPubSocket
|
||||
from .ipc cimport Poller as cppPoller
|
||||
from .ipc cimport Message as cppMessage
|
||||
from .ipc cimport Event as cppEvent, SocketEventHandle as cppSocketEventHandle
|
||||
|
||||
|
||||
class IpcError(Exception):
|
||||
def __init__(self, endpoint=None):
|
||||
suffix = f"with {endpoint.decode('utf-8')}" if endpoint else ""
|
||||
message = f"Messaging failure {suffix}: {strerror(errno.errno).decode('utf-8')}"
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class MultiplePublishersError(IpcError):
|
||||
pass
|
||||
|
||||
|
||||
def toggle_fake_events(bool enabled):
|
||||
cppSocketEventHandle.toggle_fake_events(enabled)
|
||||
|
||||
|
||||
def set_fake_prefix(string prefix):
|
||||
cppSocketEventHandle.set_fake_prefix(prefix)
|
||||
|
||||
|
||||
def get_fake_prefix():
|
||||
return cppSocketEventHandle.fake_prefix()
|
||||
|
||||
|
||||
def delete_fake_prefix():
|
||||
cppSocketEventHandle.set_fake_prefix(b"")
|
||||
|
||||
|
||||
def wait_for_one_event(list events, int timeout=-1):
|
||||
cdef vector[cppEvent] items
|
||||
for event in events:
|
||||
items.push_back(dereference(<cppEvent*><size_t>event.ptr))
|
||||
return cppEvent.wait_for_one(items, timeout)
|
||||
|
||||
|
||||
cdef class Event:
|
||||
cdef cppEvent event;
|
||||
|
||||
def __cinit__(self):
|
||||
pass
|
||||
|
||||
cdef setEvent(self, cppEvent event):
|
||||
self.event = event
|
||||
|
||||
def set(self):
|
||||
self.event.set()
|
||||
|
||||
def clear(self):
|
||||
return self.event.clear()
|
||||
|
||||
def wait(self, int timeout=-1):
|
||||
self.event.wait(timeout)
|
||||
|
||||
def peek(self):
|
||||
return self.event.peek()
|
||||
|
||||
@property
|
||||
def fd(self):
|
||||
return self.event.fd()
|
||||
|
||||
@property
|
||||
def ptr(self):
|
||||
return <size_t><void*>&self.event
|
||||
|
||||
|
||||
cdef class SocketEventHandle:
|
||||
cdef cppSocketEventHandle * handle;
|
||||
|
||||
def __cinit__(self, string endpoint, string identifier, bool override):
|
||||
self.handle = new cppSocketEventHandle(endpoint, identifier, override)
|
||||
|
||||
def __dealloc__(self):
|
||||
del self.handle
|
||||
|
||||
@property
|
||||
def enabled(self):
|
||||
return self.handle.is_enabled()
|
||||
|
||||
@enabled.setter
|
||||
def enabled(self, bool value):
|
||||
self.handle.set_enabled(value)
|
||||
|
||||
@property
|
||||
def recv_called_event(self):
|
||||
e = Event()
|
||||
e.setEvent(self.handle.recv_called())
|
||||
|
||||
return e
|
||||
|
||||
@property
|
||||
def recv_ready_event(self):
|
||||
e = Event()
|
||||
e.setEvent(self.handle.recv_ready())
|
||||
|
||||
return e
|
||||
|
||||
|
||||
cdef class Context:
|
||||
cdef cppContext * context
|
||||
|
||||
def __cinit__(self):
|
||||
self.context = cppContext.create()
|
||||
|
||||
def term(self):
|
||||
del self.context
|
||||
self.context = NULL
|
||||
|
||||
def __dealloc__(self):
|
||||
pass
|
||||
# Deleting the context will hang if sockets are still active
|
||||
# TODO: Figure out a way to make sure the context is closed last
|
||||
# del self.context
|
||||
|
||||
|
||||
cdef class Poller:
|
||||
cdef cppPoller * poller
|
||||
cdef list sub_sockets
|
||||
|
||||
def __cinit__(self):
|
||||
self.sub_sockets = []
|
||||
self.poller = cppPoller.create()
|
||||
|
||||
def __dealloc__(self):
|
||||
del self.poller
|
||||
|
||||
def registerSocket(self, SubSocket socket):
|
||||
self.sub_sockets.append(socket)
|
||||
self.poller.registerSocket(socket.socket)
|
||||
|
||||
def poll(self, timeout):
|
||||
sockets = []
|
||||
cdef int t = timeout
|
||||
|
||||
with nogil:
|
||||
result = self.poller.poll(t)
|
||||
|
||||
for s in result:
|
||||
socket = SubSocket()
|
||||
socket.setPtr(s)
|
||||
sockets.append(socket)
|
||||
|
||||
return sockets
|
||||
|
||||
|
||||
cdef class SubSocket:
|
||||
cdef cppSubSocket * socket
|
||||
cdef bool is_owner
|
||||
|
||||
def __cinit__(self):
|
||||
with nogil:
|
||||
self.socket = cppSubSocket.create()
|
||||
|
||||
self.is_owner = True
|
||||
if self.socket == NULL:
|
||||
raise IpcError
|
||||
|
||||
def __dealloc__(self):
|
||||
if self.is_owner:
|
||||
with nogil:
|
||||
del self.socket
|
||||
|
||||
cdef setPtr(self, cppSubSocket * ptr):
|
||||
if self.is_owner:
|
||||
with nogil:
|
||||
del self.socket
|
||||
|
||||
self.is_owner = False
|
||||
self.socket = ptr
|
||||
|
||||
def connect(self, Context context, string endpoint, string address=b"127.0.0.1", bool conflate=False, size_t segment_size=0):
|
||||
cdef int r
|
||||
with nogil:
|
||||
r = self.socket.connect(context.context, endpoint, address, conflate, True, segment_size)
|
||||
|
||||
if r != 0:
|
||||
if errno.errno == errno.EADDRINUSE:
|
||||
raise MultiplePublishersError(endpoint)
|
||||
else:
|
||||
raise IpcError(endpoint)
|
||||
|
||||
def setTimeout(self, int timeout):
|
||||
with nogil:
|
||||
self.socket.setTimeout(timeout)
|
||||
|
||||
def receive(self, bool non_blocking=False):
|
||||
cdef cppMessage *msg
|
||||
with nogil:
|
||||
msg = self.socket.receive(non_blocking)
|
||||
|
||||
if msg == NULL:
|
||||
return None
|
||||
else:
|
||||
sz = msg.getSize()
|
||||
m = msg.getData()[:sz]
|
||||
with nogil:
|
||||
del msg
|
||||
|
||||
return m
|
||||
|
||||
|
||||
cdef class PubSocket:
|
||||
cdef cppPubSocket * socket
|
||||
|
||||
def __cinit__(self):
|
||||
self.socket = cppPubSocket.create()
|
||||
if self.socket == NULL:
|
||||
raise IpcError
|
||||
|
||||
def __dealloc__(self):
|
||||
del self.socket
|
||||
|
||||
def connect(self, Context context, string endpoint, size_t segment_size=0):
|
||||
r = self.socket.connect(context.context, endpoint, True, segment_size)
|
||||
|
||||
if r != 0:
|
||||
if errno.errno == errno.EADDRINUSE:
|
||||
raise MultiplePublishersError(endpoint)
|
||||
else:
|
||||
raise IpcError(endpoint)
|
||||
|
||||
def send(self, bytes data):
|
||||
length = len(data)
|
||||
r = self.socket.send(<char*>data, length)
|
||||
|
||||
if r != length:
|
||||
if errno.errno == errno.EADDRINUSE:
|
||||
raise MultiplePublishersError
|
||||
else:
|
||||
raise IpcError
|
||||
|
||||
def all_readers_updated(self):
|
||||
return self.socket.all_readers_updated()
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef SWAGLOG
|
||||
// cppcheck-suppress preprocessorErrorDirective
|
||||
#include SWAGLOG
|
||||
#else
|
||||
|
||||
#define CLOUDLOG_DEBUG 10
|
||||
#define CLOUDLOG_INFO 20
|
||||
#define CLOUDLOG_WARNING 30
|
||||
#define CLOUDLOG_ERROR 40
|
||||
#define CLOUDLOG_CRITICAL 50
|
||||
|
||||
#define cloudlog(lvl, fmt, ...) printf(fmt "\n", ## __VA_ARGS__)
|
||||
|
||||
#define LOGD(fmt, ...) cloudlog(CLOUDLOG_DEBUG, fmt, ## __VA_ARGS__)
|
||||
#define LOG(fmt, ...) cloudlog(CLOUDLOG_INFO, fmt, ## __VA_ARGS__)
|
||||
#define LOGW(fmt, ...) cloudlog(CLOUDLOG_WARNING, fmt, ## __VA_ARGS__)
|
||||
#define LOGE(fmt, ...) cloudlog(CLOUDLOG_ERROR, fmt, ## __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,506 @@
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <csignal>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
||||
#include <poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "msgq/msgq.h"
|
||||
|
||||
void sigusr2_handler(int signal) {
|
||||
assert(signal == SIGUSR2);
|
||||
}
|
||||
|
||||
uint64_t msgq_get_uid(void){
|
||||
std::random_device rd("/dev/urandom");
|
||||
std::uniform_int_distribution<uint64_t> distribution(0, std::numeric_limits<uint32_t>::max());
|
||||
|
||||
#ifdef __APPLE__
|
||||
// TODO: this doesn't work
|
||||
uint64_t uid = distribution(rd) << 32 | getpid();
|
||||
#else
|
||||
uint64_t uid = distribution(rd) << 32 | syscall(SYS_gettid);
|
||||
#endif
|
||||
|
||||
return uid;
|
||||
}
|
||||
|
||||
int msgq_msg_init_size(msgq_msg_t * msg, size_t size){
|
||||
msg->size = size;
|
||||
msg->data = new(std::nothrow) char[size];
|
||||
|
||||
return (msg->data == NULL) ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
int msgq_msg_init_data(msgq_msg_t * msg, char * data, size_t size) {
|
||||
int r = msgq_msg_init_size(msg, size);
|
||||
|
||||
if (r == 0)
|
||||
memcpy(msg->data, data, size);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int msgq_msg_close(msgq_msg_t * msg){
|
||||
if (msg->size > 0)
|
||||
delete[] msg->data;
|
||||
|
||||
msg->size = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void msgq_reset_reader(msgq_queue_t * q){
|
||||
int id = q->reader_id;
|
||||
q->read_valids[id]->store(true);
|
||||
q->read_pointers[id]->store(*q->write_pointer);
|
||||
}
|
||||
|
||||
void msgq_wait_for_subscriber(msgq_queue_t *q){
|
||||
while (*q->num_readers == 0){
|
||||
// wait for subscriber
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size){
|
||||
assert(size < 0xFFFFFFFF); // Buffer must be smaller than 2^32 bytes
|
||||
std::signal(SIGUSR2, sigusr2_handler);
|
||||
|
||||
#ifdef __APPLE__
|
||||
std::string base_path = "/tmp/msgq_";
|
||||
#else
|
||||
std::string base_path = "/dev/shm/msgq_";
|
||||
#endif
|
||||
const char* prefix = std::getenv("OPENPILOT_PREFIX");
|
||||
if (prefix) {
|
||||
base_path += std::string(prefix) + "/";
|
||||
}
|
||||
std::string full_path = base_path + path;
|
||||
|
||||
auto fd = open(full_path.c_str(), O_RDWR | O_CREAT, 0664);
|
||||
if (fd < 0) {
|
||||
std::cout << "Warning, could not open: " << full_path << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int rc = ftruncate(fd, size + sizeof(msgq_header_t));
|
||||
if (rc < 0){
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mmap_flags = MAP_SHARED;
|
||||
#ifdef MAP_POPULATE
|
||||
if (std::getenv("MSGQ_PREALLOC")) {
|
||||
mmap_flags |= MAP_POPULATE;
|
||||
}
|
||||
#endif
|
||||
|
||||
char * mem = (char*)mmap(NULL, size + sizeof(msgq_header_t), PROT_READ | PROT_WRITE, mmap_flags, fd, 0);
|
||||
close(fd);
|
||||
|
||||
if (mem == MAP_FAILED){
|
||||
return -1;
|
||||
}
|
||||
|
||||
q->mmap_p = mem;
|
||||
|
||||
msgq_header_t *header = (msgq_header_t *)mem;
|
||||
|
||||
// Setup pointers to header segment
|
||||
q->num_readers = reinterpret_cast<std::atomic<uint64_t>*>(&header->num_readers);
|
||||
q->write_pointer = reinterpret_cast<std::atomic<uint64_t>*>(&header->write_pointer);
|
||||
q->write_uid = reinterpret_cast<std::atomic<uint64_t>*>(&header->write_uid);
|
||||
|
||||
for (size_t i = 0; i < NUM_READERS; i++){
|
||||
q->read_pointers[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_pointers[i]);
|
||||
q->read_valids[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_valids[i]);
|
||||
q->read_uids[i] = reinterpret_cast<std::atomic<uint64_t>*>(&header->read_uids[i]);
|
||||
}
|
||||
|
||||
q->data = mem + sizeof(msgq_header_t);
|
||||
q->size = size;
|
||||
q->reader_id = -1;
|
||||
|
||||
q->endpoint = path;
|
||||
q->read_conflate = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void msgq_close_queue(msgq_queue_t *q){
|
||||
if (q->mmap_p != NULL){
|
||||
munmap(q->mmap_p, q->size + sizeof(msgq_header_t));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void msgq_init_publisher(msgq_queue_t * q) {
|
||||
//std::cout << "Starting publisher" << std::endl;
|
||||
uint64_t uid = msgq_get_uid();
|
||||
|
||||
*q->write_uid = uid;
|
||||
*q->num_readers = 0;
|
||||
|
||||
for (size_t i = 0; i < NUM_READERS; i++){
|
||||
*q->read_valids[i] = false;
|
||||
*q->read_uids[i] = 0;
|
||||
}
|
||||
|
||||
q->write_uid_local = uid;
|
||||
}
|
||||
|
||||
static void thread_signal(uint32_t tid) {
|
||||
#ifdef __APPLE__
|
||||
// macOS doesn't have tkill, rely on polling instead
|
||||
(void)tid;
|
||||
#elif !defined(SYS_tkill)
|
||||
// fallback for systems without tkill
|
||||
kill(tid, SIGUSR2);
|
||||
#else
|
||||
syscall(SYS_tkill, tid, SIGUSR2);
|
||||
#endif
|
||||
}
|
||||
|
||||
void msgq_init_subscriber(msgq_queue_t * q) {
|
||||
assert(q != NULL);
|
||||
assert(q->num_readers != NULL);
|
||||
|
||||
uint64_t uid = msgq_get_uid();
|
||||
|
||||
// Get reader id
|
||||
while (true){
|
||||
uint64_t cur_num_readers = *q->num_readers;
|
||||
uint64_t new_num_readers = cur_num_readers + 1;
|
||||
|
||||
// No more slots available. Reset all subscribers to kick out inactive ones
|
||||
if (new_num_readers > NUM_READERS){
|
||||
//std::cout << "Warning, evicting all subscribers!" << std::endl;
|
||||
*q->num_readers = 0;
|
||||
|
||||
for (size_t i = 0; i < NUM_READERS; i++){
|
||||
*q->read_valids[i] = false;
|
||||
|
||||
uint64_t old_uid = *q->read_uids[i];
|
||||
*q->read_uids[i] = 0;
|
||||
|
||||
// Wake up reader in case they are in a poll
|
||||
thread_signal(old_uid & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Use atomic compare and swap to handle race condition
|
||||
// where two subscribers start at the same time
|
||||
if (std::atomic_compare_exchange_strong(q->num_readers,
|
||||
&cur_num_readers,
|
||||
new_num_readers)){
|
||||
q->reader_id = cur_num_readers;
|
||||
q->read_uid_local = uid;
|
||||
|
||||
// We start with read_valid = false,
|
||||
// on the first read the read pointer will be synchronized with the write pointer
|
||||
*q->read_valids[cur_num_readers] = false;
|
||||
*q->read_pointers[cur_num_readers] = 0;
|
||||
*q->read_uids[cur_num_readers] = uid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//std::cout << "New subscriber id: " << q->reader_id << " uid: " << q->read_uid_local << " " << q->endpoint << std::endl;
|
||||
msgq_reset_reader(q);
|
||||
}
|
||||
|
||||
int msgq_msg_send(msgq_msg_t * msg, msgq_queue_t *q){
|
||||
// Die if we are no longer the active publisher
|
||||
if (q->write_uid_local != *q->write_uid){
|
||||
std::cout << "Killing old publisher: " << q->endpoint << std::endl;
|
||||
errno = EADDRINUSE;
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint64_t total_msg_size = ALIGN(msg->size + sizeof(int64_t));
|
||||
|
||||
// We need to fit at least three messages in the queue,
|
||||
// then we can always safely access the last message
|
||||
assert(3 * total_msg_size <= q->size);
|
||||
|
||||
uint64_t num_readers = *q->num_readers;
|
||||
|
||||
uint32_t write_cycles, write_pointer;
|
||||
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
|
||||
|
||||
char *p = q->data + write_pointer; // add base offset
|
||||
|
||||
// Check remaining space
|
||||
// Always leave space for a wraparound tag for the next message, including alignment
|
||||
int64_t remaining_space = q->size - write_pointer - total_msg_size - sizeof(int64_t);
|
||||
if (remaining_space <= 0){
|
||||
// Write -1 size tag indicating wraparound
|
||||
*(int64_t*)p = -1;
|
||||
|
||||
// Invalidate all readers that are beyond the write pointer
|
||||
// TODO: should we handle the case where a new reader shows up while this is running?
|
||||
for (uint64_t i = 0; i < num_readers; i++){
|
||||
uint64_t read_pointer = *q->read_pointers[i];
|
||||
uint64_t read_cycles = read_pointer >> 32;
|
||||
read_pointer &= 0xFFFFFFFF;
|
||||
|
||||
if ((read_pointer > write_pointer) && (read_cycles != write_cycles)) {
|
||||
*q->read_valids[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Update global and local copies of write pointer and write_cycles
|
||||
write_pointer = 0;
|
||||
write_cycles = write_cycles + 1;
|
||||
PACK64(*q->write_pointer, write_cycles, write_pointer);
|
||||
|
||||
// Set actual pointer to the beginning of the data segment
|
||||
p = q->data;
|
||||
}
|
||||
|
||||
// Invalidate readers that are in the area that will be written
|
||||
uint64_t start = write_pointer;
|
||||
uint64_t end = ALIGN(start + sizeof(int64_t) + msg->size);
|
||||
|
||||
for (uint64_t i = 0; i < num_readers; i++){
|
||||
uint32_t read_cycles, read_pointer;
|
||||
UNPACK64(read_cycles, read_pointer, *q->read_pointers[i]);
|
||||
|
||||
if ((read_pointer >= start) && (read_pointer < end) && (read_cycles != write_cycles)) {
|
||||
*q->read_valids[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Write size tag
|
||||
std::atomic<int64_t> *size_p = reinterpret_cast<std::atomic<int64_t>*>(p);
|
||||
*size_p = msg->size;
|
||||
|
||||
// Copy data
|
||||
memcpy(p + sizeof(int64_t), msg->data, msg->size);
|
||||
__sync_synchronize();
|
||||
|
||||
// Update write pointer
|
||||
uint32_t new_ptr = ALIGN(write_pointer + msg->size + sizeof(int64_t));
|
||||
PACK64(*q->write_pointer, write_cycles, new_ptr);
|
||||
|
||||
// Notify readers
|
||||
for (uint64_t i = 0; i < num_readers; i++){
|
||||
uint64_t reader_uid = *q->read_uids[i];
|
||||
thread_signal(reader_uid & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
return msg->size;
|
||||
}
|
||||
|
||||
|
||||
int msgq_msg_ready(msgq_queue_t * q){
|
||||
start:
|
||||
int id = q->reader_id;
|
||||
assert(id >= 0); // Make sure subscriber is initialized
|
||||
|
||||
if (q->read_uid_local != *q->read_uids[id]){
|
||||
//std::cout << q->endpoint << ": Reader was evicted, reconnecting" << std::endl;
|
||||
msgq_init_subscriber(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
// Check valid
|
||||
if (!*q->read_valids[id]){
|
||||
msgq_reset_reader(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
uint32_t read_cycles, read_pointer;
|
||||
UNPACK64(read_cycles, read_pointer, *q->read_pointers[id]);
|
||||
UNUSED(read_cycles);
|
||||
|
||||
uint32_t write_cycles, write_pointer;
|
||||
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
|
||||
UNUSED(write_cycles);
|
||||
|
||||
// Check if new message is available
|
||||
return (read_pointer != write_pointer);
|
||||
}
|
||||
|
||||
int msgq_msg_recv(msgq_msg_t * msg, msgq_queue_t * q){
|
||||
start:
|
||||
int id = q->reader_id;
|
||||
assert(id >= 0); // Make sure subscriber is initialized
|
||||
|
||||
if (q->read_uid_local != *q->read_uids[id]){
|
||||
//std::cout << q->endpoint << ": Reader was evicted, reconnecting" << std::endl;
|
||||
msgq_init_subscriber(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
// Check valid
|
||||
if (!*q->read_valids[id]){
|
||||
msgq_reset_reader(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
uint32_t read_cycles, read_pointer;
|
||||
UNPACK64(read_cycles, read_pointer, *q->read_pointers[id]);
|
||||
|
||||
uint32_t write_cycles, write_pointer;
|
||||
UNPACK64(write_cycles, write_pointer, *q->write_pointer);
|
||||
UNUSED(write_cycles);
|
||||
|
||||
char * p = q->data + read_pointer;
|
||||
|
||||
// Check if new message is available
|
||||
if (read_pointer == write_pointer) {
|
||||
msg->size = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Read potential message size
|
||||
std::atomic<int64_t> *size_p = reinterpret_cast<std::atomic<int64_t>*>(p);
|
||||
std::int64_t size = *size_p;
|
||||
|
||||
// Check if the size that was read is valid
|
||||
if (!*q->read_valids[id]){
|
||||
msgq_reset_reader(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
// If size is -1 the buffer was full, and we need to wrap around
|
||||
if (size == -1){
|
||||
read_cycles++;
|
||||
PACK64(*q->read_pointers[id], read_cycles, 0);
|
||||
goto start;
|
||||
}
|
||||
|
||||
// crashing is better than passing garbage data to the consumer
|
||||
// the size will have weird value if it was overwritten by data accidentally
|
||||
assert((uint64_t)size < q->size);
|
||||
assert(size > 0);
|
||||
|
||||
uint32_t new_read_pointer = ALIGN(read_pointer + sizeof(std::int64_t) + size);
|
||||
|
||||
// If conflate is true, check if this is the latest message, else start over
|
||||
if (q->read_conflate){
|
||||
if (new_read_pointer != write_pointer){
|
||||
// Update read pointer
|
||||
PACK64(*q->read_pointers[id], read_cycles, new_read_pointer);
|
||||
goto start;
|
||||
}
|
||||
}
|
||||
|
||||
// Copy message
|
||||
if (msgq_msg_init_size(msg, size) < 0)
|
||||
return -1;
|
||||
|
||||
__sync_synchronize();
|
||||
memcpy(msg->data, p + sizeof(int64_t), size);
|
||||
__sync_synchronize();
|
||||
|
||||
// Update read pointer
|
||||
PACK64(*q->read_pointers[id], read_cycles, new_read_pointer);
|
||||
|
||||
// Check if the actual data that was copied is valid
|
||||
if (!*q->read_valids[id]){
|
||||
msgq_msg_close(msg);
|
||||
msgq_reset_reader(q);
|
||||
goto start;
|
||||
}
|
||||
|
||||
|
||||
return msg->size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int msgq_poll(msgq_pollitem_t * items, size_t nitems, int timeout){
|
||||
int num = 0;
|
||||
|
||||
// Check if messages ready
|
||||
for (size_t i = 0; i < nitems; i++) {
|
||||
items[i].revents = msgq_msg_ready(items[i].q);
|
||||
if (items[i].revents) num++;
|
||||
}
|
||||
|
||||
int ms = (timeout == -1) ? 100 : timeout;
|
||||
|
||||
#ifdef __APPLE__
|
||||
// On macOS, signals can't interrupt nanosleep, so poll more frequently
|
||||
int poll_ms = std::min(ms, 10);
|
||||
int remaining_ms = ms;
|
||||
#else
|
||||
int poll_ms = ms;
|
||||
#endif
|
||||
|
||||
struct timespec ts;
|
||||
ts.tv_sec = poll_ms / 1000;
|
||||
ts.tv_nsec = (poll_ms % 1000) * 1000 * 1000;
|
||||
|
||||
|
||||
while (num == 0) {
|
||||
int ret;
|
||||
|
||||
ret = nanosleep(&ts, &ts);
|
||||
|
||||
// Check if messages ready
|
||||
for (size_t i = 0; i < nitems; i++) {
|
||||
if (items[i].revents == 0 && msgq_msg_ready(items[i].q)){
|
||||
num += 1;
|
||||
items[i].revents = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// exit if we had a timeout and we've exhausted it
|
||||
if (timeout != -1 && ret == 0){
|
||||
remaining_ms -= poll_ms;
|
||||
if (remaining_ms <= 0){
|
||||
break;
|
||||
}
|
||||
poll_ms = std::min(remaining_ms, 10);
|
||||
ts.tv_sec = poll_ms / 1000;
|
||||
ts.tv_nsec = (poll_ms % 1000) * 1000 * 1000;
|
||||
}
|
||||
#else
|
||||
// exit if we had a timeout and the sleep finished
|
||||
if (timeout != -1 && ret == 0){
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
bool msgq_all_readers_updated(msgq_queue_t *q) {
|
||||
uint64_t num_readers = *q->num_readers;
|
||||
for (uint64_t i = 0; i < num_readers; i++) {
|
||||
if (*q->read_valids[i] && *q->write_pointer != *q->read_pointers[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return num_readers > 0;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
#define DEFAULT_SEGMENT_SIZE (1 * 1024 * 1024)
|
||||
#define NUM_READERS 15
|
||||
#define ALIGN(n) ((n + (8 - 1)) & -8)
|
||||
|
||||
#define UNUSED(x) (void)x
|
||||
#define UNPACK64(higher, lower, input) do {uint64_t tmp = input; higher = tmp >> 32; lower = tmp & 0xFFFFFFFF;} while (0)
|
||||
#define PACK64(output, higher, lower) output = ((uint64_t)higher << 32) | ((uint64_t)lower & 0xFFFFFFFF)
|
||||
|
||||
struct msgq_header_t {
|
||||
uint64_t num_readers;
|
||||
uint64_t write_pointer;
|
||||
uint64_t write_uid;
|
||||
uint64_t read_pointers[NUM_READERS];
|
||||
uint64_t read_valids[NUM_READERS];
|
||||
uint64_t read_uids[NUM_READERS];
|
||||
};
|
||||
|
||||
struct msgq_queue_t {
|
||||
std::atomic<uint64_t> *num_readers;
|
||||
std::atomic<uint64_t> *write_pointer;
|
||||
std::atomic<uint64_t> *write_uid;
|
||||
std::atomic<uint64_t> *read_pointers[NUM_READERS];
|
||||
std::atomic<uint64_t> *read_valids[NUM_READERS];
|
||||
std::atomic<uint64_t> *read_uids[NUM_READERS];
|
||||
char * mmap_p;
|
||||
char * data;
|
||||
size_t size;
|
||||
int reader_id;
|
||||
uint64_t read_uid_local;
|
||||
uint64_t write_uid_local;
|
||||
|
||||
bool read_conflate;
|
||||
std::string endpoint;
|
||||
};
|
||||
|
||||
struct msgq_msg_t {
|
||||
size_t size;
|
||||
char * data;
|
||||
};
|
||||
|
||||
struct msgq_pollitem_t {
|
||||
msgq_queue_t *q;
|
||||
int revents;
|
||||
};
|
||||
|
||||
void msgq_wait_for_subscriber(msgq_queue_t *q);
|
||||
void msgq_reset_reader(msgq_queue_t *q);
|
||||
|
||||
int msgq_msg_init_size(msgq_msg_t *msg, size_t size);
|
||||
int msgq_msg_init_data(msgq_msg_t *msg, char * data, size_t size);
|
||||
int msgq_msg_close(msgq_msg_t *msg);
|
||||
|
||||
int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size);
|
||||
void msgq_close_queue(msgq_queue_t *q);
|
||||
void msgq_init_publisher(msgq_queue_t * q);
|
||||
void msgq_init_subscriber(msgq_queue_t * q);
|
||||
|
||||
int msgq_msg_send(msgq_msg_t *msg, msgq_queue_t *q);
|
||||
int msgq_msg_recv(msgq_msg_t *msg, msgq_queue_t *q);
|
||||
int msgq_msg_ready(msgq_queue_t * q);
|
||||
int msgq_poll(msgq_pollitem_t * items, size_t nitems, int timeout);
|
||||
|
||||
bool msgq_all_readers_updated(msgq_queue_t *q);
|
||||
@@ -0,0 +1,432 @@
|
||||
#include "catch2/catch.hpp"
|
||||
#include "msgq/msgq.h"
|
||||
|
||||
static void cleanup_test_queue() {
|
||||
#ifdef __APPLE__
|
||||
remove("/tmp/msgq_test_queue");
|
||||
#else
|
||||
remove("/dev/shm/msgq_test_queue");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_CASE("ALIGN")
|
||||
{
|
||||
REQUIRE(ALIGN(0) == 0);
|
||||
REQUIRE(ALIGN(1) == 8);
|
||||
REQUIRE(ALIGN(7) == 8);
|
||||
REQUIRE(ALIGN(8) == 8);
|
||||
REQUIRE(ALIGN(99999) == 100000);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_init_size")
|
||||
{
|
||||
const size_t msg_size = 30;
|
||||
msgq_msg_t msg;
|
||||
|
||||
msgq_msg_init_size(&msg, msg_size);
|
||||
REQUIRE(msg.size == msg_size);
|
||||
|
||||
msgq_msg_close(&msg);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_init_data")
|
||||
{
|
||||
const size_t msg_size = 30;
|
||||
char *data = new char[msg_size];
|
||||
|
||||
for (size_t i = 0; i < msg_size; i++)
|
||||
{
|
||||
data[i] = i;
|
||||
}
|
||||
|
||||
msgq_msg_t msg;
|
||||
msgq_msg_init_data(&msg, data, msg_size);
|
||||
|
||||
REQUIRE(msg.size == msg_size);
|
||||
REQUIRE(memcmp(msg.data, data, msg_size) == 0);
|
||||
|
||||
delete[] data;
|
||||
msgq_msg_close(&msg);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_init_subscriber")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q;
|
||||
msgq_new_queue(&q, "test_queue", 1024);
|
||||
REQUIRE(*q.num_readers == 0);
|
||||
|
||||
q.reader_id = 1;
|
||||
*q.read_valids[0] = false;
|
||||
*q.read_pointers[0] = ((uint64_t)1 << 32);
|
||||
|
||||
*q.write_pointer = 255;
|
||||
|
||||
msgq_init_subscriber(&q);
|
||||
REQUIRE(q.read_conflate == false);
|
||||
REQUIRE(*q.read_valids[0] == true);
|
||||
REQUIRE((*q.read_pointers[0] >> 32) == 0);
|
||||
REQUIRE((*q.read_pointers[0] & 0xFFFFFFFF) == 255);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_send first message")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q;
|
||||
msgq_new_queue(&q, "test_queue", 1024);
|
||||
msgq_init_publisher(&q);
|
||||
|
||||
REQUIRE(*q.write_pointer == 0);
|
||||
|
||||
size_t msg_size = 128;
|
||||
|
||||
SECTION("Aligned message size")
|
||||
{
|
||||
}
|
||||
SECTION("Unaligned message size")
|
||||
{
|
||||
msg_size--;
|
||||
}
|
||||
char *data = new char[msg_size];
|
||||
|
||||
for (size_t i = 0; i < msg_size; i++)
|
||||
{
|
||||
data[i] = i;
|
||||
}
|
||||
|
||||
msgq_msg_t msg;
|
||||
msgq_msg_init_data(&msg, data, msg_size);
|
||||
|
||||
msgq_msg_send(&msg, &q);
|
||||
REQUIRE(*(int64_t *)q.data == msg_size); // Check size tag
|
||||
REQUIRE(*q.write_pointer == 128 + sizeof(int64_t));
|
||||
REQUIRE(memcmp(q.data + sizeof(int64_t), data, msg_size) == 0);
|
||||
|
||||
delete[] data;
|
||||
msgq_msg_close(&msg);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_send test wraparound")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q;
|
||||
msgq_new_queue(&q, "test_queue", 1024);
|
||||
msgq_init_publisher(&q);
|
||||
|
||||
REQUIRE((*q.write_pointer & 0xFFFFFFFF) == 0);
|
||||
REQUIRE((*q.write_pointer >> 32) == 0);
|
||||
|
||||
const size_t msg_size = 120;
|
||||
msgq_msg_t msg;
|
||||
msgq_msg_init_size(&msg, msg_size);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
msgq_msg_send(&msg, &q);
|
||||
}
|
||||
// Check 8th message was written at the beginning
|
||||
REQUIRE((*q.write_pointer & 0xFFFFFFFF) == msg_size + sizeof(int64_t));
|
||||
|
||||
// Check cycle count
|
||||
REQUIRE((*q.write_pointer >> 32) == 1);
|
||||
|
||||
// Check wraparound tag
|
||||
char *tag_location = q.data;
|
||||
tag_location += 7 * (msg_size + sizeof(int64_t));
|
||||
REQUIRE(*(int64_t *)tag_location == -1);
|
||||
|
||||
msgq_msg_close(&msg);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_recv test wraparound")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q_pub, q_sub;
|
||||
msgq_new_queue(&q_pub, "test_queue", 1024);
|
||||
msgq_new_queue(&q_sub, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&q_pub);
|
||||
msgq_init_subscriber(&q_sub);
|
||||
|
||||
REQUIRE((*q_pub.write_pointer >> 32) == 0);
|
||||
REQUIRE((*q_sub.read_pointers[0] >> 32) == 0);
|
||||
|
||||
const size_t msg_size = 120;
|
||||
msgq_msg_t msg1;
|
||||
msgq_msg_init_size(&msg1, msg_size);
|
||||
|
||||
SECTION("Check cycle counter after reset")
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
msgq_msg_send(&msg1, &q_pub);
|
||||
}
|
||||
|
||||
msgq_msg_t msg2;
|
||||
msgq_msg_recv(&msg2, &q_sub);
|
||||
REQUIRE(msg2.size == 0); // Reader had to reset
|
||||
msgq_msg_close(&msg2);
|
||||
}
|
||||
SECTION("Check cycle counter while keeping up with writer")
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
msgq_msg_send(&msg1, &q_pub);
|
||||
|
||||
msgq_msg_t msg2;
|
||||
msgq_msg_recv(&msg2, &q_sub);
|
||||
REQUIRE(msg2.size > 0);
|
||||
msgq_msg_close(&msg2);
|
||||
}
|
||||
}
|
||||
|
||||
REQUIRE((*q_sub.read_pointers[0] >> 32) == 1);
|
||||
msgq_msg_close(&msg1);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_msg_send test invalidation")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q_pub, q_sub;
|
||||
msgq_new_queue(&q_pub, "test_queue", 1024);
|
||||
msgq_new_queue(&q_sub, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&q_pub);
|
||||
msgq_init_subscriber(&q_sub);
|
||||
*q_sub.write_pointer = (uint64_t)1 << 32;
|
||||
|
||||
REQUIRE(*q_sub.read_valids[0] == true);
|
||||
|
||||
SECTION("read pointer in tag")
|
||||
{
|
||||
*q_sub.read_pointers[0] = 0;
|
||||
}
|
||||
SECTION("read pointer in data section")
|
||||
{
|
||||
*q_sub.read_pointers[0] = 64;
|
||||
}
|
||||
SECTION("read pointer in wraparound section")
|
||||
{
|
||||
*q_pub.write_pointer = ((uint64_t)1 << 32) | 1000; // Writer is one cycle ahead
|
||||
*q_sub.read_pointers[0] = 1020;
|
||||
}
|
||||
|
||||
msgq_msg_t msg;
|
||||
msgq_msg_init_size(&msg, 128);
|
||||
msgq_msg_send(&msg, &q_pub);
|
||||
|
||||
REQUIRE(*q_sub.read_valids[0] == false);
|
||||
|
||||
msgq_msg_close(&msg);
|
||||
}
|
||||
|
||||
TEST_CASE("msgq_init_subscriber init 2 subscribers")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t q1, q2;
|
||||
msgq_new_queue(&q1, "test_queue", 1024);
|
||||
msgq_new_queue(&q2, "test_queue", 1024);
|
||||
|
||||
*q1.num_readers = 0;
|
||||
|
||||
REQUIRE(*q1.num_readers == 0);
|
||||
REQUIRE(*q2.num_readers == 0);
|
||||
|
||||
msgq_init_subscriber(&q1);
|
||||
REQUIRE(*q1.num_readers == 1);
|
||||
REQUIRE(*q2.num_readers == 1);
|
||||
REQUIRE(q1.reader_id == 0);
|
||||
|
||||
msgq_init_subscriber(&q2);
|
||||
REQUIRE(*q1.num_readers == 2);
|
||||
REQUIRE(*q2.num_readers == 2);
|
||||
REQUIRE(q2.reader_id == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("Write 1 msg, read 1 msg", "[integration]")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
const size_t msg_size = 128;
|
||||
msgq_queue_t writer, reader;
|
||||
|
||||
msgq_new_queue(&writer, "test_queue", 1024);
|
||||
msgq_new_queue(&reader, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&writer);
|
||||
msgq_init_subscriber(&reader);
|
||||
|
||||
// Build 128 byte message
|
||||
msgq_msg_t outgoing_msg;
|
||||
msgq_msg_init_size(&outgoing_msg, msg_size);
|
||||
|
||||
for (size_t i = 0; i < msg_size; i++)
|
||||
{
|
||||
outgoing_msg.data[i] = i;
|
||||
}
|
||||
|
||||
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
|
||||
|
||||
msgq_msg_t incoming_msg1;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
|
||||
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
|
||||
|
||||
// Verify that there are no more messages
|
||||
msgq_msg_t incoming_msg2;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == 0);
|
||||
|
||||
msgq_msg_close(&outgoing_msg);
|
||||
msgq_msg_close(&incoming_msg1);
|
||||
msgq_msg_close(&incoming_msg2);
|
||||
}
|
||||
|
||||
TEST_CASE("Write 2 msg, read 2 msg - conflate = false", "[integration]")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
const size_t msg_size = 128;
|
||||
msgq_queue_t writer, reader;
|
||||
|
||||
msgq_new_queue(&writer, "test_queue", 1024);
|
||||
msgq_new_queue(&reader, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&writer);
|
||||
msgq_init_subscriber(&reader);
|
||||
|
||||
// Build 128 byte message
|
||||
msgq_msg_t outgoing_msg;
|
||||
msgq_msg_init_size(&outgoing_msg, msg_size);
|
||||
|
||||
for (size_t i = 0; i < msg_size; i++)
|
||||
{
|
||||
outgoing_msg.data[i] = i;
|
||||
}
|
||||
|
||||
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
|
||||
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
|
||||
|
||||
msgq_msg_t incoming_msg1;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
|
||||
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
|
||||
|
||||
msgq_msg_t incoming_msg2;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == msg_size);
|
||||
REQUIRE(memcmp(incoming_msg2.data, outgoing_msg.data, msg_size) == 0);
|
||||
|
||||
msgq_msg_close(&outgoing_msg);
|
||||
msgq_msg_close(&incoming_msg1);
|
||||
msgq_msg_close(&incoming_msg2);
|
||||
}
|
||||
|
||||
TEST_CASE("Write 2 msg, read 2 msg - conflate = true", "[integration]")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
const size_t msg_size = 128;
|
||||
msgq_queue_t writer, reader;
|
||||
|
||||
msgq_new_queue(&writer, "test_queue", 1024);
|
||||
msgq_new_queue(&reader, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&writer);
|
||||
msgq_init_subscriber(&reader);
|
||||
reader.read_conflate = true;
|
||||
|
||||
// Build 128 byte message
|
||||
msgq_msg_t outgoing_msg;
|
||||
msgq_msg_init_size(&outgoing_msg, msg_size);
|
||||
|
||||
for (size_t i = 0; i < msg_size; i++)
|
||||
{
|
||||
outgoing_msg.data[i] = i;
|
||||
}
|
||||
|
||||
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
|
||||
REQUIRE(msgq_msg_send(&outgoing_msg, &writer) == msg_size);
|
||||
|
||||
msgq_msg_t incoming_msg1;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg1, &reader) == msg_size);
|
||||
REQUIRE(memcmp(incoming_msg1.data, outgoing_msg.data, msg_size) == 0);
|
||||
|
||||
// Verify that there are no more messages
|
||||
msgq_msg_t incoming_msg2;
|
||||
REQUIRE(msgq_msg_recv(&incoming_msg2, &reader) == 0);
|
||||
|
||||
msgq_msg_close(&outgoing_msg);
|
||||
msgq_msg_close(&incoming_msg1);
|
||||
msgq_msg_close(&incoming_msg2);
|
||||
}
|
||||
|
||||
TEST_CASE("1 publisher, 1 slow subscriber", "[integration]")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t writer, reader;
|
||||
|
||||
msgq_new_queue(&writer, "test_queue", 1024);
|
||||
msgq_new_queue(&reader, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&writer);
|
||||
msgq_init_subscriber(&reader);
|
||||
|
||||
int n_received = 0;
|
||||
int n_skipped = 0;
|
||||
|
||||
for (uint64_t i = 0; i < 1e5; i++)
|
||||
{
|
||||
msgq_msg_t outgoing_msg;
|
||||
msgq_msg_init_data(&outgoing_msg, (char *)&i, sizeof(uint64_t));
|
||||
msgq_msg_send(&outgoing_msg, &writer);
|
||||
msgq_msg_close(&outgoing_msg);
|
||||
|
||||
if (i % 10 == 0)
|
||||
{
|
||||
msgq_msg_t msg1;
|
||||
msgq_msg_recv(&msg1, &reader);
|
||||
|
||||
if (msg1.size == 0)
|
||||
{
|
||||
n_skipped++;
|
||||
}
|
||||
else
|
||||
{
|
||||
n_received++;
|
||||
}
|
||||
msgq_msg_close(&msg1);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: verify these numbers by hand
|
||||
REQUIRE(n_received == 8572);
|
||||
REQUIRE(n_skipped == 1428);
|
||||
}
|
||||
|
||||
TEST_CASE("1 publisher, 2 subscribers", "[integration]")
|
||||
{
|
||||
cleanup_test_queue();
|
||||
msgq_queue_t writer, reader1, reader2;
|
||||
|
||||
msgq_new_queue(&writer, "test_queue", 1024);
|
||||
msgq_new_queue(&reader1, "test_queue", 1024);
|
||||
msgq_new_queue(&reader2, "test_queue", 1024);
|
||||
|
||||
msgq_init_publisher(&writer);
|
||||
msgq_init_subscriber(&reader1);
|
||||
msgq_init_subscriber(&reader2);
|
||||
|
||||
for (uint64_t i = 0; i < 1024 * 3; i++)
|
||||
{
|
||||
msgq_msg_t outgoing_msg;
|
||||
msgq_msg_init_data(&outgoing_msg, (char *)&i, sizeof(uint64_t));
|
||||
msgq_msg_send(&outgoing_msg, &writer);
|
||||
|
||||
msgq_msg_t msg1, msg2;
|
||||
msgq_msg_recv(&msg1, &reader1);
|
||||
msgq_msg_recv(&msg2, &reader2);
|
||||
|
||||
REQUIRE(msg1.size == sizeof(uint64_t));
|
||||
REQUIRE(msg2.size == sizeof(uint64_t));
|
||||
REQUIRE(*(uint64_t *)msg1.data == i);
|
||||
REQUIRE(*(uint64_t *)msg2.data == i);
|
||||
|
||||
msgq_msg_close(&outgoing_msg);
|
||||
msgq_msg_close(&msg1);
|
||||
msgq_msg_close(&msg2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch2/catch.hpp"
|
||||
@@ -0,0 +1,186 @@
|
||||
import pytest
|
||||
import multiprocessing
|
||||
import platform
|
||||
import msgq
|
||||
from parameterized import parameterized_class
|
||||
from typing import Optional
|
||||
|
||||
WAIT_TIMEOUT = 5
|
||||
|
||||
|
||||
@pytest.mark.skipif(condition=platform.system() == "Darwin", reason="Events not supported on macOS")
|
||||
class TestEvents:
|
||||
|
||||
def test_mutation(self):
|
||||
handle = msgq.fake_event_handle("carState")
|
||||
event = handle.recv_called_event
|
||||
|
||||
assert not event.peek()
|
||||
event.set()
|
||||
assert event.peek()
|
||||
event.clear()
|
||||
assert not event.peek()
|
||||
|
||||
del event
|
||||
|
||||
def test_wait(self):
|
||||
handle = msgq.fake_event_handle("carState")
|
||||
event = handle.recv_called_event
|
||||
|
||||
event.set()
|
||||
try:
|
||||
event.wait(WAIT_TIMEOUT)
|
||||
assert event.peek()
|
||||
except RuntimeError:
|
||||
pytest.fail("event.wait() timed out")
|
||||
|
||||
def test_wait_multiprocess(self):
|
||||
handle = msgq.fake_event_handle("carState")
|
||||
event = handle.recv_called_event
|
||||
|
||||
def set_event_run():
|
||||
event.set()
|
||||
|
||||
try:
|
||||
p = multiprocessing.Process(target=set_event_run)
|
||||
p.start()
|
||||
event.wait(WAIT_TIMEOUT)
|
||||
assert event.peek()
|
||||
except RuntimeError:
|
||||
pytest.fail("event.wait() timed out")
|
||||
|
||||
p.kill()
|
||||
|
||||
def test_wait_zero_timeout(self):
|
||||
handle = msgq.fake_event_handle("carState")
|
||||
event = handle.recv_called_event
|
||||
|
||||
try:
|
||||
event.wait(0)
|
||||
pytest.fail("event.wait() did not time out")
|
||||
except RuntimeError:
|
||||
assert not event.peek()
|
||||
|
||||
|
||||
@pytest.mark.skipif(condition=platform.system() == "Darwin", reason="FakeSockets not supported on macOS")
|
||||
@parameterized_class([{"prefix": None}, {"prefix": "test"}])
|
||||
class TestFakeSockets:
|
||||
prefix: Optional[str] = None
|
||||
|
||||
def setup_method(self):
|
||||
msgq.toggle_fake_events(True)
|
||||
if self.prefix is not None:
|
||||
msgq.set_fake_prefix(self.prefix)
|
||||
else:
|
||||
msgq.delete_fake_prefix()
|
||||
|
||||
def teardown_method(self):
|
||||
msgq.toggle_fake_events(False)
|
||||
msgq.delete_fake_prefix()
|
||||
|
||||
def test_event_handle_init(self):
|
||||
handle = msgq.fake_event_handle("controlsState", override=True)
|
||||
|
||||
assert not handle.enabled
|
||||
assert handle.recv_called_event.fd >= 0
|
||||
assert handle.recv_ready_event.fd >= 0
|
||||
|
||||
def test_non_managed_socket_state(self):
|
||||
# non managed socket should have zero state
|
||||
_ = msgq.pub_sock("ubloxGnss")
|
||||
|
||||
handle = msgq.fake_event_handle("ubloxGnss", override=False)
|
||||
|
||||
assert not handle.enabled
|
||||
assert handle.recv_called_event.fd == 0
|
||||
assert handle.recv_ready_event.fd == 0
|
||||
|
||||
def test_managed_socket_state(self):
|
||||
# managed socket should not change anything about the state
|
||||
handle = msgq.fake_event_handle("ubloxGnss")
|
||||
handle.enabled = True
|
||||
|
||||
expected_enabled = handle.enabled
|
||||
expected_recv_called_fd = handle.recv_called_event.fd
|
||||
expected_recv_ready_fd = handle.recv_ready_event.fd
|
||||
|
||||
_ = msgq.pub_sock("ubloxGnss")
|
||||
|
||||
assert handle.enabled == expected_enabled
|
||||
assert handle.recv_called_event.fd == expected_recv_called_fd
|
||||
assert handle.recv_ready_event.fd == expected_recv_ready_fd
|
||||
|
||||
def test_sockets_enable_disable(self):
|
||||
carState_handle = msgq.fake_event_handle("ubloxGnss", enable=True)
|
||||
recv_called = carState_handle.recv_called_event
|
||||
recv_ready = carState_handle.recv_ready_event
|
||||
|
||||
pub_sock = msgq.pub_sock("ubloxGnss")
|
||||
sub_sock = msgq.sub_sock("ubloxGnss")
|
||||
|
||||
try:
|
||||
carState_handle.enabled = True
|
||||
recv_ready.set()
|
||||
pub_sock.send(b"test")
|
||||
_ = sub_sock.receive()
|
||||
assert recv_called.peek()
|
||||
recv_called.clear()
|
||||
|
||||
carState_handle.enabled = False
|
||||
recv_ready.set()
|
||||
pub_sock.send(b"test")
|
||||
_ = sub_sock.receive()
|
||||
assert not recv_called.peek()
|
||||
except RuntimeError:
|
||||
pytest.fail("event.wait() timed out")
|
||||
|
||||
def test_synced_pub_sub(self):
|
||||
def daemon_repub_process_run():
|
||||
pub_sock = msgq.pub_sock("ubloxGnss")
|
||||
sub_sock = msgq.sub_sock("carState")
|
||||
|
||||
frame = -1
|
||||
while True:
|
||||
frame += 1
|
||||
msg = sub_sock.receive(non_blocking=True)
|
||||
if msg is None:
|
||||
print("none received")
|
||||
continue
|
||||
|
||||
bts = frame.to_bytes(8, 'little')
|
||||
pub_sock.send(bts)
|
||||
|
||||
carState_handle = msgq.fake_event_handle("carState", enable=True)
|
||||
recv_called = carState_handle.recv_called_event
|
||||
recv_ready = carState_handle.recv_ready_event
|
||||
|
||||
p = multiprocessing.Process(target=daemon_repub_process_run)
|
||||
p.start()
|
||||
|
||||
pub_sock = msgq.pub_sock("carState")
|
||||
sub_sock = msgq.sub_sock("ubloxGnss")
|
||||
|
||||
try:
|
||||
for i in range(10):
|
||||
recv_called.wait(WAIT_TIMEOUT)
|
||||
recv_called.clear()
|
||||
|
||||
if i == 0:
|
||||
sub_sock.receive(non_blocking=True)
|
||||
|
||||
bts = i.to_bytes(8, 'little')
|
||||
pub_sock.send(bts)
|
||||
|
||||
recv_ready.set()
|
||||
recv_called.wait(WAIT_TIMEOUT)
|
||||
|
||||
msg = sub_sock.receive(non_blocking=True)
|
||||
assert msg is not None
|
||||
assert len(msg) == 8
|
||||
|
||||
frame = int.from_bytes(msg, 'little')
|
||||
assert frame == i
|
||||
except RuntimeError:
|
||||
pytest.fail("event.wait() timed out")
|
||||
finally:
|
||||
p.kill()
|
||||
@@ -0,0 +1,57 @@
|
||||
import random
|
||||
import time
|
||||
import string
|
||||
import msgq
|
||||
import pytest
|
||||
|
||||
def random_sock():
|
||||
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=10))
|
||||
|
||||
def random_bytes(length=1000):
|
||||
return bytes([random.randrange(0xFF) for _ in range(length)])
|
||||
|
||||
class TestPubSubSockets:
|
||||
|
||||
def test_pub_sub(self):
|
||||
sock = random_sock()
|
||||
pub_sock = msgq.pub_sock(sock)
|
||||
sub_sock = msgq.sub_sock(sock, conflate=False, timeout=None)
|
||||
|
||||
for _ in range(1000):
|
||||
msg = random_bytes()
|
||||
pub_sock.send(msg)
|
||||
recvd = sub_sock.receive()
|
||||
assert msg == recvd
|
||||
|
||||
def test_conflate(self):
|
||||
sock = random_sock()
|
||||
pub_sock = msgq.pub_sock(sock)
|
||||
for conflate in [True, False]:
|
||||
num_msgs = random.randint(3, 10)
|
||||
sub_sock = msgq.sub_sock(sock, conflate=conflate, timeout=None)
|
||||
|
||||
sent_msgs = []
|
||||
for __ in range(num_msgs):
|
||||
msg = random_bytes()
|
||||
pub_sock.send(msg)
|
||||
sent_msgs.append(msg)
|
||||
time.sleep(0.1)
|
||||
recvd_msgs = msgq.drain_sock_raw(sub_sock)
|
||||
if conflate:
|
||||
assert len(recvd_msgs) == 1
|
||||
assert recvd_msgs[0] == sent_msgs[-1]
|
||||
else:
|
||||
assert len(recvd_msgs) == len(sent_msgs)
|
||||
for rec_msg, sent_msg in zip(recvd_msgs, sent_msgs):
|
||||
assert rec_msg == sent_msg
|
||||
|
||||
@pytest.mark.flaky(retries=3, delay=1)
|
||||
def test_receive_timeout(self):
|
||||
sock = random_sock()
|
||||
timeout = random.randrange(200)
|
||||
sub_sock = msgq.sub_sock(sock, timeout=timeout)
|
||||
|
||||
start_time = time.monotonic()
|
||||
recvd = sub_sock.receive()
|
||||
assert (time.monotonic() - start_time) < (timeout + 0.1)
|
||||
assert recvd is None
|
||||
@@ -0,0 +1,138 @@
|
||||
import pytest
|
||||
import time
|
||||
import msgq
|
||||
import concurrent.futures
|
||||
|
||||
SERVICE_NAME = 'myService'
|
||||
|
||||
def poller():
|
||||
context = msgq.Context()
|
||||
|
||||
p = msgq.Poller()
|
||||
|
||||
sub = msgq.SubSocket()
|
||||
sub.connect(context, SERVICE_NAME)
|
||||
p.registerSocket(sub)
|
||||
|
||||
socks = p.poll(10000)
|
||||
r = [s.receive(non_blocking=True) for s in socks]
|
||||
|
||||
return r
|
||||
|
||||
|
||||
class TestPoller:
|
||||
def test_poll_once(self):
|
||||
context = msgq.Context()
|
||||
|
||||
pub = msgq.PubSocket()
|
||||
pub.connect(context, SERVICE_NAME)
|
||||
|
||||
with concurrent.futures.ThreadPoolExecutor() as e:
|
||||
poll = e.submit(poller)
|
||||
|
||||
time.sleep(0.1) # Slow joiner syndrome
|
||||
|
||||
# Send message
|
||||
pub.send(b"a")
|
||||
|
||||
# Wait for poll result
|
||||
result = poll.result()
|
||||
|
||||
del pub
|
||||
context.term()
|
||||
|
||||
assert result == [b"a"]
|
||||
|
||||
def test_poll_and_create_many_subscribers(self):
|
||||
context = msgq.Context()
|
||||
|
||||
pub = msgq.PubSocket()
|
||||
pub.connect(context, SERVICE_NAME)
|
||||
|
||||
with concurrent.futures.ThreadPoolExecutor() as e:
|
||||
poll = e.submit(poller)
|
||||
|
||||
time.sleep(0.1) # Slow joiner syndrome
|
||||
c = msgq.Context()
|
||||
for _ in range(10):
|
||||
msgq.SubSocket().connect(c, SERVICE_NAME)
|
||||
|
||||
time.sleep(0.1)
|
||||
|
||||
# Send message
|
||||
pub.send(b"a")
|
||||
|
||||
# Wait for poll result
|
||||
result = poll.result()
|
||||
|
||||
del pub
|
||||
context.term()
|
||||
|
||||
assert result == [b"a"]
|
||||
|
||||
def test_multiple_publishers_exception(self):
|
||||
context = msgq.Context()
|
||||
|
||||
with pytest.raises(msgq.MultiplePublishersError):
|
||||
pub1 = msgq.PubSocket()
|
||||
pub1.connect(context, SERVICE_NAME)
|
||||
|
||||
pub2 = msgq.PubSocket()
|
||||
pub2.connect(context, SERVICE_NAME)
|
||||
|
||||
pub1.send(b"a")
|
||||
|
||||
del pub1
|
||||
del pub2
|
||||
context.term()
|
||||
|
||||
def test_multiple_messages(self):
|
||||
context = msgq.Context()
|
||||
|
||||
pub = msgq.PubSocket()
|
||||
pub.connect(context, SERVICE_NAME)
|
||||
|
||||
sub = msgq.SubSocket()
|
||||
sub.connect(context, SERVICE_NAME)
|
||||
|
||||
time.sleep(0.1) # Slow joiner
|
||||
|
||||
for i in range(1, 100):
|
||||
pub.send(b'a'*i)
|
||||
|
||||
msg_seen = False
|
||||
i = 1
|
||||
while True:
|
||||
r = sub.receive(non_blocking=True)
|
||||
|
||||
if r is not None:
|
||||
assert b'a'*i == r
|
||||
|
||||
msg_seen = True
|
||||
i += 1
|
||||
|
||||
if r is None and msg_seen:
|
||||
break
|
||||
|
||||
del pub
|
||||
del sub
|
||||
context.term()
|
||||
|
||||
def test_conflate(self):
|
||||
context = msgq.Context()
|
||||
|
||||
pub = msgq.PubSocket()
|
||||
pub.connect(context, SERVICE_NAME)
|
||||
|
||||
sub = msgq.SubSocket()
|
||||
sub.connect(context, SERVICE_NAME, conflate=True)
|
||||
|
||||
time.sleep(0.1) # Slow joiner
|
||||
pub.send(b'a')
|
||||
pub.send(b'b')
|
||||
|
||||
assert b'b' == sub.receive()
|
||||
|
||||
del pub
|
||||
del sub
|
||||
context.term()
|
||||
@@ -0,0 +1,2 @@
|
||||
visionipc_pyx.cpp
|
||||
*.so
|
||||
@@ -0,0 +1,6 @@
|
||||
from msgq.visionipc.visionipc_pyx import VisionBuf, VisionIpcClient, VisionIpcServer, VisionStreamType, get_endpoint_name
|
||||
assert VisionBuf
|
||||
assert VisionIpcClient
|
||||
assert VisionIpcServer
|
||||
assert VisionStreamType
|
||||
assert get_endpoint_name
|
||||
@@ -0,0 +1,2 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch2/catch.hpp"
|
||||
@@ -0,0 +1,100 @@
|
||||
import random
|
||||
from typing import Optional
|
||||
import numpy as np
|
||||
from msgq.visionipc import VisionIpcServer, VisionIpcClient, VisionStreamType
|
||||
|
||||
|
||||
class TestVisionIpc:
|
||||
server: VisionIpcServer
|
||||
client: Optional[VisionIpcClient]
|
||||
|
||||
def setup_vipc(self, name, *stream_types, num_buffers=1, width=100, height=100, conflate=False):
|
||||
self.server = VisionIpcServer(name)
|
||||
for stream_type in stream_types:
|
||||
self.server.create_buffers(stream_type, num_buffers, width, height)
|
||||
self.server.start_listener()
|
||||
|
||||
if len(stream_types):
|
||||
self.client = VisionIpcClient(name, stream_types[0], conflate)
|
||||
assert self.client.connect(True)
|
||||
else:
|
||||
self.client = None
|
||||
|
||||
return self.server, self.client
|
||||
|
||||
def test_connect(self):
|
||||
self.setup_vipc("camerad", VisionStreamType.VISION_STREAM_ROAD)
|
||||
assert self.client is not None
|
||||
assert self.client.is_connected
|
||||
del self.client
|
||||
del self.server
|
||||
|
||||
def test_available_streams(self):
|
||||
for k in range(4):
|
||||
stream_types = set(random.choices([x.value for x in VisionStreamType], k=k))
|
||||
self.setup_vipc("camerad", *stream_types)
|
||||
available_streams = VisionIpcClient.available_streams("camerad", True)
|
||||
assert available_streams == stream_types
|
||||
del self.client
|
||||
del self.server
|
||||
|
||||
def test_buffers(self):
|
||||
width, height, num_buffers = 100, 200, 5
|
||||
self.setup_vipc("camerad", VisionStreamType.VISION_STREAM_ROAD, num_buffers=num_buffers, width=width, height=height)
|
||||
assert self.client is not None
|
||||
assert self.client.width == width
|
||||
assert self.client.height == height
|
||||
assert self.client.buffer_len is not None and self.client.buffer_len > 0
|
||||
assert self.client.num_buffers == num_buffers
|
||||
del self.client
|
||||
del self.server
|
||||
|
||||
def test_send_single_buffer(self):
|
||||
self.setup_vipc("camerad", VisionStreamType.VISION_STREAM_ROAD)
|
||||
assert self.client is not None
|
||||
assert self.client.buffer_len is not None
|
||||
buf = np.zeros(self.client.buffer_len, dtype=np.uint8)
|
||||
buf.view('<i4')[0] = 1234
|
||||
self.server.send(VisionStreamType.VISION_STREAM_ROAD, buf, frame_id=1337)
|
||||
|
||||
recv_buf = self.client.recv()
|
||||
assert recv_buf is not None
|
||||
assert recv_buf.data.view('<i4')[0] == 1234
|
||||
assert self.client.frame_id == 1337
|
||||
del self.client
|
||||
del self.server
|
||||
|
||||
def test_no_conflate(self):
|
||||
self.setup_vipc("camerad", VisionStreamType.VISION_STREAM_ROAD)
|
||||
assert self.client is not None
|
||||
assert self.client.buffer_len is not None
|
||||
buf = np.zeros(self.client.buffer_len, dtype=np.uint8)
|
||||
self.server.send(VisionStreamType.VISION_STREAM_ROAD, buf, frame_id=1)
|
||||
self.server.send(VisionStreamType.VISION_STREAM_ROAD, buf, frame_id=2)
|
||||
|
||||
recv_buf = self.client.recv()
|
||||
assert recv_buf is not None
|
||||
assert self.client.frame_id == 1
|
||||
|
||||
recv_buf = self.client.recv()
|
||||
assert recv_buf is not None
|
||||
assert self.client.frame_id == 2
|
||||
del self.client
|
||||
del self.server
|
||||
|
||||
def test_conflate(self):
|
||||
self.setup_vipc("camerad", VisionStreamType.VISION_STREAM_ROAD, conflate=True)
|
||||
assert self.client is not None
|
||||
assert self.client.buffer_len is not None
|
||||
buf = np.zeros(self.client.buffer_len, dtype=np.uint8)
|
||||
self.server.send(VisionStreamType.VISION_STREAM_ROAD, buf, frame_id=1)
|
||||
self.server.send(VisionStreamType.VISION_STREAM_ROAD, buf, frame_id=2)
|
||||
|
||||
recv_buf = self.client.recv()
|
||||
assert recv_buf is not None
|
||||
assert self.client.frame_id == 2
|
||||
|
||||
recv_buf = self.client.recv()
|
||||
assert recv_buf is None
|
||||
del self.client
|
||||
del self.server
|
||||
@@ -0,0 +1,79 @@
|
||||
#include "msgq/visionipc/visionbuf.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
std::atomic<int> offset = 0;
|
||||
|
||||
static void *malloc_with_fd(size_t len, int *fd) {
|
||||
char full_path[0x100];
|
||||
|
||||
#ifdef __APPLE__
|
||||
snprintf(full_path, sizeof(full_path)-1, "/tmp/visionbuf_%d_%d", getpid(), offset++);
|
||||
#else
|
||||
snprintf(full_path, sizeof(full_path)-1, "/dev/shm/msgq_visionbuf_%d_%d", getpid(), offset++);
|
||||
#endif
|
||||
|
||||
*fd = open(full_path, O_RDWR | O_CREAT, 0664);
|
||||
assert(*fd >= 0);
|
||||
|
||||
unlink(full_path);
|
||||
|
||||
int ret = ftruncate(*fd, len);
|
||||
assert(ret == 0);
|
||||
void *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, *fd, 0);
|
||||
assert(addr != MAP_FAILED);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
void VisionBuf::allocate(size_t length) {
|
||||
this->len = length;
|
||||
this->mmap_len = this->len + sizeof(uint64_t);
|
||||
this->addr = malloc_with_fd(this->mmap_len, &this->fd);
|
||||
this->frame_id = (uint64_t*)((uint8_t*)this->addr + this->len);
|
||||
}
|
||||
|
||||
void VisionBuf::import(){
|
||||
assert(this->fd >= 0);
|
||||
this->addr = mmap(NULL, this->mmap_len, PROT_READ | PROT_WRITE, MAP_SHARED, this->fd, 0);
|
||||
assert(this->addr != MAP_FAILED);
|
||||
|
||||
this->frame_id = (uint64_t*)((uint8_t*)this->addr + this->len);
|
||||
}
|
||||
|
||||
void VisionBuf::init_yuv(size_t init_width, size_t init_height, size_t init_stride, size_t init_uv_offset){
|
||||
this->width = init_width;
|
||||
this->height = init_height;
|
||||
this->stride = init_stride;
|
||||
this->uv_offset = init_uv_offset;
|
||||
|
||||
this->y = (uint8_t *)this->addr;
|
||||
this->uv = this->y + this->uv_offset;
|
||||
}
|
||||
|
||||
int VisionBuf::sync(int dir) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int VisionBuf::free() {
|
||||
int err = munmap(this->addr, this->mmap_len);
|
||||
if (err != 0) return err;
|
||||
|
||||
err = close(this->fd);
|
||||
return err;
|
||||
}
|
||||
|
||||
uint64_t VisionBuf::get_frame_id() {
|
||||
return *frame_id;
|
||||
}
|
||||
|
||||
void VisionBuf::set_frame_id(uint64_t id) {
|
||||
*frame_id = id;
|
||||
}
|
||||