mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 09:13:46 +08:00
59a16b9cdc
# Conflicts: # .github/workflows/auto_pr_review.yaml # .github/workflows/badges.yaml # .github/workflows/mici_raylib_ui_preview.yaml # .github/workflows/prebuilt.yaml # .github/workflows/raylib_ui_preview.yaml # .github/workflows/release.yaml # .github/workflows/repo-maintenance.yaml # .github/workflows/tests.yaml # .gitignore # Dockerfile.openpilot_base # SConstruct # docs/CARS.md # opendbc_repo # panda # release/build_release.sh # selfdrive/modeld/SConscript # selfdrive/modeld/modeld.py # selfdrive/pandad/panda_safety.cc # selfdrive/pandad/pandad.cc # selfdrive/pandad/pandad.py # selfdrive/test/process_replay/process_replay.py # selfdrive/ui/layouts/onboarding.py # selfdrive/ui/mici/layouts/home.py # selfdrive/ui/tests/diff/replay.py # selfdrive/ui/tests/test_ui/raylib_screenshots.py # tools/mac_setup.sh # uv.lock
57 lines
2.0 KiB
YAML
57 lines
2.0 KiB
YAML
name: 'openpilot env setup'
|
|
|
|
inputs:
|
|
is_retried:
|
|
description: 'A mock param that asserts that we use the setup-with-retry instead of this action directly'
|
|
required: false
|
|
default: 'false'
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
# assert that this action is retried using the setup-with-retry
|
|
- shell: bash
|
|
if: ${{ inputs.is_retried == 'false' }}
|
|
run: |
|
|
echo "You should not run this action directly. Use setup-with-retry instead"
|
|
exit 1
|
|
|
|
- shell: bash
|
|
name: No retries!
|
|
run: |
|
|
if [ "${{ github.run_attempt }}" -gt ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.author_association == 'NONE' && 2 || 1}} ]; then
|
|
echo -e "\033[0;31m##################################################"
|
|
echo -e "\033[0;31m Retries not allowed! Fix the flaky test! "
|
|
echo -e "\033[0;31m##################################################\033[0m"
|
|
exit 1
|
|
fi
|
|
|
|
# build cache
|
|
- id: date
|
|
shell: bash
|
|
run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
|
|
- id: scons-cache
|
|
uses: ./.github/workflows/auto-cache
|
|
with:
|
|
path: /tmp/scons_cache
|
|
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
|
|
restore-keys: |
|
|
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}
|
|
scons-${{ runner.os }}-${{ runner.arch }}
|
|
# venv cache
|
|
- id: venv-cache
|
|
uses: ./.github/workflows/auto-cache
|
|
with:
|
|
path: ${{ github.workspace }}/.venv
|
|
key: venv-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('uv.lock') }}
|
|
restore-keys: |
|
|
venv-${{ runner.os }}-${{ runner.arch }}
|
|
- shell: bash
|
|
name: Run setup
|
|
run: ./tools/op.sh setup
|
|
- shell: bash
|
|
name: Setup cache dirs
|
|
run: |
|
|
mkdir -p /tmp/comma_download_cache
|
|
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
|