From 2c03ed4a3475e8bfebee05a97eb49a10cc279f44 Mon Sep 17 00:00:00 2001 From: Afjes <599641678@qq.com> Date: Fri, 16 Jan 2026 08:46:53 +0000 Subject: [PATCH] fix workflows ci yml --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..cefd825e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +name: CI_GPU + +on: + pull_request: + branches: + - develop + paths-ignore: + - '**.md' + - '**.txt' + workflow_dispatch: + +concurrency: + group: ${{ github.event.pull_request.number }}-gpu-ci + cancel-in-progress: true + +jobs: + CI_GPU: + timeout-minutes: 60 + runs-on: + group: BD_BJ-V100 + steps: + - name: Print current runner name + run: | + echo "Current runner name: ${{ runner.name }}" + + - name: Code Checkout + env: + docker_image: registry.baidubce.com/paddlepaddle/paddle:3.0.0b1 + run: | + REPO="https://github.com/${{ github.repository }}.git" + FULL_REPO="${{ github.repository }}" + REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" + # Clean the repository directory before starting + docker run --rm --net=host -v $(pwd):/workspace -w /workspace \ + -e "REPO_NAME=${REPO_NAME}" \ + -e "BASE_BRANCH=${BASE_BRANCH}" \ + ${docker_image} /bin/bash -c ' + if [ -d ${REPO_NAME} ]; then + echo "Directory ${REPO_NAME} exists, removing it..." + rm -rf ${REPO_NAME} + fi + ' + git config --global user.name "PaddleCI" + git config --global user.email "paddle_ci@example.com" + git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} + cd PaddleSpeech + if [ "${{ github.event_name }}" = "pull_request" ]; then + git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} + git merge pr/${{ github.event.pull_request.number }} + git log -n 3 --oneline + else + git checkout ${{ github.sha }} + git log -n 3 --oneline + fi + + - name: Run CI tests + env: + docker_image: registry.baidubce.com/paddlepaddle/paddle:3.0.0b1 + run: | + runner_name="${{ runner.name }}" + PARENT_DIR=$(dirname "$WORKSPACE") + echo "PARENT_DIR:$PARENT_DIR" + docker run --rm --net=host --cap-add=SYS_PTRACE --privileged --shm-size=64G \ + -v $(pwd):/workspace -w /workspace \ + -e "http_proxy=$(git config --global --get http.proxy)" \ + -e "https_proxy=$(git config --global --get https.proxy)" \ + -e "no_proxy=bcebos.com,mirrors.tuna.tsinghua.edu.cn,127.0.0.1,localhost" \ + ${docker_image} /bin/bash -c " + git config --global --add safe.directory /workspace/PaddleSpeech + cd PaddleSpeech + bash tests/unit/ci.sh + " \ No newline at end of file