diff options
| author | hathach <[email protected]> | 2026-02-10 23:45:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-02-10 23:51:55 +0700 |
| commit | 39b157d22f8a82264f07cdd31396c15b7a9c9e6d (patch) | |
| tree | 1853a5a47d38442e1d70e3ba9a8a968736a04f73 /.github/workflows | |
| parent | 4b8f476d52ab0bb518b851ba22323658fb978768 (diff) | |
add membrowse-upload target and use it in ci after build
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 92 | ||||
| -rw-r--r-- | .github/workflows/build_util.yml | 14 | ||||
| -rw-r--r-- | .github/workflows/membrowse-report.yml | 1 |
3 files changed, 57 insertions, 50 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 352875a9d..2b0c38c4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,9 @@ jobs: build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }} build-options: '--one-first' upload-metrics: true - upload-artifacts: true + upload-artifacts: false + upload-membrowse: true + secrets: inherit code-metrics: needs: cmake @@ -337,47 +339,47 @@ jobs: # Push: always runs (uses identical for doc-only to maintain commit chain) # PR: only runs if code changed (doc-only PRs skip entirely) # --------------------------------------- - membrowse: - needs: [check-paths, cmake] - if: | - always() && !cancelled() && ( - github.event_name == 'push' || - github.event_name == 'release' || - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && needs.check-paths.outputs.code_changed == 'true') - ) - permissions: - contents: read - actions: read - uses: ./.github/workflows/membrowse-report.yml - with: - code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - secrets: inherit - - membrowse-comment: - needs: membrowse - # skip membrowse comment since it is too verbal - if: false && github.event_name == 'pull_request' - runs-on: ubuntu-latest - permissions: - contents: read - actions: read - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Download report artifacts - id: download - uses: actions/download-artifact@v5 - with: - pattern: membrowse-report-* - path: reports - merge-multiple: true - continue-on-error: true - - - name: Upload Membrowse Comment Artifact - if: steps.download.outcome == 'success' - uses: actions/upload-artifact@v5 - with: - name: membrowse-comment - path: reports/ +# membrowse: +# needs: [check-paths, cmake] +# if: | +# always() && !cancelled() && ( +# github.event_name == 'push' || +# github.event_name == 'release' || +# github.event_name == 'workflow_dispatch' || +# (github.event_name == 'pull_request' && needs.check-paths.outputs.code_changed == 'true') +# ) +# permissions: +# contents: read +# actions: read +# uses: ./.github/workflows/membrowse-report.yml +# with: +# code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} +# secrets: inherit +# +# membrowse-comment: +# needs: membrowse +# # skip membrowse comment since it is too verbal +# if: false && github.event_name == 'pull_request' +# runs-on: ubuntu-latest +# permissions: +# contents: read +# actions: read +# steps: +# - name: Checkout repository +# uses: actions/checkout@v6 +# +# - name: Download report artifacts +# id: download +# uses: actions/download-artifact@v5 +# with: +# pattern: membrowse-report-* +# path: reports +# merge-multiple: true +# continue-on-error: true +# +# - name: Upload Membrowse Comment Artifact +# if: steps.download.outcome == 'success' +# uses: actions/upload-artifact@v5 +# with: +# name: membrowse-comment +# path: reports/ diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml index e62c10ca1..8a3dd8f91 100644 --- a/.github/workflows/build_util.yml +++ b/.github/workflows/build_util.yml @@ -24,6 +24,10 @@ on: required: false default: false type: boolean + upload-membrowse: + required: false + default: false + type: boolean os: required: false type: string @@ -54,15 +58,17 @@ jobs: - name: Build env: IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }} + MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }} + MEMBROWSE_UPLOAD_OPTION: ${{ inputs.upload-membrowse && '--membrowse-upload' || '' }} TOOLCHAIN: ${{ inputs.toolchain }} run: | if [ "$TOOLCHAIN" == "esp-idf" ]; then - docker run --rm -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py ${{ matrix.arg }} + docker run --rm -e MEMBROWSE_API_KEY="$MEMBROWSE_API_KEY" -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py $MEMBROWSE_UPLOAD_OPTION ${{ matrix.arg }} elif [ "${{ inputs.build-system }}" == "cmake-make" ] || [ "${{ inputs.build-system }}" == "make-cmake" ]; then - python tools/build.py -s make ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} - python tools/build.py -s cmake ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} + python tools/build.py -s make $MEMBROWSE_UPLOAD_OPTION ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} + python tools/build.py -s cmake $MEMBROWSE_UPLOAD_OPTION ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} else - python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} + python tools/build.py -s ${{ inputs.build-system }} $MEMBROWSE_UPLOAD_OPTION ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }} fi shell: bash diff --git a/.github/workflows/membrowse-report.yml b/.github/workflows/membrowse-report.yml index 0667418e6..f86b047df 100644 --- a/.github/workflows/membrowse-report.yml +++ b/.github/workflows/membrowse-report.yml @@ -38,7 +38,6 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - submodules: recursive # Download artifacts when code changed (build artifacts available) - name: Download build artifacts |
