build-test-ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # GitHub actions workflow.
  2. # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
  3. name: Build+Test CI
  4. on:
  5. push:
  6. branches: [main]
  7. schedule:
  8. # The GH mirroring from Google GoB does not trigger push actions.
  9. # Fire it every other day to provide some coverage. This will run ~8 AM PT.
  10. - cron: '39 3 */2 * *'
  11. # Allow for manual triggers from the web.
  12. workflow_dispatch:
  13. jobs:
  14. autotools:
  15. strategy:
  16. fail-fast: false
  17. matrix:
  18. include:
  19. - os: ubuntu-latest
  20. cc: gcc
  21. cxx: g++
  22. - os: ubuntu-latest
  23. cc: clang
  24. cxx: clang++
  25. - os: macos-latest
  26. cc: clang
  27. cxx: clang++
  28. runs-on: ${{ matrix.os }}
  29. env:
  30. CC: ${{ matrix.cc }}
  31. CXX: ${{ matrix.cxx }}
  32. steps:
  33. - name: System settings
  34. run: |
  35. set -x
  36. $CC --version
  37. $CXX --version
  38. getconf _NPROCESSORS_ONLN
  39. getconf _NPROCESSORS_CONF
  40. true
  41. - name: Checkout depot_tools
  42. run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
  43. - name: Checkout breakpad
  44. run: |
  45. set -xe
  46. PATH+=:$PWD/../depot_tools
  47. gclient config --unmanaged --name=src https://github.com/${{ github.repository }}
  48. gclient sync --no-history --nohooks
  49. # First build & test in-tree.
  50. - run: ./configure --disable-silent-rules
  51. working-directory: src
  52. - run: make -j$(getconf _NPROCESSORS_CONF)
  53. working-directory: src
  54. - run: make -j$(getconf _NPROCESSORS_CONF) check VERBOSE=1
  55. working-directory: src
  56. - run: make -j$(getconf _NPROCESSORS_CONF) distclean
  57. working-directory: src
  58. # Then build & test out-of-tree.
  59. - run: mkdir -p src/build/native
  60. - run: ../../configure --disable-silent-rules
  61. working-directory: src/build/native
  62. - run: make -j$(getconf _NPROCESSORS_CONF) distcheck VERBOSE=1
  63. working-directory: src/build/native