Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/check-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,24 @@ jobs:
echo "begin to check patches..."
set +e
ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- ./scripts/checkpatch.pl "$patch_dir"/*.patch --show-types \
--ignore CONFIG_DESCRIPTION,FILE_PATH_CHANGES,GERRIT_CHANGE_ID,GIT_COMMIT_ID,UNKNOWN_COMMIT_ID,FROM_SIGN_OFF_MISMATCH,REPEATED_WORD,COMMIT_COMMENT_SYMBOL,BLOCK_COMMENT_STYLE,AVOID_EXTERNS,AVOID_BUG > "$patch_dir/checkpatch.log"
--ignore CONFIG_DESCRIPTION,FILE_PATH_CHANGES,GERRIT_CHANGE_ID,GIT_COMMIT_ID,UNKNOWN_COMMIT_ID,FROM_SIGN_OFF_MISMATCH,REPEATED_WORD,COMMIT_COMMENT_SYMBOL,BLOCK_COMMENT_STYLE,AVOID_EXTERNS,AVOID_BUG 2>&1 | tee "$patch_dir/checkpatch.log"
total_error=$(grep -cE "ERROR" "$patch_dir/checkpatch.log")
total_warn=$(grep -cE "WARNING" "$patch_dir/checkpatch.log")
set -e

echo "check patches result: $total_error errors, $total_warn warnings." > check-patch-result

echo "check patches result: $total_error errors, $total_warn warnings." | tee check-patch-result

summary_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/#summary-${{ job.check_run_id }}"

cat > summary_content << EEE
## Check Patch Result

| | |
|---|---|
| Total Errors | $total_error |
| Total Warnings | $total_warn |

- detail log: ${summary_url}
EEE

echo "summary_content<<EOF" >> $GITHUB_OUTPUT
Expand All @@ -106,10 +110,10 @@ jobs:
cat > $GITHUB_STEP_SUMMARY <<- EEE
$(cat summary_content)

### Check Patch Log

$(echo '```log')
$(cat $patch_dir/checkpatch.log)
---
$(cat check-patch-result)
$(echo '```')
EEE

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ jobs:
"$check_type" --list-files "$l"
;;
esac
done <<< $check_path > need_check_files
done <<< $check_path | tee need_check_files

cat need_check_files

declare -A all_msg_type=()
file_cnt=0
Expand All @@ -91,7 +90,7 @@ jobs:
yamllint)
"$check_type" -f parsable "$file"
;;
esac > parse_result
esac | tee parse_result

declare -A msg_cnt=()

Expand All @@ -108,9 +107,9 @@ jobs:
info=${info:-[ok]}
echo "| $file | ${info%,*} |"

done < need_check_files > info_result

cat info_result
done < need_check_files | tee info_result
summary_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/#summary-${{ job.check_run_id }}"

cat > summary << EEE

Expand All @@ -120,6 +119,7 @@ jobs:
|:-|:-:|
$(cat info_result)

- detail log: ${summary_url}
EEE

echo "${check_type}_result<<EOF" >> $GITHUB_OUTPUT
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
docker run --privileged --rm \
-v "$(pwd)/${kernel_result_dir}:/srv/guix_result" \
hub.oepkgs.net/oerv-ci/guix-kernel-cross-build:release \
guix-cross-build ${{ inputs.commit_url }}
guix-cross-build ${{ inputs.commit_url }} | tee "${kernel_result_dir}/build.log"

- name: publish kernel
id: publish-kernel
Expand All @@ -97,20 +97,32 @@ jobs:
result="Kernel build failed."
fi

summary_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/#summary-${{ job.check_run_id }}"

cat > summary << EEE
## Kernel Build Result

$result

$(cat "${kernel_result_dir}"/*/*.md5sum)

- detail log: ${summary_url}
EEE

cat summary > $GITHUB_STEP_SUMMARY

echo "summary_content<<EOF" >> $GITHUB_OUTPUT
cat summary >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

cat summary > $GITHUB_STEP_SUMMARY

cat > $GITHUB_STEP_SUMMARY << EEE
$(cat summary)

\`\`\`log
$(cat "${kernel_result_dir}"/build.log)
\`\`\`
EEE

[ "$kernel_url" != "" ] # 设置步骤状态

10 changes: 6 additions & 4 deletions .github/workflows/kunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ jobs:
cd kernel-src
make distclean
git checkout .
ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- ./tools/testing/kunit/kunit.py run --arch=riscv > kunit.log 2>&1 || true
(ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- ./tools/testing/kunit/kunit.py run --arch=riscv 2>&1 | tee kunit.log) || true
result="$(grep 'Testing complete' kunit.log || echo "kunit test failed")"

summary_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/#summary-${{ job.check_run_id }}"

cat >> summary << EEE
## Kunit Test Result

$result

- detail log: ${summary_url}
EEE

echo "sumary_content<<EOF" >> $GITHUB_OUTPUT
Expand All @@ -81,9 +85,7 @@ jobs:
cat > $GITHUB_STEP_SUMMARY <<- EEE
$(cat summary)

### Kunit Test Log

$(echo '```bash')
$(echo '```log')
$(cat kunit.log)
$(echo '```')
EEE
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/lava-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,27 +375,29 @@ jobs:
for st in "${!cnt_result_status[@]}"; do
result_status_desc+="${result_status_desc:+, }$st: ${cnt_result_status[$st]}"
done

summary_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/#summary-${{ job.check_run_id }}"

cat > summary << EEE
## LAVA Check

| args | value |
|:-:|:-:|
| testcase_repo | ${testcase_repo} |
| testcase_ref | ${testcase_ref} |
| lava_template | ${lava_template} |
| testcase_path | ${testcase_path} |
| testitem_name | ${testitem_name} |
| kernel_download_url | ${kernel_download_url} |
| initramfs_download_url | ${initramfs_download_url} |
| rootfs_download_url | ${rootfs_download_url} |

### args:

- testcase_repo: ${testcase_repo}
- testcase_ref: ${testcase_ref}
- lava_template: ${lava_template}
- testcase_path: ${testcase_path}
- testitem_name: ${testitem_name}
- kernel_download_url: ${kernel_download_url}
- initramfs_download_url: ${initramfs_download_url}
- rootfs_download_url: ${rootfs_download_url}

### result:
### result: $(if [ "${lava_health}" = Complete ]; then echo "Lava check done!"; else echo "Lava check fail!"; fi)

$(if [ "${lava_health}" = Complete ]; then echo "Lava check done!"; else echo "Lava check fail!"; fi) lava log: https://${lava_server}/scheduler/job/${lava_jobid}

lava result count: $result_status_desc
- lava log: https://${lava_server}/scheduler/job/${lava_jobid}
- lava result count: $result_status_desc

- detail log: ${summary_url}
EEE

echo "summary_content<<EOF" >> $GITHUB_OUTPUT
Expand All @@ -405,8 +407,6 @@ jobs:
cat > $GITHUB_STEP_SUMMARY << EEE
$(cat summary)

### detail result:

\`\`\`log
$lava_results
\`\`\`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rvck-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: ./.github/workflows/kernel-build.yml
with:
commit_url: ${{ needs.parse-request.outputs.COMMIT_URL }}
upload_dir: ${{ github.repository }}/${{ format('{0}_{1}_{2}', needs.parse-request.outputs.ISSUE_ID, github.event.comment.id, github.run_attempt) }}
upload_dir: ${{ github.repository }}/${{ format('{0}_{1}_{2}', needs.parse-request.outputs.ISSUE_ID, github.run_id, github.run_attempt) }}
secrets:
rync_passphrase: ${{ secrets.RSYNC_PASSPHRASE }}

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/update-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ jobs:
|event id |$event_id |

append_content:
\`\`\`markdown

---

${append_content}
\`\`\`

---

EEE

Expand Down