Repository navigation
194 lines (171 loc) · 6.18 KB
/
Copy pathci.yml
File metadata and controls
194 lines (171 loc) · 6.18 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
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
194
---
# This is an experimental workflow exercising unification of the PTI
# and Unitrace build.
#
# Avoid running on every PR until the tests are ported over.
name: ci
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *' # Daily 5:00 AM UTC
push:
branches: [ "master" ]
paths:
- .github/workflows/ci.yml
- VERSION
- '**/CMakeLists.txt'
- '**/*.cmake'
pull_request:
branches: [ "master" ]
paths:
- .github/workflows/ci.yml
- VERSION
- '**/CMakeLists.txt'
- '**/*.cmake'
permissions:
contents: read
jobs:
build-lin:
if: vars.PTI_RUN_TESTS == 1
name: Build PTI ${{ matrix.os_id }} ${{ matrix.tags }}
runs-on: ${{ fromJSON(matrix.tags) }}
timeout-minutes: 20
defaults:
run:
shell: bash
strategy:
matrix:
include:
- container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }}
tags: '["self-hosted", "Linux", "pti", "PVC"]'
os_id: "ubuntu-24.04.server.2026.1"
- container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }}
tags: '["self-hosted", "Linux", "pti", "BMG"]'
os_id: "ubuntu-24.04.client.2026.1"
container:
image: ${{ matrix.container }}
options: --device=/dev/dri --cap-add CAP_PERFMON --shm-size=24G --volume=/dev/dri/by-path:/dev/dri/by-path
steps:
- name: Clean
run: |
shopt -s dotglob
rm -rf ./*
- name: Checkout
uses: actions/checkout@v4
- name: GitHub Proxy Usage
uses: ./.github/actions/github-proxy-usage
with:
proxy: ${{ vars.PTI_GIT_PROXY }}
runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }}
- name: Configure Environment
run: |
echo "CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc)/2))" >> "$GITHUB_ENV"
- name: Build
run: |
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_C_COMPILER=icx \
-GNinja -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON
cmake --build build
- name: Test
run: |
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
ctest --test-dir build --no-tests=error --output-on-failure \
-LE "performance|quarantine" \
-E "test_unitrace"
- name: Package
run: |
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
cpack -G TGZ --config build/CPackConfig.cmake
- name: Upload
uses: actions/upload-artifact@v4
with:
name: pti-gpu-${{ matrix.os_id }}
path: |
pti*.tar.gz*
build-win:
if: vars.PTI_RUN_TESTS == 1
name: Build PTI for Windows
runs-on: [self-hosted, Windows, pti, ARC]
timeout-minutes: 20
env:
LEVEL_ZERO_LOADER_VERSION: 1.32.0
defaults:
run:
shell: cmd
steps:
- name: Clean
shell: bash
run: |
shopt -s dotglob
rm -rf ./*
- name: Checkout
uses: actions/checkout@v4
- name: Configure Environment
run: |
set /A JOBS=%NUMBER_OF_PROCESSORS%/2
>>%GITHUB_ENV% echo CMAKE_BUILD_PARALLEL_LEVEL=%JOBS%
# Can't dynamically acquire yet - needs to be an agreement between
# `tools/unitrace` and `sdk`
- name: Get Level Zero Loader Version
id: loader-ver
run: |
@echo off
>>%GITHUB_OUTPUT% echo ze_loader_ver=%LEVEL_ZERO_LOADER_VERSION%
- uses: actions/cache@v4
id: cache
with:
path: sdk/level-zero-sdk
key: ${{ runner.os }}-ci-Ze-Loader-${{ steps.loader-ver.outputs.ze_loader_ver }}
- name: Download Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
rmdir /S /Q sdk\level-zero-sdk
del /s level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip
echo https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip
curl.exe -L -O https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip
7z x level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip -osdk\level-zero-sdk
>>%GITHUB_STEP_SUMMARY% echo **Successfully Downloaded Level Zero Loader Version:** %LEVEL_ZERO_LOADER_VERSION%
- name: Build
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
cmake -S . -B build ^
-DCMAKE_CXX_COMPILER=icx ^
-DCMAKE_C_COMPILER=icx ^
-GNinja -DCMAKE_BUILD_TYPE=Release ^
-DBUILD_TESTING=ON ^
-DLevelZero_ROOT=${{ github.workspace }}/sdk/level-zero-sdk ^
-DFETCHCONTENT_BASE_DIR=${{ runner.temp }}/_deps ^
-DCMAKE_OBJECT_PATH_MAX=300
cmake --build build
- name: Test
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
REM TODO(PTI-88): OverheadRecordsCountsAllOnesViewRecords fails on Windows. Investigation needed. Bug filed.
ctest --test-dir build --no-tests=error --output-on-failure ^
-LE "performance|quarantine" ^
-E "MainFixtureTest.OverheadRecordsCountsAllOnesViewRecords|test_unitrace"
- name: Package
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
cpack -G ZIP --config build/CPackConfig.cmake
- name: Upload
uses: actions/upload-artifact@v4
with:
name: pti-gpu-windows
path: |
pti*.zip*