From 8e0bb6a7cee869b9aa6a724b20ab8d79141eaad4 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 5 Oct 2020 00:03:20 +0200 Subject: [PATCH] Fix MacOS CI (#2145) * compile flag for cython * fix more setups * bump cereal * reenable mac build * don't let that fail the build Co-authored-by: Adeeb Shihadeh --- .github/workflows/test.yaml | 48 ++++++++++++++-------------- common/common_pyx_setup.py | 2 +- common/kalman/simple_kalman_setup.py | 4 ++- common/transformations/setup.py | 2 +- selfdrive/boardd/boardd_setup.py | 2 +- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5a81222253..a5f958f3c6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,30 +52,30 @@ jobs: scons -j$(nproc) && \ $UNIT_TEST selfdrive/car" - #build_mac: - # name: build macos - # runs-on: macos-10.15 - # timeout-minutes: 60 - # 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 + build_mac: + name: build macos + runs-on: macos-10.15 + timeout-minutes: 60 + 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 || true # keeps our cache small docker_push: name: docker push diff --git a/common/common_pyx_setup.py b/common/common_pyx_setup.py index 9d0f0fec8b..52252521fa 100644 --- a/common/common_pyx_setup.py +++ b/common/common_pyx_setup.py @@ -4,7 +4,7 @@ from Cython.Build import cythonize from common.cython_hacks import BuildExtWithoutPlatformSuffix sourcefiles = ['clock.pyx'] -extra_compile_args = ["-std=c++11"] +extra_compile_args = ["-std=c++11", "-Wno-nullability-completeness"] setup(name='Common', cmdclass={'build_ext': BuildExtWithoutPlatformSuffix}, diff --git a/common/kalman/simple_kalman_setup.py b/common/kalman/simple_kalman_setup.py index fb4886a0f2..27a700f25f 100644 --- a/common/kalman/simple_kalman_setup.py +++ b/common/kalman/simple_kalman_setup.py @@ -6,4 +6,6 @@ from common.cython_hacks import BuildExtWithoutPlatformSuffix setup(name='Simple Kalman Implementation', cmdclass={'build_ext': BuildExtWithoutPlatformSuffix}, - ext_modules=cythonize(Extension("simple_kalman_impl", ["simple_kalman_impl.pyx"]))) + ext_modules=cythonize(Extension("simple_kalman_impl", + ["simple_kalman_impl.pyx"], + extra_compile_args=["-Wno-nullability-completeness"]))) diff --git a/common/transformations/setup.py b/common/transformations/setup.py index c239a97450..1881d8da1f 100644 --- a/common/transformations/setup.py +++ b/common/transformations/setup.py @@ -36,7 +36,7 @@ setup( "transformations", sources=["transformations.pyx"], language="c++", - extra_compile_args=["-std=c++14"], + extra_compile_args=["-std=c++14", "-Wno-nullability-completeness"], include_dirs=[numpy.get_include()], ) )) diff --git a/selfdrive/boardd/boardd_setup.py b/selfdrive/boardd/boardd_setup.py index 4b08590183..4d272d9bf9 100644 --- a/selfdrive/boardd/boardd_setup.py +++ b/selfdrive/boardd/boardd_setup.py @@ -16,7 +16,7 @@ setup(name='Boardd API Implementation', ], sources=['boardd_api_impl.pyx'], language="c++", - extra_compile_args=["-std=c++11"], + extra_compile_args=["-std=c++11", "-Wno-nullability-completeness"], ) ) )