diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b9336dc0fb3603..21d232c37fa90b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -118,12 +118,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true - #- name: Initialize CodeQL - # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - # uses: github/codeql-action/init@v1 - # with: - # languages: "cpp" - + - name: Initialize CodeQL + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + uses: github/codeql-action/init@v1 + with: + languages: "cpp" - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -188,15 +187,15 @@ jobs: # - name: Upload Code Coverage # if: ${{ contains('main', env.BUILD_TYPE) }} # run: bash <(curl -s https://codecov.io/bash) - # - name: Remove third_party binaries for CodeQL Analysis - # run: find out -type d -name "third_party" -exec rm -rf {} + - # - name: Remove dbus binaries for CodeQL Analysis - # run: find out -type d -name "dbus" -exec rm -rf {} + - # - name: Remove nrfxlib binaries for CodeQL Analysis - # run: find . -type d -name "nrfxlib" -exec rm -rf {} + - # - name: Perform CodeQL Analysis - # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - # uses: github/codeql-action/analyze@v1 + - name: Remove third_party binaries for CodeQL Analysis + run: find out -type d -name "third_party" -exec rm -rf {} + + - name: Remove dbus binaries for CodeQL Analysis + run: find out -type d -name "dbus" -exec rm -rf {} + + - name: Remove nrfxlib binaries for CodeQL Analysis + run: find . -type d -name "nrfxlib" -exec rm -rf {} + + - name: Perform CodeQL Analysis + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + uses: github/codeql-action/analyze@v1 build_linux_python_lib: name: Build on Linux (python_lib) timeout-minutes: 60 @@ -250,6 +249,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true + - name: Initialize CodeQL + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + uses: github/codeql-action/init@v1 + with: + languages: "cpp" - name: Setup Environment run: brew install openssl pkg-config - name: Try to ensure the directory for diagnostic log collection exists @@ -304,6 +308,8 @@ jobs: with: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 # - name: Run Code Coverage