Build openpilot on mac in CI (#1792)

* build on mac in CI

* coreutils

* python stuff

* pipenv

* newer clang

* init pyenv

* verbose

* init pyenv

* install eigen

* ffmpeg

* sdl

* libav

* libtool

* glfw

* add pipfile as cache key

* test cache

* fix cache path

* brew link

* update tools readme

* don't cache on pipfile

* skip python install if installed

* unlink

* simpler cachingm

* here's your key

* cache pip too

* cache pyenv
old-commit-hash: c450110f96
commatwo_master
Adeeb Shihadeh 5 years ago committed by GitHub
parent 3e1132ae81
commit 355e4a40a6
  1. 25
      .github/workflows/test.yaml
  2. 14
      tools/README.md
  3. 26
      tools/mac_setup.sh

@ -48,6 +48,31 @@ jobs:
scons -j$(nproc) && \ scons -j$(nproc) && \
$UNIT_TEST selfdrive/car" $UNIT_TEST selfdrive/car"
build_mac:
name: build macos
runs-on: macos-10.15
timeout-minutes: 35
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache dependencies
id: dependency-cache
uses: actions/cache@v2
with:
path: |
~/.pyenv
~/Library/Caches/pip
~/Library/Caches/pipenv
~/Library/Caches/Homebrew
key: ${{ hashFiles('tools/mac_setup.sh') }}
- name: Install dependencies
run: ./tools/mac_setup.sh
- name: Build openpilot
run: eval "$(pyenv init -)" && scons -j$(nproc)
- name: Brew cleanup
run: brew cleanup # keeps our cache small
docker_push: docker_push:
name: docker push name: docker push
runs-on: ubuntu-16.04 runs-on: ubuntu-16.04

@ -24,23 +24,15 @@ Table of Contents
Requirements Requirements
============ ============
openpilot tools and the following setup steps are developed and tested on Ubuntu 16.04, MacOS 10.14.2 and Python 3.7.3. openpilot tools and the following setup steps are developed and tested on Ubuntu 16.04, MacOS 10.14.2 and Python 3.8.2.
Setup Setup
============ ============
1. Run ubuntu_setup.sh, make sure everything completed correctly 1. Run `ubuntu_setup.sh` or `mac_setup.sh`, make sure everything completed correctly
2. Compile openpilot by running ```scons``` in the openpilot directory 2. Compile openpilot by running ```scons``` in the openpilot directory
3. Add some folders to root 3. Try out some tools!
```bash
sudo mkdir /data
sudo mkdir /data/params
sudo chown $USER /data/params
```
4. Try out some tools!
Tool examples Tool examples

@ -0,0 +1,26 @@
#!/bin/bash -e
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install capnp \
czmq \
coreutils \
eigen \
ffmpeg \
glfw \
libarchive \
libtool \
llvm \
pyenv \
zeromq
# install python
pyenv install -s 3.8.2
pyenv global 3.8.2
pyenv rehash
eval "$(pyenv init -)"
pip install pipenv==2018.11.26
pipenv install --system --deploy
Loading…
Cancel
Save