diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index fff7a9f..024acea 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -233,15 +233,18 @@ jobs: repository/build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin repository/build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf - build-analyze: + build-and-analyze: runs-on: ubuntu-latest env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory + SONAR_SCANNER_VERSION: 4.4.0.2170 + SONAR_CACHE_DIR: sonar_cache name: allfeatures needs: - checkout-history - install-idf - install-sonar-build-wrapper + - install-sonar-scanner steps: - name: Cache repository uses: actions/cache@v2 @@ -343,89 +346,6 @@ jobs: repository/build_allfeatures/bobbyquad_allfeatures.bin repository/build_allfeatures/bobbyquad_allfeatures.elf - analyze: - runs-on: ubuntu-latest - env: - SONAR_SCANNER_VERSION: 4.4.0.2170 - BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory - SONAR_CACHE_DIR: sonar_cache - name: Analyze - needs: - - checkout-history - - install-sonar-scanner - - build-analyze - steps: - - name: Cache sonar-build-wrapper-output - uses: actions/cache@v2 - id: cache-sonar-build-wrapper-output - with: - path: repository - key: ${{ runner.os }}-sonar-build-wrapper-output-${{ github.sha }} - - - name: Verify that "Cache sonar-build-wrapper-output" had a hit - # GitHub doesnt support if - #if: steps.cache-sonar-build-wrapper-output.outputs.cache-hit != 'true' - #run: git submodule update --init --recursive ${{ inputs.submodule }} - run: | - if echo ${{ steps.cache-sonar-build-wrapper-output.outputs.cache-hit }} | grep -c "true" - then - echo "Cache sonar-build-wrapper-output had a hit, good" - else - echo "Cache sonar-build-wrapper-output did not hit? Did the prepare step run successfully?" - exit 1 - fi - - - name: Get esp-idf release name - id: get-esp-idf-release - uses: 0xFEEDC0DE64/get_latest_tag@main - with: - repo: repository/esp-idf - - - name: Cache .espressif - id: cache-espressif - uses: actions/cache@v2 - with: - path: ~/.espressif - key: ${{ runner.os }}-espressif-${{ steps.get-esp-idf-release.outputs.tag_name }} - - - name: Verify that "Cache .espressif" had a hit - # GitHub doesnt support if - #if: steps.cache-espressif.outputs.cache-hit != 'true' - #run: git submodule update --init --recursive ${{ inputs.submodule }} - run: | - if echo ${{ steps.cache-espressif.outputs.cache-hit }} | grep -c "true" - then - echo "Cache .espressif had a hit, good" - else - echo "Cache .espressif did not hit? Did the prepare step run successfully?" - exit 1 - fi - - - name: Cache sonar-scanner - uses: actions/cache@v2 - id: cache-sonar-scanner - with: - path: sonar-scanner - key: ${{ runner.os }}-sonar-scanner-${{ env.SONAR_SCANNER_VERSION }} - - - name: Verify that "Cache sonar-scanner" had a hit - # GitHub doesnt support if - #if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' - #run: git submodule update --init --recursive ${{ inputs.submodule }} - run: | - if echo ${{ steps.cache-sonar-scanner.outputs.cache-hit }} | grep -c "true" - then - echo "Cache sonar-scanner had a hit, good" - else - echo "Cache sonar-scanner did not hit? Did the prepare step run successfully?" - exit 1 - fi - - - name: Set up JDK 11 (for Sonar) - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Setup sonar-scanner run: echo "$(pwd)/sonar-scanner/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH