Repository navigation
103 lines (92 loc) · 3.06 KB
/
Copy path_Windows-Inference.yml
File metadata and controls
103 lines (92 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Windows-GPU
on:
workflow_call:
permissions: read-all
env:
PR_ID: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
BRANCH: ${{ github.base_ref }}
ci_scripts: ${{ github.workspace }}\ci\windows
ACTION_DIR: ${{ github.workspace }}\..\..\..
WORKSPACE_DIR: ${{ github.workspace }}\..
cache_dir: C:\action-cache
no_proxy: "bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn"
defaults:
run:
shell: cmd
jobs:
check-bypass:
name: Check bypass
uses: ./.github/workflows/check-bypass.yml
with:
workflow-name: 'win-inference'
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-and-test:
name: Build and test
needs: check-bypass
if: ${{ needs.check-bypass.outputs.can-skip != 'true' }}
runs-on:
group: win-infer
env:
NIGHTLY_MODE: "OFF"
WITH_UNITY_BUILD: "ON"
WITH_TPCACHE: "ON"
WITH_SCCACHE: "ON"
WITH_SHARED_PHI: "ON"
GIT_PR_ID: ${{ github.event.pull_request.number }}
WITH_TESTING: "ON"
PRECISION_TEST: "OFF"
PYTHON_ROOT: C:\Python310
vcvars64_dir: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat'
CUDA_TOOLKIT_ROOT_DIR: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7'
TENSORRT_ROOT: D:/TensorRT-8.0.1.6
CTEST_PARALLEL_LEVEL: 1
GENERATOR: "Ninja"
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_MKL: "ON"
WITH_GPU: "ON"
WITH_AVX: "ON"
MSVC_STATIC_CRT: "ON"
ON_INFER: "ON"
WITH_TENSORRT: "ON"
WITH_INFERENCE_API_TEST: "ON"
WITH_ONNXRUNTIME: "ON"
WIN_UNITTEST_LEVEL: 2
CUDA_ARCH_NAME: "Auto"
steps:
- name: Download Paddle and clean env
working-directory: ..
run: |
whoami
cd
rmdir /s/q %WORKSPACE_DIR%\Paddle
echo "path=%path%;C:\Program Files\NVIDIA Corporation\NVSMI" >> %GITHUB_ENV%
python -m pip install wget
python -c "import wget;wget.download('https://paddle-github-action.bj.bcebos.com/windows/PR/%PR_ID%/%COMMIT_ID%/Paddle.tar.zst')"
zstd -d Paddle.tar.zst && tar -xf Paddle.tar
del Paddle.tar Paddle.tar.zst
call %ci_scripts%\clean_env.bat
- name: Config env
run: |
call %ACTION_DIR%\proxy.bat
call %ci_scripts%\config_env.bat
- name: Build paddle
run: |
python -m pip install bce-python-sdk==0.8.74
call %ci_scripts%\pre_download.bat
call %ACTION_DIR%\proxy.bat
call %ci_scripts%\build.bat
- name: Test whl package
run: |
call %ci_scripts%\test_whl_package.bat
- name: Test paddle
run: |
call %ci_scripts%\test.bat
- name: Clean up dir
if: always()
run: |
call %ci_scripts%\clean_env.bat
if "%WITH_TESTING%"=="ON" (
for /F "tokens=1 delims= " %%# in ('tasklist ^| findstr /i test') do taskkill /f /im %%# /t
) || ver >nul