diff --git a/.github/workflows/lib.json b/.github/workflows/lib.json index 064d4967f3c..c237537bd38 100644 --- a/.github/workflows/lib.json +++ b/.github/workflows/lib.json @@ -1,7 +1,6 @@ [ { "name": "Adafruit NeoPixel", - "version": "1.10.6", "exclude_targets": [], "sketch_path": [ "~/Arduino/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino" diff --git a/.github/workflows/lib.yml b/.github/workflows/lib.yml index 8f7756abaf3..94e09c64d51 100644 --- a/.github/workflows/lib.yml +++ b/.github/workflows/lib.yml @@ -72,23 +72,6 @@ jobs: name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} path: ${{ env.SKETCHES_REPORTS_PATH }} - report-comment: - needs: compile-sketch # Wait for the compile job to finish to get the data for the report - if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request - runs-on: ubuntu-latest - steps: - # This step is needed to get the size data produced by the compile jobs - - name: Download sketches reports artifact - uses: actions/download-artifact@v3 - with: - name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} - path: ${{ env.SKETCHES_REPORTS_PATH }} - - - name: Report results - uses: P-R-O-C-H-Y/report-size-deltas@main - with: - sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} - report-to-file: needs: compile-sketch # Wait for the compile job to finish to get the data for the report if: github.event_name == 'schedule' # Only run the job when the workflow is triggered by a schedule @@ -126,3 +109,16 @@ jobs: git add ${{ env.RESULT_LIBRARY_TEST_FILE }} git commit -m "Generated External Libraries Test Results" git push + + event_file: + name: "Event File" + if: | + contains(github.event.pull_request.labels.*.name, 'lib_test') + needs: compile-sketch + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Event File + path: ${{github.event_path}} diff --git a/.github/workflows/publishlib.yml b/.github/workflows/publishlib.yml new file mode 100644 index 00000000000..e4c75aefe34 --- /dev/null +++ b/.github/workflows/publishlib.yml @@ -0,0 +1,41 @@ +name: External Libraries Results + +on: + workflow_run: + workflows: [External Libraries Test] + types: + - completed + + workflow_dispatch: +env: + # It's convenient to set variables for values used multiple times in the workflow + SKETCHES_REPORTS_PATH: artifacts/libraries-report + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_EVENT_PATH: artifacts/Event File/event.json + +jobs: + lib-test-results: + name: External Libraries Test Results + runs-on: ubuntu-latest + if: | + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' + + steps: + - name: Download and Extract Artifacts + run: | + mkdir -p artifacts && cd artifacts + artifacts_url=${{ github.event.workflow_run.artifacts_url }} + gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact + do + IFS=$'\t' read name url <<< "$artifact" + gh api $url > "$name.zip" + unzip -d "$name" "$name.zip" + done + + - name: Report results + uses: P-R-O-C-H-Y/report-size-deltas@main + with: + sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} + github-token: ${{ env.GITHUB_TOKEN }} + pr-event-path: ${{ env.PR_EVENT_PATH }}