-
Notifications
You must be signed in to change notification settings - Fork 6
193 lines (169 loc) · 5.86 KB
/
acceptance.yml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
---
name: Acceptance
permissions: read-all
on:
workflow_call:
inputs:
os:
description: 'Operating system'
required: false
default: 'Linux'
type: string
build_type:
description: 'Build type (Release, Debug, RelWithDebInfo, etc.)'
required: false
default: 'Release'
type: string
ref:
description: 'The branch, tag or SHA of tests'
required: false
default: ''
type: string
test_ref:
description: 'The branch, tag or SHA of tests'
required: false
default: ''
type: string
lib_artifact:
description: 'Artifact containing lib+dev package'
required: true
type: string
tools_artifact:
description: 'Artifact containing tools package'
required: true
type: string
gpu:
description: 'GPU Family'
required: false
default: 'gen12.5'
type: string
distro_family:
description: 'OS distro family'
required: false
type: string
distro_version:
description: 'OS distro version'
required: false
type: string
env:
DISTRO_FAMILY: ${{ inputs.distro_family || 'windows' }}
DISTRO_VERSION: ${{ inputs.distro_version || '11' }}
IS_DEBUG: ${{ inputs.build_type == 'Debug' && 1 || 0 }}
GPU: ${{ inputs.gpu || 'gen12.5' }}
jobs:
acceptance:
runs-on:
- "self-hosted"
- "${{ inputs.os || 'Linux' }}"
- "${{ inputs.gpu || 'gen12.5' }}"
steps:
- name: Cleanup workspace (Linux)
if: always() && runner.os == 'Linux'
run: sudo rm -rf ..?* .[!.]* *
- name: Cleanup workspace (Windows)
if: always() && runner.os == 'Windows'
run: Remove-Item -Recurse -Force .\*
- name: Checkout tests
uses: actions/checkout@v4
with:
path: tests
ref: ${{ inputs.test_ref || 'main' }}
repository: ${{ vars.TEST_REPO }}
token: ${{ secrets.TEST_REPO_TOKEN }}
- name: Download lib+dev package
uses: actions/download-artifact@v4
with:
name: ${{ inputs.lib_artifact }}
path: package
- name: Download tools package
uses: actions/download-artifact@v4
with:
name: ${{ inputs.tools_artifact }}
path: package
- name: Extract package (Linux)
if: success() && runner.os == 'Linux'
run: unzip -o package/\*.zip -d _install
- name: Extract package (Windows)
if: success() && runner.os == 'Windows'
run: >
Get-ChildItem 'package' -Filter *.zip
| Expand-Archive -DestinationPath '_install' -Force
- name: Build Docker image for GPU testing (Linux)
if: success() && runner.os == 'Linux'
run: |
cd tests/environments
DISTRO=${{ env.DISTRO_FAMILY }}${{ env.DISTRO_VERSION }}
docker build . -f Dockerfile.$DISTRO.gputest -t vpl_gputestenv:$DISTRO
- name: Test package (Linux)
if: success() && runner.os == 'Linux'
run: |
cat >test.sh <<EOL
#!/bin/bash
set -o errexit
if [[ "\$DASHBOARD_PLATFORM_SW_OPENVINO_INSTALLED" == 1 ]]; then
. /opt/intel/openvino/setupvars.sh
fi
set -o nounset
. _install/etc/vpl/vars.sh
DASHBOARD_INSTALL_ONEVPLCPU_LICENSE=
export DASHBOARD_INSTALL_ONEVPLCPU_LICENSE
DASHBOARD_INSTALL_ONEVPL32=0
export DASHBOARD_INSTALL_ONEVPL32
DASHBOARD_INSTALL_ONEVPLDEBUG=${{ env.IS_DEBUG }}
export DASHBOARD_INSTALL_ONEVPLDEBUG
DASHBOARD_PLATFORM_HW_INTEGRATED_GPU="${{ env.GPU }}"
export DASHBOARD_PLATFORM_HW_INTEGRATED_GPU
DASHBOARD_PLATFORM_OS_FAMILY=$DISTRO_FAMILY
export DASHBOARD_PLATFORM_OS_FAMILY
DASHBOARD_PLATFORM_OS_VERSION=$DISTRO_VERSION
export DASHBOARD_PLATFORM_OS_VERSION
pushd tests
./run.sh gen
EOL
chmod a+x test.sh
cat ./test.sh
DISTRO=${{ env.DISTRO_FAMILY }}${{ env.DISTRO_VERSION }}
docker run --rm \
-v $(pwd):/tmp/work \
-w /tmp/work --privileged vpl_gputestenv:$DISTRO ./test.sh
- name: Test package (Windows)
if: success() && runner.os == 'Windows'
shell: cmd
run: |
echo on
set DASHBOARD_INSTALL_ONEVPLCPU_LICENSE=
set DASHBOARD_INSTALL_ONEVPL32=0
set DASHBOARD_INSTALL_ONEVPLDEBUG=${{ env.IS_DEBUG }}
set DASHBOARD_PLATFORM_HW_CPU_MICROARCHITECTURE=
set DASHBOARD_PLATFORM_HW_INTEGRATED_GPU=${{ env.GPU }}
set DASHBOARD_PLATFORM_OS_FAMILY=${{ env.DISTRO_FAMILY }}
set DASHBOARD_PLATFORM_OS_VERSION=${{ env.DISTRO_VERSION }}
set DASHBOARD_PLATFORM_SW_CMAKE_INSTALLED=1
set DASHBOARD_PLATFORM_SW_VISUAL_STUDIO_INSTALLED=1
if exist "%INTEL_OPENVINO_DIR%\setupvars.bat" (
call "%INTEL_OPENVINO_DIR%\setupvars.bat"
set DASHBOARD_PLATFORM_SW_OPENVINO_INSTALLED=1
)
call _install\etc\vpl\vars.bat
if %errorlevel% neq 0 exit /b %errorlevel%
cd tests
run.bat gen
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: >
${{ format('{0}{1}-{2}-{3}-acceptance',
env.DISTRO_FAMILY,
env.DISTRO_VERSION,
inputs.build_type || 'Release',
inputs.gpu || 'gen12.5'
)
}}
path: tests/logs/*
- name: Cleanup workspace (Linux)
if: always() && runner.os == 'Linux'
run: sudo rm -rf ..?* .[!.]* *
- name: Cleanup workspace (Windows)
if: always() && runner.os == 'Windows'
run: Remove-Item -Recurse -Force .\*