fuzzing-build.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Copyright (c) 2021 Project CHIP Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: Fuzzing Builds
  15. on:
  16. # For now, only manual triggers.
  17. workflow_dispatch:
  18. concurrency:
  19. group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
  20. cancel-in-progress: true
  21. env:
  22. CHIP_NO_LOG_TIMESTAMPS: true
  23. jobs:
  24. build_linux_fuzzing:
  25. name: Build on Linux
  26. runs-on: ubuntu-latest
  27. if: github.actor != 'restyled-io[bot]'
  28. container:
  29. image: ghcr.io/project-chip/chip-build:1
  30. volumes:
  31. - "/tmp/log_output:/tmp/test_logs"
  32. steps:
  33. - name: Checkout
  34. uses: actions/checkout@v4
  35. - run: apt-get update
  36. - run: apt-get install --fix-missing llvm-10 clang-10
  37. - name: Try to ensure the objdir-clone dir exists
  38. run: |
  39. mkdir objdir-clone || true
  40. - name: Bootstrap Cache
  41. uses: ./.github/actions/bootstrap-cache
  42. - name: Bootstrap
  43. uses: ./.github/actions/bootstrap
  44. - name: Upload Bootstrap Logs
  45. uses: ./.github/actions/upload-bootstrap-logs
  46. - name: Build all-clusters-app
  47. run: |
  48. ./scripts/run_in_build_env.sh \
  49. "./scripts/build/build_examples.py \
  50. --target linux-x64-all-clusters-no-ble-libfuzzer \
  51. build \
  52. --copy-artifacts-to objdir-clone \
  53. "
  54. - name: Uploading binaries
  55. uses: actions/upload-artifact@v3
  56. if: ${{ !env.ACT }}
  57. with:
  58. name: objdir-linux
  59. path: objdir-clone/
  60. # objdirs are big; don't hold on to them too long.
  61. retention-days: 5
  62. build_darwin_fuzzing:
  63. name: Build on Darwin
  64. runs-on: macos-latest
  65. if: github.actor != 'restyled-io[bot]'
  66. steps:
  67. - name: Checkout
  68. uses: actions/checkout@v4
  69. - name: Setup Environment
  70. run: brew install llvm
  71. - name: Try to ensure the objdir-clone dir exists
  72. run: |
  73. mkdir objdir-clone || true
  74. - name: Bootstrap Cache
  75. uses: ./.github/actions/bootstrap-cache
  76. - name: Bootstrap
  77. uses: ./.github/actions/bootstrap
  78. - name: Upload Bootstrap Logs
  79. uses: ./.github/actions/upload-bootstrap-logs
  80. - name: Build all-clusters-app
  81. run: |
  82. ./scripts/run_in_build_env.sh \
  83. "./scripts/build/build_examples.py \
  84. --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \
  85. build \
  86. --copy-artifacts-to objdir-clone \
  87. "
  88. - name: Uploading binaries
  89. uses: actions/upload-artifact@v3
  90. if: ${{ !env.ACT }}
  91. with:
  92. name: crash-darwin
  93. path: objdir-clone/
  94. # objdirs are big; don't hold on to them too long.
  95. retention-days: 5