You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.5 KiB
73 lines
2.5 KiB
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/tests/unit
|
|
cd PaddleSpeech
|
|
bash tests/unit/ci.sh
|
|
" |