From 5e3abc1deaaeb50a589d26891dc8463bf2fa3c18 Mon Sep 17 00:00:00 2001 From: "Zhong, Ruijie" Date: Tue, 20 May 2025 02:36:55 -0700 Subject: [PATCH 1/4] [CI] Enhance UT check process --- .github/workflows/_linux_ut.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index 7f29d89d3..c49464947 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -295,7 +295,26 @@ jobs: source activate xpu_op_${ZE_AFFINITY_MASK} pip install junitparser python .github/scripts/check-ut.py ${{ github.workspace }}/ut_log/*.xml >> $GITHUB_STEP_SUMMARY || true - - name: UT Test Results Check + - name: Upload Inductor XPU UT Log + if: always() + uses: actions/upload-artifact@v4 + with: + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }} + path: ${{ github.workspace }}/ut_log + + ut_test_results_check: + needs: ut_test + runs-on: ${{ inputs.runner }} + timeout-minutes: 30 + env: + ut_skip_issue: 1624 + steps: + - name: Download XPU UT Logs + uses: actions/download-artifact@v4 + with: + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }} + path: ${{ github.workspace }}/ut_log + - name: Check UT Results shell: bash run: | repo="${{ github.repository }}" @@ -316,6 +335,14 @@ jobs: $contains_status cd ${{ github.workspace }}/ut_log/${ut_suite} gh --repo $repo issue view $ut_skip_issue --json body -q .body | sed '/^$/d' > Known_issue.log + gh api "repos/${{ github.repository }}/issues?labels=known_ut_issue" \ + --jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' \ + > issues.log + awk '/Cases:/ {flag=1; next} /^\|\||^$/ {flag=0} flag' issues.log | grep -Eo 'test[^[:space:]]+( \|\| [^[:space:]]+)?' | sed 's/ *|| */ /g' | sort -u > issues_temp.log + awk '$2 == "op_ut" {print $1}' issues_temp.log > issues_op_ut.log + cat issues_temp.log | awk '{print $1}' >> Known_issue.log + awk -F'::' '{print $1}' issues_op_ut.log | sort -u | paste -sd ',' >> Known_issue.log + cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./ bash ut_result_check.sh ${ut_suite} done @@ -323,9 +350,9 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }} + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}-checked path: ${{ github.workspace }}/ut_log - + distributed_ut_test: runs-on: pvc_e2e if: contains(inputs.ut, 'xpu_distributed') From a8bb4488a47becb5503680155b4f2666ac029570 Mon Sep 17 00:00:00 2001 From: "Zhong, Ruijie" Date: Tue, 20 May 2025 18:21:46 -0700 Subject: [PATCH 2/4] add gh set --- .github/workflows/_linux_ut.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index c49464947..a97b21b7b 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -295,6 +295,7 @@ jobs: source activate xpu_op_${ZE_AFFINITY_MASK} pip install junitparser python .github/scripts/check-ut.py ${{ github.workspace }}/ut_log/*.xml >> $GITHUB_STEP_SUMMARY || true + echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" - name: Upload Inductor XPU UT Log if: always() uses: actions/upload-artifact@v4 @@ -307,6 +308,7 @@ jobs: runs-on: ${{ inputs.runner }} timeout-minutes: 30 env: + GH_TOKEN: ${{ github.token }} ut_skip_issue: 1624 steps: - name: Download XPU UT Logs From 1efc12db6f7f12f119e986348bb16eed09db5710 Mon Sep 17 00:00:00 2001 From: "Zhong, Ruijie" Date: Tue, 20 May 2025 22:26:59 -0700 Subject: [PATCH 3/4] fix the artifact name issue --- .github/workflows/_linux_ut.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index a97b21b7b..8eb9918b0 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -311,6 +311,9 @@ jobs: GH_TOKEN: ${{ github.token }} ut_skip_issue: 1624 steps: + - name: Set the UT name + run: | + echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" - name: Download XPU UT Logs uses: actions/download-artifact@v4 with: From d74a532b176ecd2554d8a9421dc13375105e9ae4 Mon Sep 17 00:00:00 2001 From: "Zhong, Ruijie" Date: Tue, 20 May 2025 23:37:33 -0700 Subject: [PATCH 4/4] change the issue label --- .github/workflows/_linux_ut.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index 8eb9918b0..e8edcc8de 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -340,7 +340,7 @@ jobs: $contains_status cd ${{ github.workspace }}/ut_log/${ut_suite} gh --repo $repo issue view $ut_skip_issue --json body -q .body | sed '/^$/d' > Known_issue.log - gh api "repos/${{ github.repository }}/issues?labels=known_ut_issue" \ + gh api "repos/${{ github.repository }}/issues?labels=skipped" \ --jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' \ > issues.log awk '/Cases:/ {flag=1; next} /^\|\||^$/ {flag=0} flag' issues.log | grep -Eo 'test[^[:space:]]+( \|\| [^[:space:]]+)?' | sed 's/ *|| */ /g' | sort -u > issues_temp.log