diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/build_util.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/membrowse-comment.yml | 16 | ||||
| -rw-r--r-- | .github/workflows/membrowse-onboard.yml | 22 | ||||
| -rw-r--r-- | .github/workflows/membrowse-report.yml | 20 |
5 files changed, 29 insertions, 35 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc5b1975e..e0c1d0a14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -386,10 +386,6 @@ jobs: merge-multiple: true continue-on-error: true - - name: Save PR number - if: steps.download.outcome == 'success' - run: echo ${{ github.event.number }} > reports/pr_number.txt - - name: Upload Membrowse Comment Artifact if: steps.download.outcome == 'success' uses: actions/upload-artifact@v5 diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml index e0fef7ce4..e62c10ca1 100644 --- a/.github/workflows/build_util.yml +++ b/.github/workflows/build_util.yml @@ -78,7 +78,7 @@ jobs: run: | for dir in cmake-build/cmake-build-*; do board=$(basename "$dir" | sed 's/cmake-build-//') - ld_path=$(jq -r --arg b "$board" '.[] | select(.board == $b) | .ld // empty' .github/membrowse-targets.json) + ld_path=$(jq -r --arg b "$board" '.targets[] | select(.board == $b) | .ld // empty' .github/membrowse-targets.json) if [ -n "$ld_path" ] && [ -f "$ld_path" ]; then mkdir -p "cmake-build/$(dirname "$ld_path")" cp "$ld_path" "cmake-build/$ld_path" diff --git a/.github/workflows/membrowse-comment.yml b/.github/workflows/membrowse-comment.yml index a3db37360..a99c9db51 100644 --- a/.github/workflows/membrowse-comment.yml +++ b/.github/workflows/membrowse-comment.yml @@ -11,11 +11,14 @@ jobs: runs-on: ubuntu-latest if: > github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' + github.event.workflow_run.conclusion != 'cancelled' permissions: actions: read pull-requests: write steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Download Artifacts id: download uses: actions/download-artifact@v5 @@ -26,19 +29,10 @@ jobs: path: reports continue-on-error: true - - name: Read PR Number - if: steps.download.outcome == 'success' - id: pr_number - run: | - if [ -f reports/pr_number.txt ]; then - echo "number=$(cat reports/pr_number.txt)" >> $GITHUB_OUTPUT - fi - - name: Post Membrowse PR comment - if: steps.download.outcome == 'success' && steps.pr_number.outputs.number != '' + if: steps.download.outcome == 'success' uses: membrowse/membrowse-action/comment-action@v1 with: json_files: 'reports/*.json' - pr_number: ${{ steps.pr_number.outputs.number }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/membrowse-onboard.yml b/.github/workflows/membrowse-onboard.yml index a183297b2..aa7204ffa 100644 --- a/.github/workflows/membrowse-onboard.yml +++ b/.github/workflows/membrowse-onboard.yml @@ -13,14 +13,17 @@ jobs: load-targets: runs-on: ubuntu-22.04 outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + targets: ${{ steps.load.outputs.targets }} + toolchains: ${{ steps.load.outputs.toolchains }} steps: - name: Checkout repository uses: actions/checkout@v5 - name: Load target matrix - id: set-matrix - run: echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT + id: load + run: | + echo "targets=$(jq -c '.targets' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT + echo "toolchains=$(jq -c '.toolchains' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT onboard: needs: load-targets @@ -28,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - include: ${{ fromJson(needs.load-targets.outputs.matrix) }} + include: ${{ fromJson(needs.load-targets.outputs.targets) }} steps: - name: Checkout repository @@ -38,7 +41,8 @@ jobs: submodules: recursive - name: Install packages - run: ${{ matrix.setup_cmd }} + run: | + ${{ fromJson(needs.load-targets.outputs.toolchains)[matrix.toolchain].setup_cmd }} && python3 tools/get_deps.py ${{ matrix.get_deps || matrix.port }} - name: Setup ccache uses: hendrikmuhs/[email protected] @@ -48,11 +52,11 @@ jobs: - name: Run Membrowse Onboard Action uses: membrowse/membrowse-action/onboard-action@v1 with: - target_name: ${{ matrix.target_name }} + target_name: ${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }} num_commits: ${{ github.event.inputs.num_commits }} - build_script: ${{ matrix.build_cmd }} - elf: ${{ matrix.elf }} + build_script: python3 tools/build.py -s cmake -b ${{ matrix.board }} + elf: cmake-build/cmake-build-${{ matrix.board }}/device/${{ matrix.example }}/${{ matrix.example }}.elf ld: ${{ matrix.ld }} - linker_vars: ${{ matrix.linker_vars }} + linker_vars: ${{ matrix.linker_vars || '' }} api_key: ${{ secrets.MEMBROWSE_API_KEY }} api_url: ${{ vars.MEMBROWSE_API_URL }} diff --git a/.github/workflows/membrowse-report.yml b/.github/workflows/membrowse-report.yml index aff9fe138..0667418e6 100644 --- a/.github/workflows/membrowse-report.yml +++ b/.github/workflows/membrowse-report.yml @@ -16,14 +16,14 @@ jobs: load-targets: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + targets: ${{ steps.load.outputs.targets }} steps: - name: Checkout repository uses: actions/checkout@v6 - name: Load target matrix - id: set-matrix - run: echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT + id: load + run: echo "targets=$(jq -c '.targets' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT analyze: needs: [load-targets] @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - include: ${{ fromJson(needs.load-targets.outputs.matrix) }} + include: ${{ fromJson(needs.load-targets.outputs.targets) }} steps: - name: Checkout repository @@ -58,7 +58,7 @@ jobs: - name: Check if ELF exists id: check-elf run: | - if [ -f "${{ matrix.elf }}" ]; then + if [ -f "cmake-build/cmake-build-${{ matrix.board }}/device/${{ matrix.example }}/${{ matrix.example }}.elf" ]; then echo "exists=true" >> $GITHUB_OUTPUT else echo "exists=false" >> $GITHUB_OUTPUT @@ -71,10 +71,10 @@ jobs: continue-on-error: true uses: membrowse/membrowse-action@v1 with: - target_name: ${{ matrix.target_name }} - elf: ${{ matrix.elf }} + target_name: ${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }} + elf: cmake-build/cmake-build-${{ matrix.board }}/device/${{ matrix.example }}/${{ matrix.example }}.elf ld: ${{ matrix.ld }} - linker_vars: ${{ matrix.linker_vars }} + linker_vars: ${{ matrix.linker_vars || '' }} api_key: ${{ secrets.MEMBROWSE_API_KEY }} api_url: ${{ vars.MEMBROWSE_API_URL }} verbose: INFO @@ -87,7 +87,7 @@ jobs: continue-on-error: true uses: membrowse/membrowse-action@v1 with: - target_name: ${{ matrix.target_name }} + target_name: ${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }} identical: true api_key: ${{ secrets.MEMBROWSE_API_KEY }} api_url: ${{ vars.MEMBROWSE_API_URL }} @@ -97,5 +97,5 @@ jobs: if: steps.membrowse.outcome == 'success' || steps.membrowse-identical.outcome == 'success' uses: actions/upload-artifact@v5 with: - name: membrowse-report-${{ matrix.target_name }} + name: membrowse-report-${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }} path: ${{ steps.membrowse.outputs.report_path || steps.membrowse-identical.outputs.report_path }} |
