# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Fuzzing Builds

on:
    # For now, only manual triggers.
    workflow_dispatch:

concurrency:
    group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
    cancel-in-progress: true

env:
    CHIP_NO_LOG_TIMESTAMPS: true
    # XXX: Workaround for https://github.com/actions/cache/issues/1141
    SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3

jobs:
    build_linux_fuzzing:
        name: Build on Linux
        timeout-minutes: 90

        runs-on: ubuntu-latest
        if: github.actor != 'restyled-io[bot]'

        container:
            image: connectedhomeip/chip-build:0.7.3
            volumes:
                - "/tmp/log_output:/tmp/test_logs"

        steps:
            - uses: Wandalen/wretry.action@v1.0.41
              name: Checkout
              with:
                  action: actions/checkout@v3.5.2
                  with: |
                      submodules: true
                      token: ${{ github.token }}
                  attempt_limit: 3
                  attempt_delay: 2000
            - run: apt-get update
            - run: apt-get install --fix-missing llvm-10 clang-10
            - name: Try to ensure the objdir-clone dir exists
              run: |
                  mkdir objdir-clone || true

            - uses: Wandalen/wretry.action@v1.0.41
              name: Bootstrap cache
              timeout-minutes: 20
              with:
                action: buildjet/cache@v3
                attempt_limit: 3
                attempt_delay: 2000
                with: |
                    key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
                    path: |
                        .environment
                        build_overrides/pigweed_environment.gni
            - name: Bootstrap
              timeout-minutes: 10
              run: bash scripts/bootstrap.sh
            - name: Uploading bootstrap logs
              uses: actions/upload-artifact@v3
              if: ${{ always() && !env.ACT }}
              with:
                  name: bootstrap-logs
                  path: |
                      .environment/gn_out/.ninja_log
                      .environment/pigweed-venv/*.log

            - name: Build all-clusters-app
              timeout-minutes: 20
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --target linux-x64-all-clusters-no-ble-libfuzzer \
                        build \
                        --copy-artifacts-to objdir-clone \
                     "
            - name: Uploading binaries
              uses: actions/upload-artifact@v3
              if: ${{ !env.ACT }}
              with:
                  name: objdir-linux
                  path: objdir-clone/
                  # objdirs are big; don't hold on to them too long.
                  retention-days: 5

    build_darwin_fuzzing:
        name: Build on Darwin
        timeout-minutes: 90
        runs-on: macos-latest
        if: github.actor != 'restyled-io[bot]'

        steps:
            - uses: Wandalen/wretry.action@v1.0.41
              name: Checkout
              with:
                  action: actions/checkout@v3.5.2
                  with: |
                      submodules: true
                      token: ${{ github.token }}
                  attempt_limit: 3
                  attempt_delay: 2000
            - name: Setup Environment
              run: brew install llvm
            - name: Try to ensure the objdir-clone dir exists
              run: |
                  mkdir objdir-clone || true

            - uses: Wandalen/wretry.action@v1.0.41
              name: Bootstrap cache
              timeout-minutes: 20
              with:
                action: buildjet/cache@v3
                attempt_limit: 3
                attempt_delay: 2000
                with: |
                    key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
                    path: |
                        .environment
                        build_overrides/pigweed_environment.gni
            - name: Bootstrap
              timeout-minutes: 25
              run: bash scripts/bootstrap.sh
            - name: Uploading bootstrap logs
              uses: actions/upload-artifact@v3
              if: ${{ always() && !env.ACT }}
              with:
                  name: bootstrap-logs
                  path: |
                      .environment/gn_out/.ninja_log
                      .environment/pigweed-venv/*.log

            - name: Build all-clusters-app
              timeout-minutes: 20
              run: |
                  ./scripts/run_in_build_env.sh \
                     "./scripts/build/build_examples.py \
                        --target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \
                        build \
                        --copy-artifacts-to objdir-clone \
                     "
            - name: Uploading binaries
              uses: actions/upload-artifact@v3
              if: ${{ !env.ACT }}
              with:
                  name: crash-darwin
                  path: objdir-clone/
                  # objdirs are big; don't hold on to them too long.
                  retention-days: 5
