mirror of
https://github.com/hathach/tinyusb.git
synced 2026-03-05 07:07:32 +00:00
restructure targets file
This commit is contained in:
1156
.github/membrowse-targets.json
vendored
1156
.github/membrowse-targets.json
vendored
File diff suppressed because it is too large
Load Diff
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -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
|
||||
|
||||
2
.github/workflows/build_util.yml
vendored
2
.github/workflows/build_util.yml
vendored
@ -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"
|
||||
|
||||
16
.github/workflows/membrowse-comment.yml
vendored
16
.github/workflows/membrowse-comment.yml
vendored
@ -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 }}
|
||||
|
||||
22
.github/workflows/membrowse-onboard.yml
vendored
22
.github/workflows/membrowse-onboard.yml
vendored
@ -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/ccache-action@v1.2
|
||||
@ -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 }}
|
||||
|
||||
20
.github/workflows/membrowse-report.yml
vendored
20
.github/workflows/membrowse-report.yml
vendored
@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user