Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fdd7110
add workflow yml
Liujie0926 Jun 10, 2025
6490aaf
fix checkout
Liujie0926 Jun 10, 2025
99af173
add clean
Liujie0926 Jun 10, 2025
e176442
debug
Liujie0926 Jun 10, 2025
6fcdbd2
fix
Liujie0926 Jun 10, 2025
2d9bf43
fix git
Liujie0926 Jun 10, 2025
5ea0cf5
debug
Liujie0926 Jun 10, 2025
01b974d
fix
Liujie0926 Jun 10, 2025
72fb11b
fix unit
Liujie0926 Jun 10, 2025
bdb0fef
update allure report
Liujie0926 Jun 11, 2025
5b25916
fix
Liujie0926 Jun 11, 2025
c693204
test
Liujie0926 Jun 12, 2025
02a81fb
update
Liujie0926 Jun 12, 2025
34da3c5
update
Liujie0926 Jun 12, 2025
b2c4c9c
fix
Liujie0926 Jun 12, 2025
d8064b3
fix
Liujie0926 Jun 12, 2025
4d11879
update runs-on
Liujie0926 Jun 12, 2025
719d0f9
update
Liujie0926 Jun 12, 2025
51e7499
update
Liujie0926 Jun 12, 2025
e4369d9
update yml name
Liujie0926 Jun 12, 2025
999062d
fix
Liujie0926 Jun 12, 2025
c7c9766
fix
Liujie0926 Jun 12, 2025
cff9d6f
add rerun
Liujie0926 Jun 12, 2025
8cdbe0d
update rerun workflow
Liujie0926 Jun 13, 2025
36e0c4c
debug
Liujie0926 Jun 13, 2025
25c50d9
update
Liujie0926 Jun 13, 2025
1cba3de
revert debug
Liujie0926 Jun 13, 2025
6dbe059
update data_path
Liujie0926 Jun 16, 2025
ede30c9
fix distribute scripts
Liujie0926 Jun 17, 2025
ff38ef0
skip distribute
Liujie0926 Jun 19, 2025
f306ecf
skip distribute
Liujie0926 Jun 19, 2025
ee6932a
update concurrency
Liujie0926 Jun 19, 2025
4413b94
Revert "update concurrency"
Liujie0926 Jun 19, 2025
f2958db
update unit yml name
Liujie0926 Jun 19, 2025
036c78c
update distribute
Liujie0926 Jun 20, 2025
55a6001
disable distribute
Liujie0926 Jun 20, 2025
3dfce61
update path
Liujie0926 Jun 20, 2025
e86eb33
add docker build
Liujie0926 Jun 24, 2025
d25f720
update on
Liujie0926 Jun 26, 2025
859c082
update
Liujie0926 Jul 8, 2025
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
30 changes: 30 additions & 0 deletions .github/actions/rerun-workflow/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Rerun Workflow'
description: 'Re-run GitHub Actions workflow for a given Pull Request'
inputs:
GITHUB_TOKEN:
description: 'GitHub token with repo scope'
required: true
OWNER:
description: 'Repository owner'
required: true
REPO:
description: 'Repository name'
required: true
PR_ID:
description: 'Pull Request ID'
required: true
JOB_NAME:
description: 'Job name to rerun'
required: true

runs:
using: 'composite'
steps:
- run: bash ./.github/actions/rerun-workflow/rerun.sh
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
OWNER: ${{ inputs.OWNER }}
REPO: ${{ inputs.REPO }}
PR_ID: ${{ inputs.PR_ID }}
JOB_NAME: ${{ inputs.JOB_NAME }}
77 changes: 77 additions & 0 deletions .github/actions/rerun-workflow/rerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright (c) 2025 PaddleNLP Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

COMMIT_SHA=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_ID" | jq -r '.head.sha')

echo "Commit SHA: $COMMIT_SHA"

response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/actions/runs?head_sha=$COMMIT_SHA&per_page=100")

echo "Response: $response"

run_ids=$(echo "$response" | jq -r '.workflow_runs[].id')

if [ -n "$run_ids" ]; then
echo "Found run_ids for commit $COMMIT_SHA: $run_ids"

for run_id in $run_ids; do
if [ "$JOB_NAME" = "all-failed" ]; then
echo "Rerunning all failed jobs for run_id: $run_id"

rerun_response=$(curl -X POST -s -w "%{http_code}" -o /dev/null \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/actions/runs/$run_id/rerun-failed-jobs")
if [ "$rerun_response" -eq 201 ]; then
echo "Successfully requested rerun for all blocked jobs in run_id: $run_id"
else
echo "Failed to request rerun for run_id: $run_id with status code $rerun_response"
fi

else
jobs_response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/actions/runs/$run_id/jobs")

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

# 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

if [ -n "$block_jobs" ]; then
echo "Found block jobs for run_id $run_id: $block_jobs"

for job_id in $block_jobs; do
echo "Rerunning job_id: $job_id"
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/actions/jobs/$job_id/rerun"
done
else
echo "No block jobs found for run_id $run_id with name $JOB_NAME."
fi
fi
done
else
echo "No matching workflow runs found for commit $COMMIT_SHA."
exit 1
fi
34 changes: 34 additions & 0 deletions .github/workflows/build-ci-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build PR CI-Docker

on:
push:
branches:
- develop
paths:
- "requirements*"
- "scripts/regression/requirements_ci.txt"
- "tests/requirements.txt"
- "setup.py"
- ".github/workflows/build-ci-docker-images.yml"
pull_request:
types: [opened, synchronize, reopened]
branches: [develop]
schedule:
- cron: "1 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
ci-docker-images-paddlenlp:
name: ci-docker-images-paddlenlp
uses: ./.github/workflows/ci-docker-images-paddlenlp.yml
with:
upstream_event: ${{ github.event_name }}

ci-docker-images-distribute:
name: ci-docker-images-distribute
uses: ./.github/workflows/ci-docker-images-distribute.yml
with:
upstream_event: ${{ github.event_name }}
Loading