Skip to content

[CI] coverage download #72632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions .github/actions/rerun-workflow/rerun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ if [ -n "$run_ids" ]; then

echo "Jobs Response for run_id $run_id: $jobs_response"

if [[ "$JOB_NAME" == *"bypass"* ]]; then
# if [[ "$JOB_NAME" == *"bypass"* ]]; then
block_jobs=$(echo "$jobs_response" | jq -r --arg job_name "$JOB_NAME" \
'.jobs[] | select(.name == $job_name) | .id')
else
block_jobs=$(echo "$jobs_response" | jq -r --arg job_name "$JOB_NAME" \
'.jobs[] | select(.name == $job_name and .conclusion != "success") | .id')
fi
# else
# block_jobs=$(echo "$jobs_response" | jq -r --arg job_name "$JOB_NAME" \
# '.jobs[] | select(.name == $job_name and .conclusion != "success") | .id')
# fi

if [ -n "$block_jobs" ]; then
echo "Found block jobs for run_id $run_id: $block_jobs"
Expand Down
47 changes: 25 additions & 22 deletions .github/workflows/Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,6 @@ jobs:
can-skip: ${{ steps.check-bypass.outputs.can-skip }}

steps:
- name: Download paddle.tar.gz and update test branch
run: |
set -e
echo "Downloading Paddle.tar.gz"
wget -q --no-proxy https://paddle-github-action.bj.bcebos.com/PR/Paddle-coverage/${PR_ID}/${COMMIT_ID}/Paddle.tar.gz --no-check-certificate
echo "Extracting Paddle.tar.gz"
tar xf Paddle.tar.gz --strip-components=1
rm Paddle.tar.gz
git remote add upstream https://github.com/PaddlePaddle/Paddle.git
git config pull.rebase false
git checkout test
echo "Pull upstream $BRANCH"
source ${{ github.workspace }}/../../../proxy
git pull upstream $BRANCH --no-edit

- name: Check bypass
id: check-bypass
uses: ./.github/actions/check-bypass
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
workflow-name: coverage

- name: Check docker image and run container
if: steps.check-bypass.outputs.can-skip != 'true'
env:
Expand Down Expand Up @@ -153,6 +131,31 @@ jobs:
-e no_proxy \
-w /paddle --network host ${docker_image}

- name: Download paddle.tar.gz and update test branch
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
rm -rf * .[^.]*
set -e
echo "Downloading Paddle.tar.gz"
wget -q --no-proxy https://paddle-github-action.bj.bcebos.com/PR/Paddle-coverage/${PR_ID}/${COMMIT_ID}/Paddle.tar.gz --no-check-certificate
echo "Extracting Paddle.tar.gz"
tar xf Paddle.tar.gz --strip-components=1
rm Paddle.tar.gz
git remote add upstream https://github.com/PaddlePaddle/Paddle.git
git config pull.rebase false
git checkout test
echo "Pull upstream $BRANCH"
source ${{ github.workspace }}/../../../proxy
git pull upstream $BRANCH --no-edit
'

- name: Check bypass
id: check-bypass
uses: ./.github/actions/check-bypass
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
workflow-name: coverage

- name: Build
if: steps.check-bypass.outputs.can-skip != 'true'
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_Clone-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: 'Paddle'
outputs:
can-skip:
value: ${{ jobs.Clone.outputs.can-skip }}
value: ${{ jobs.clone.outputs.can-skip }}

permissions: read-all

Expand All @@ -26,7 +26,7 @@ env:
ci_scripts: ${{ github.workspace }}/ci

jobs:
Clone:
clone:
# Don't run on forked repos.
name: Clone Paddle
outputs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_Inference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
- name: Download paddle.tar.gz and update test branch
run: |
docker exec -t ${container_name} /bin/bash -c '
rm -rf * .[^.]*
set -e
echo "Downloading Paddle.tar.gz"
wget -q --no-proxy https://paddle-github-action.bj.bcebos.com/PR/Paddle/${PR_ID}/${COMMIT_ID}/Paddle.tar.gz --no-check-certificate
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/_Linux-XPU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ jobs:
ulimit -n 102400
git config --global --add safe.directory ${work_dir}
git submodule foreach "git config --global --add safe.directory \$toplevel/\$sm_path"
bash -x ${ci_scripts}/run_setup.sh bdist_wheel
bash ${ci_scripts}/run_setup.sh bdist_wheel
EXCODE=$?
rm -rf `find . -name "*.a"`
rm -rf `find . -name "*.o"`
exit $EXCODE
'

Expand Down
52 changes: 31 additions & 21 deletions .github/workflows/re-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'all-failed'

- name: Rerun approval
- name: Rerun Approval
if: ${{ contains(env.comment_body, 'approval') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -38,7 +38,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Check approval'

- name: Rerun codestyle-check
- name: Rerun Codestyle-check
if: ${{ contains(env.comment_body, 'codestyle') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -48,7 +48,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Check bypass for codestyle / Check bypass'

- name: Rerun clone
- name: Rerun Clone
if: ${{ contains(env.comment_body, 'clone') }}
uses: ./.github/actions/rerun-workflow
with:
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Linux-NPU / Test'

- name: Rerun inference
- name: Rerun Inference
if: ${{ contains(env.comment_body, 'inference') && !contains(env.comment_body, 'build') && !contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -99,7 +99,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'PR-CI-Inference / Check bypass for inference / Check bypass'

- name: Rerun inference build
- name: Rerun Inference build
if: ${{ contains(env.comment_body, 'inference') && contains(env.comment_body, 'build') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -109,7 +109,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'PR-CI-Inference / Build'

- name: Rerun inference test
- name: Rerun Inference test
if: ${{ contains(env.comment_body, 'inference') && contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -119,18 +119,8 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'PR-CI-Inference / Test'

- name: Rerun coverage
if: ${{ contains(env.comment_body, 'coverage') && !contains(env.comment_body, 'build') && !contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
PR_ID: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Coverage clone / Clone Paddle'

- name: Rerun coverage build
if: ${{ contains(env.comment_body, 'coverage') && contains(env.comment_body, 'build') && !contains(env.comment_body, 'test') }}
- name: Rerun Coverage build
if: ${{ contains(env.comment_body, 'coverage') }}
uses: ./.github/actions/rerun-workflow
with:
PR_ID: ${{ github.event.issue.number }}
Expand All @@ -139,7 +129,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Coverage build'

- name: Rerun coverage test
- name: Rerun Coverage test
if: ${{ contains(env.comment_body, 'coverage') && contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
Expand Down Expand Up @@ -179,7 +169,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Linux-XPU / Test'

- name: Rerun distribute-stable build
- name: Rerun Distribute-stable build
if: ${{ contains(env.comment_body, 'distribute') && !contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -189,7 +179,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Distribute-stable / Build'

- name: Rerun distribute-stable test
- name: Rerun Distribute-stable test
if: ${{ contains(env.comment_body, 'distribute') && contains(env.comment_body, 'test') }}
uses: ./.github/actions/rerun-workflow
with:
Expand All @@ -198,3 +188,23 @@ jobs:
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Distribute-stable / Test'

- name: Rerun Static-check test
if: ${{ contains(env.comment_body, 'static-check') }}
uses: ./.github/actions/rerun-workflow
with:
PR_ID: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Static-Check / Test'

- name: Rerun Api-Benchmark
if: ${{ contains(env.comment_body, 'api-bm') }}
uses: ./.github/actions/rerun-workflow
with:
PR_ID: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
JOB_NAME: 'Api-Benchmark / Performance data storage'