mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 18:12:05 +08:00
September 27th, 2025 Update
This commit is contained in:
@@ -3,6 +3,14 @@ name: Compile FrogPilot
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
runner:
|
||||
description: "Select the runner"
|
||||
required: true
|
||||
default: "c3"
|
||||
type: choice
|
||||
options:
|
||||
- c3
|
||||
- c3x
|
||||
not_vetted:
|
||||
description: "This branch is not vetted"
|
||||
required: false
|
||||
@@ -46,7 +54,9 @@ env:
|
||||
|
||||
jobs:
|
||||
get_branch:
|
||||
runs-on: [self-hosted, c3x]
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ${{ github.event.inputs.runner }}
|
||||
outputs:
|
||||
branch: ${{ steps.get_branch.outputs.branch }}
|
||||
python_version: ${{ steps.get_python_version.outputs.python_version }}
|
||||
@@ -108,7 +118,9 @@ jobs:
|
||||
|
||||
- name: Vet Existing Translations
|
||||
if: github.event.inputs.vet_existing_translations == 'true'
|
||||
continue-on-error: true
|
||||
run: python selfdrive/ui/translations/auto_translate.py --all-files --vet-translations
|
||||
timeout-minutes: 300
|
||||
|
||||
- name: Commit and Push Translation Updates
|
||||
run: |
|
||||
@@ -128,7 +140,9 @@ jobs:
|
||||
- get_branch
|
||||
- translate
|
||||
if: always()
|
||||
runs-on: [self-hosted, c3x]
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ${{ github.event.inputs.runner }}
|
||||
permissions:
|
||||
contents: write
|
||||
defaults:
|
||||
@@ -185,19 +199,12 @@ jobs:
|
||||
rm -f panda/board/obj/version
|
||||
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.cc' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.onnx' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
|
||||
find . -name '*.h' | while read -r header; do
|
||||
if [[ "$header" != *"common/version.h" && "$header" != *"system/camerad/sensors/"* ]]; then
|
||||
rm -f "$header"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf .devcontainer/
|
||||
rm -rf .vscode/
|
||||
rm -rf body/
|
||||
@@ -215,7 +222,7 @@ jobs:
|
||||
-name 'review_pull_request.yaml' -o \
|
||||
-name 'schedule_update.yaml' -o \
|
||||
-name 'update_pr_branch.yaml' -o \
|
||||
-name 'update_release_branch.yaml' \
|
||||
-name 'update_release_branch.yaml' -o \
|
||||
-name 'update_tinygrad.yaml' \
|
||||
\) \
|
||||
\) -exec rm -rf {} +
|
||||
|
||||
@@ -69,21 +69,25 @@ jobs:
|
||||
- name: Update README Date and Remove update file
|
||||
run: |
|
||||
DAY=$(TZ="${{ env.TZ }}" date +'%d' | sed 's/^0//')
|
||||
|
||||
case "$DAY" in
|
||||
1|21|31) SUFFIX="st" ;;
|
||||
2|22) SUFFIX="nd" ;;
|
||||
3|23) SUFFIX="rd" ;;
|
||||
*) SUFFIX="th" ;;
|
||||
2|22) SUFFIX="nd" ;;
|
||||
3|23) SUFFIX="rd" ;;
|
||||
*) SUFFIX="th" ;;
|
||||
esac
|
||||
|
||||
MONTH=$(TZ="${{ env.TZ }}" date +'%B')
|
||||
YEAR=$(TZ="${{ env.TZ }}" date +'%Y')
|
||||
NEW_DATE="**${MONTH} ${DAY}${SUFFIX}, ${YEAR}**"
|
||||
|
||||
sed -i "/FrogPilot was last updated on:/ { N; N; s/\(\n\)\n.*$/\1\n${NEW_DATE}/; }" README.md
|
||||
DATE="${MONTH} ${DAY}${SUFFIX}, ${YEAR}"
|
||||
DATE_ESCAPED=$(printf '%s' "$DATE" | sed -E 's/ /%20/g; s/,/%2C/g')
|
||||
|
||||
sed -i -E "s|(Last%20Updated-)[^-)]*|\1${DATE_ESCAPED}|g" README.md
|
||||
|
||||
git add README.md
|
||||
git rm -f "${{ env.UPDATE_FILE }}"
|
||||
git commit -m "Updated README date to ${NEW_DATE}"
|
||||
git commit -m "Updated README date to ${DATE}"
|
||||
|
||||
- name: Squash Commits
|
||||
run: |
|
||||
|
||||
@@ -2,11 +2,22 @@ name: Update Tinygrad
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
runner:
|
||||
description: "Select the runner"
|
||||
required: true
|
||||
default: "c3"
|
||||
type: choice
|
||||
options:
|
||||
- c3
|
||||
- c3x
|
||||
|
||||
jobs:
|
||||
update_tinygrad:
|
||||
name: Update Tinygrad
|
||||
runs-on: [self-hosted, c3x]
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ${{ github.event.inputs.runner }}
|
||||
|
||||
steps:
|
||||
- name: Get version
|
||||
@@ -14,32 +25,43 @@ jobs:
|
||||
run: |
|
||||
VERSION=$(grep -oP '^VERSION\s*=\s*"\K[^"]+' /data/openpilot/frogpilot/assets/model_manager.py)
|
||||
echo "VERSION=$VERSION"
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Clone GitLab repo
|
||||
env:
|
||||
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
|
||||
run: |
|
||||
rm -rf /data/tmp/frogpilot_tinygrad
|
||||
mkdir -p /data/tmp/frogpilot_tinygrad
|
||||
cd /data/tmp/frogpilot_tinygrad
|
||||
git clone --depth 1 --branch Tinygrad https://oauth2:${GITLAB_TOKEN}@gitlab.com/FrogAi/FrogPilot-Resources.git
|
||||
|
||||
git clone --depth 1 --branch Tinygrad "https://oauth2:${GITLAB_TOKEN}@gitlab.com/FrogAi/FrogPilot-Resources.git"
|
||||
|
||||
- name: Create Tinygrad Archive
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd /data/openpilot
|
||||
|
||||
ARCHIVE_DIR="/data/tmp/frogpilot_tinygrad/FrogPilot-Resources"
|
||||
ARCHIVE_NAME="Tinygrad_${{ steps.get_version.outputs.version }}.tar.gz"
|
||||
|
||||
tar -czf "/data/tmp/frogpilot_tinygrad/FrogPilot-Resources/$ARCHIVE_NAME" \
|
||||
TMPDIR="$(mktemp -d)"
|
||||
touch "$TMPDIR/SConscript"
|
||||
|
||||
tar -czf "$ARCHIVE_NAME" \
|
||||
--exclude="*.a" \
|
||||
--exclude="*.cc" \
|
||||
--exclude="*.h" \
|
||||
--exclude="*.o" \
|
||||
--exclude="*.onnx" \
|
||||
--exclude="*.pkl" \
|
||||
--exclude="*__pycache__*" \
|
||||
--exclude="*tests*" \
|
||||
frogpilot/tinygrad_modeld tinygrad tinygrad_repo
|
||||
--exclude="frogpilot/tinygrad_modeld/SConscript" \
|
||||
frogpilot/tinygrad_modeld tinygrad_repo \
|
||||
-C "$TMPDIR" \
|
||||
--transform 's|^SConscript$|frogpilot/tinygrad_modeld/SConscript|' \
|
||||
SConscript
|
||||
|
||||
mv "$ARCHIVE_NAME" "$ARCHIVE_DIR/"
|
||||
rm -rf "$TMPDIR"
|
||||
|
||||
- name: Push updated Tinygrad
|
||||
run: |
|
||||
@@ -49,7 +71,7 @@ jobs:
|
||||
git config user.email "91348155+FrogAi@users.noreply.github.com"
|
||||
|
||||
git add Tinygrad_*.tar.gz
|
||||
git commit -m "Updated Tinygrad: ${{ steps.get_version.outputs.version }}"
|
||||
git commit -m "Updated Tinygrad: ${{ steps.get_version.outputs.version }}" || echo "No changes to commit"
|
||||
git push origin Tinygrad
|
||||
|
||||
- name: Cleanup temporary files
|
||||
|
||||
Reference in New Issue
Block a user