-
Notifications
You must be signed in to change notification settings - Fork 10.4k
mac: fix setup and re-enable CI #23365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
650964d
rework mac_setup.sh
tecandrew 3ac7bc3
add wget
tecandrew 062f2c3
explicit python3. dont do onnx just yet
tecandrew 2ab607b
resource compiler
tecandrew bdc990e
replace acados Darwin lib w universal2 libs
tecandrew 6081c2e
relock Pipfile using linux machine
tecandrew 05242f8
Update update_requirements.sh
tecandrew 4eabc9f
Update update_requirements.sh
tecandrew e2fe689
ci: re-enable mac build
tecandrew 018f78a
attempt to fix ci build:
tecandrew 5a94b5c
oops
tecandrew ea714aa
only mac
tecandrew 50415af
k im lazy. does ci like this??
tecandrew 9088881
Merge branch 'fix-apple' of github.com:tecandrew/openpilot into fix-a…
tecandrew 775b880
huh??
tecandrew e45c6c8
* use curl
tecandrew 7c762b4
python version
tecandrew 1f9c430
how did the builds not use swig?
tecandrew c83159c
sometimes mac clang complain abt error limit
tecandrew 6bbd27a
ci: build OP in venv
tecandrew da81c2a
ci: bump to Big Sur
tecandrew cf6310e
* use macos-latest
tecandrew 2d1bff7
update macOS README
tecandrew f614e75
uh, maybe?
tecandrew 642ce6d
k nvm
tecandrew 69a4d27
ci: ok this is strange. might be scons bug?
tecandrew e6cefbe
fix conflicts: bump
tecandrew 832ca11
just add cppcheck for pre-commit stuff
tecandrew 9d8cec0
agane
tecandrew f15c2da
Merge branch 'master' into fix-apple
tecandrew 16c225f
cleanup
adeebshihadeh c5f3702
try that
eac9f66
fix path
256e19f
no pyenv update on mac
a0784b8
source
d87feb5
fix rpath prefix?
fafb2e2
no examples
ad70579
fix exit
aa47df4
let's get this cached
ce8a276
add virtualenvs to cache
07568a5
why did we cache that
0f0c27c
let's see what's big
4ac0a93
more
83ebd1e
always ruyn
e0b6dfd
cache scons cache
f9e8294
better cache key
12c650b
fix for partial hit
cdd8ee2
why so long
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,23 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| PYTHON_VERSION=3.8.10 | ||
| PYTHON_VER=3.8 | ||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
| ROOT="$(cd $DIR/../ && pwd)" | ||
| ARCH=$(uname -m) | ||
|
|
||
| # Install brew if required | ||
| if [[ $(command -v brew) == "" ]]; then | ||
| echo "Installing Hombrew" | ||
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
| fi | ||
|
|
||
| ## TODO remove protobuf,protobuf-c,swig when | ||
| ## casadi pip package is available | ||
| brew bundle --file=- <<-EOS | ||
| brew "cmake" | ||
| brew "git-lfs" | ||
| brew "zlib" | ||
| brew "bzip2" | ||
| brew "rust" | ||
| brew "rustup-init" | ||
| brew "capnp" | ||
| brew "coreutils" | ||
| brew "eigen" | ||
|
|
@@ -29,6 +31,9 @@ brew "openssl" | |
| brew "pyenv" | ||
| brew "qt@5" | ||
| brew "zeromq" | ||
| brew "protobuf" | ||
| brew "protobuf-c" | ||
tecandrew marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| brew "swig" | ||
| cask "gcc-arm-embedded" | ||
| EOS | ||
|
|
||
|
|
@@ -38,12 +43,6 @@ elif [[ $SHELL == "/bin/bash" ]]; then | |
| RC_FILE="$HOME/.bash_profile" | ||
| fi | ||
|
|
||
| # TODO: get rid of this somehow | ||
| # Build requirements for macOS | ||
| # https://github.com/pyenv/pyenv/issues/1740 | ||
| # https://github.com/pyca/cryptography/blob/main/docs/installation.rst | ||
| rustup-init -y | ||
|
|
||
| export LDFLAGS="$LDFLAGS -L/usr/local/opt/zlib/lib" | ||
| export LDFLAGS="$LDFLAGS -L/usr/local/opt/bzip2/lib" | ||
| export LDFLAGS="$LDFLAGS -L/usr/local/opt/[email protected]/lib" | ||
|
|
@@ -55,15 +54,35 @@ export PATH="$PATH:/usr/local/bin" | |
|
|
||
| # openpilot environment | ||
| if [ -z "$OPENPILOT_ENV" ] && [ -n "$RC_FILE" ] && [ -z "$CI" ]; then | ||
| echo "export PATH=\"\$PATH:$HOME/.cargo/bin\"" >> $RC_FILE | ||
| echo "source $ROOT/tools/openpilot_env.sh" >> $RC_FILE | ||
| export PATH="$PATH:\"\$HOME/.cargo/bin\"" | ||
| source "$ROOT/tools/openpilot_env.sh" | ||
| echo "Added openpilot_env to RC file: $RC_FILE" | ||
| fi | ||
|
|
||
| # install python dependencies | ||
| $ROOT/update_requirements.sh | ||
| $ROOT/update_requirements.sh || true | ||
|
|
||
| # install casadi | ||
| VENV=`pipenv --venv` | ||
| if [ ! -f "$VENV/include/casadi/casadi.hpp" ]; then | ||
| echo "-- casadi manual install" | ||
| cd /tmp/ && curl -L https://github.com/casadi/casadi/archive/refs/tags/ge6.tar.gz --output casadi.tar.gz | ||
| tar -xzf casadi.tar.gz | ||
| cd casadi-ge6/ && mkdir -p build && cd build | ||
| cmake .. \ | ||
| -DWITH_PYTHON=ON \ | ||
| -DCMAKE_INSTALL_PREFIX:PATH=$VENV \ | ||
| -DPYTHON_PREFIX:PATH=$VENV/lib/python$PYTHON_VER/site-packages \ | ||
| -DPYTHON_LIBRARY:FILEPATH=$HOME/.pyenv/versions/$PYTHON_VERSION/lib/libpython$PYTHON_VER.dylib \ | ||
| -DPYTHON_EXECUTABLE:FILEPATH=$HOME/.pyenv/versions/$PYTHON_VERSION/bin/python \ | ||
| -DPYTHON_INCLUDE_DIR:PATH=$HOME/.pyenv/versions/$PYTHON_VERSION/include/python$PYTHON_VER \ | ||
| -DCMAKE_CXX_FLAGS="-ferror-limit=0" -DCMAKE_C_FLAGS="-ferror-limit=0" | ||
| CFLAGS="-ferror-limit=0" make -j$(nproc) && make install | ||
| else | ||
| echo "---- 'casadi found in venv. skipping build ----" | ||
| fi | ||
|
|
||
| cd $ROOT | ||
|
|
||
| echo | ||
| echo "---- FINISH OPENPILOT SETUP ----" | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.