c-cpp.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: C/C++ CI
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. strategy:
  6. matrix:
  7. os: [macos-latest, ubuntu-latest]
  8. fail-fast: false
  9. runs-on: ${{ matrix.os }}
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. submodules: recursive
  14. - name: Install Protoc
  15. uses: arduino/setup-protoc@v1
  16. with:
  17. repo-token: ${{ secrets.GITHUB_TOKEN }} # https://github.com/arduino/setup-protoc/issues/6
  18. - name: Setup cmake
  19. uses: jwlawson/actions-setup-cmake@v1.4
  20. with:
  21. cmake-version: '3.18.x'
  22. - name: Install avachi libraries (mDNS), mbedtls and asound
  23. run: sudo apt-get install libavahi-compat-libdnssd-dev libasound2-dev libmbedtls-dev
  24. if: ${{ matrix.os == 'ubuntu-latest' }}
  25. - name: Install openssl on macos
  26. run: |
  27. brew install mbedtls@3
  28. brew link --force mbedtls@3
  29. brew install portaudio
  30. brew link --force portaudio
  31. export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/Cellar/portaudio/19.6.0/lib/pkgconfig"
  32. pkg-config --modversion portaudio-2.0
  33. echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
  34. if: ${{ matrix.os == 'macos-latest' }}
  35. - name: Install python dependencies
  36. run: python3 -m pip install --upgrade pip setuptools wheel
  37. - name: Install grpcio-tools
  38. run: sudo pip3 install grpcio-tools
  39. - name: cmake
  40. run: mkdir -p build && cd build && cmake ..
  41. - name: make
  42. run: cd build && make