openpilot plugins #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: openpilot plugins | |
on: | |
push: | |
pull_request: | |
# needs to run on a schedule since we push commits here | |
# infrequently, but the macOS brew libs get updated frequently | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
ZIP: | | |
cd $GITHUB_WORKSPACE/build/bin | |
export PATH=/usr/local/opt/gnu-tar/libexec/gnubin:$PATH | |
sudo tar -czf $(uname -s)-$(uname -m).tar.gz plotjuggler lib* | |
jobs: | |
build_ubuntu: | |
name: build ubuntu | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ${{ fromJson( | |
((github.repository == 'commaai/plotjuggler') && | |
((github.event_name != 'pull_request') || | |
(github.event.pull_request.head.repo.full_name == 'commaai/plotjuggler'))) && '["x86_64", "aarch64"]' || '["x86_64"]' ) }} | |
runs-on: ${{ (matrix.arch == 'aarch64') && 'buildjet-4vcpu-ubuntu-2204-arm' || 'ubuntu-20.04' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: build | |
run: ./build.sh | |
- name: download capnp 0.7 | |
run: | | |
cd /tmp/ | |
mkdir tmp | |
wget http://launchpadlibrarian.net/472650221/libcapnp-0.7.0_0.7.0-6_amd64.deb | |
dpkg-deb -R lib*.deb tmp | |
sudo cp tmp/usr/lib/x86_64-linux-gnu/lib*.so $GITHUB_WORKSPACE/build/bin | |
- name: zip plugins | |
run: eval "$ZIP" | |
- name: upload | |
if: github.ref == 'refs/heads/comma-master' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/bin/*.tar.gz | |
file_glob: true | |
tag: "latest" | |
overwrite: true | |
build_mac: | |
name: build mac | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# # 15 = M1, 13 = Intel | |
# os: [macOS-13, macOS-15] | |
# runs-on: ${{ matrix.os }} | |
runs-on: macOS-15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11.x' | |
- name: setup dependencies | |
run: | | |
brew update --force | |
brew install cmake bzip2 capnp qt@5 zeromq protobuf@3 gnu-tar portaudio | |
brew upgrade | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
uv venv | |
uv pip install 3rdparty/openpilot 3rdparty/openpilot/opendbc_repo | |
- name: build | |
run: | | |
export PYTHONPATH=$PWD/3rdparty | |
# force usage of protobuf@3 instead of protobuf | |
source .venv/bin/activate | |
mkdir -p build && cd build && cmake -DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/protobuf@3" .. && make -j8 | |
- name: zip plugins | |
run: eval "$ZIP" | |
- name: upload | |
if: github.ref == 'refs/heads/comma-master' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/bin/*.tar.gz | |
file_glob: true | |
tag: "latest" | |
overwrite: true |