|
| 1 | +name: CI Images Build |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: '0 18 * * *' # 2:00 AM China Standard Time (UTC+8) |
| 7 | + |
| 8 | +permissions: read-all |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.ref }}-${{ github.sha }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | + |
| 15 | +jobs: |
| 16 | + clone: |
| 17 | + environment: CodeSync |
| 18 | + name: FD-Clone-Linux |
| 19 | + runs-on: ubuntu-latest |
| 20 | + outputs: |
| 21 | + repo_archive_url: ${{ steps.set_output.outputs.repo_archive_url }} |
| 22 | + steps: |
| 23 | + - name: Clone FastDeploy |
| 24 | + uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + ref: ${{ github.ref_name }} |
| 27 | + submodules: 'recursive' |
| 28 | + fetch-depth: 1000 |
| 29 | + |
| 30 | + - name: Python Setup |
| 31 | + uses: actions/setup-python@v5 |
| 32 | + with: |
| 33 | + python-version: '3.10' |
| 34 | + - name: Code Info Show and Upload |
| 35 | + id: set_output |
| 36 | + env: |
| 37 | + AK: ${{ secrets.BOS_AK }} |
| 38 | + SK: ${{ secrets.BOS_SK }} |
| 39 | + run: | |
| 40 | + git config --unset http.https://github.com/.extraheader |
| 41 | + git submodule foreach --recursive sh -c "git config --local --unset-all 'http.https://github.com/.extraheader'" |
| 42 | + git submodule foreach --recursive sh -c "git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'" |
| 43 | + echo "Current HEAD Log:" |
| 44 | + git log --oneline -n 5 |
| 45 | + ls |
| 46 | + cd .. |
| 47 | + tar -zcf FastDeploy.tar.gz FastDeploy |
| 48 | + if [[ "${{ github.ref_type }}" == "tag" ]]; then |
| 49 | + commit_id=${{ github.sha }} |
| 50 | + tag_name=${{ github.ref_name }} |
| 51 | + target_path=paddle-qa/TAG/FastDeploy/${tag_name}/${commit_id} |
| 52 | + else |
| 53 | + commit_id=${{ github.sha }} |
| 54 | + branch_name=${{ github.ref_name }} |
| 55 | + target_path=paddle-qa/BRANCH/FastDeploy/${branch_name}/${commit_id} |
| 56 | + fi |
| 57 | + wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py |
| 58 | + push_file=$(realpath bos_tools.py) |
| 59 | + python -m pip install bce-python-sdk==0.9.29 |
| 60 | + ls |
| 61 | + python ${push_file} FastDeploy.tar.gz ${target_path} |
| 62 | + target_path_stripped="${target_path#paddle-qa/}" |
| 63 | + REPO_ARCHIVE_URL=https://paddle-qa.bj.bcebos.com/${target_path_stripped}/FastDeploy.tar.gz |
| 64 | + echo "repo_archive_url=${REPO_ARCHIVE_URL}" >> $GITHUB_OUTPUT |
| 65 | +
|
| 66 | + resultshow: |
| 67 | + name: Show Code Archive Output |
| 68 | + needs: clone |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + - name: Print wheel path |
| 72 | + run: | |
| 73 | + echo "The code archive is located at: ${{ needs.clone.outputs.repo_archive_url }}" |
| 74 | +
|
| 75 | + ci_image_build: |
| 76 | + name: CI Images Build |
| 77 | + needs: clone |
| 78 | + uses: ./.github/workflows/_ci_image_build.yml |
| 79 | + with: |
| 80 | + CI_DOCKER_IMAGE_NAME: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate-precheck |
| 81 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 82 | + |
| 83 | + |
| 84 | + build_sm8090: |
| 85 | + name: BUILD_SM8090 |
| 86 | + needs: [clone, ci_image_build] |
| 87 | + uses: ./.github/workflows/_build_linux.yml |
| 88 | + with: |
| 89 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 90 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 91 | + COMPILE_ARCH: "90" |
| 92 | + WITH_NIGHTLY_BUILD: ${{ needs.publish_pre_check.outputs.with_nightly_build }} |
| 93 | + FD_VERSION: ${{ needs.publish_pre_check.outputs.fd_version }} |
| 94 | + PADDLEVERSION: ${{ needs.publish_pre_check.outputs.compile_use_paddle_version }} |
| 95 | + PADDLE_WHL_URL: ${{ needs.publish_pre_check.outputs.compile_use_paddle_whl_url }} |
| 96 | + |
| 97 | + |
| 98 | + unittest_coverage: |
| 99 | + name: Run FastDeploy Unit Tests and Coverage |
| 100 | + needs: [clone,build_sm8090,ci_image_build] |
| 101 | + uses: ./.github/workflows/_unit_test_coverage.yml |
| 102 | + with: |
| 103 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 104 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 105 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 106 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 107 | + secrets: |
| 108 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 109 | + |
| 110 | + logprob_test: |
| 111 | + name: Run FastDeploy LogProb Tests |
| 112 | + needs: [build_sm8090,ci_image_build] |
| 113 | + uses: ./.github/workflows/_logprob_test_linux.yml |
| 114 | + with: |
| 115 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 116 | + PADDLETEST_ARCHIVE_URL: "https://xly-devops.bj.bcebos.com/PaddleTest/PaddleTest.tar.gz" |
| 117 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 118 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 119 | + |
| 120 | + pre_ce_test: |
| 121 | + name: Extracted partial CE model tasks to run in CI. |
| 122 | + needs: [clone,build_sm8090,ci_image_build] |
| 123 | + uses: ./.github/workflows/_pre_ce_test.yml |
| 124 | + with: |
| 125 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 126 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 127 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 128 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 129 | + |
| 130 | + base_test: |
| 131 | + name: Run Base Tests |
| 132 | + needs: [clone,build_sm8090,ci_image_build] |
| 133 | + uses: ./.github/workflows/_base_test.yml |
| 134 | + with: |
| 135 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 136 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 137 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 138 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 139 | + |
| 140 | + accuracy_test: |
| 141 | + name: Run Accuracy Tests |
| 142 | + needs: [clone,build_sm8090,ci_image_build] |
| 143 | + uses: ./.github/workflows/_accuracy_test.yml |
| 144 | + with: |
| 145 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 146 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 147 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 148 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 149 | + |
| 150 | + stable_test: |
| 151 | + name: Run Stable Tests |
| 152 | + needs: [clone,build_sm8090,ci_image_build] |
| 153 | + uses: ./.github/workflows/_stable_test.yml |
| 154 | + with: |
| 155 | + DOCKER_IMAGE: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 156 | + FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }} |
| 157 | + FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }} |
| 158 | + MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" |
| 159 | + |
| 160 | + |
| 161 | + publish_pre_check: |
| 162 | + name: Publish Docker Images Pre Check |
| 163 | + needs: [ci_image_build, unittest_coverage,logprob_test,pre_ce_test,base_test,accuracy_test,stable_test] |
| 164 | + runs-on: [self-hosted, Docker-Build] |
| 165 | + steps: |
| 166 | + - name: Images Uploading |
| 167 | + env: |
| 168 | + images_name: ${{ needs.ci_image_build.outputs.docker_name_precheck }} |
| 169 | + ci_image_name: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate" |
| 170 | + run: | |
| 171 | + echo "images_name=${images_name}" |
| 172 | + docker images ${ci_image_name} |
| 173 | + docker tag ${images_name} ${ci_image_name} |
| 174 | + docker push ${ci_image_name} |
0 commit comments