Skip to content

Commit ae454a8

Browse files
Merge branch 'main' into dev/asolovev_ci_public
2 parents 987930b + 815f98c commit ae454a8

57 files changed

Lines changed: 1208 additions & 322 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/env/bazelisk.ps1

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#===============================================================================
2+
# Copyright contributors to the oneDAL project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#===============================================================================
16+
17+
$ErrorActionPreference = "Stop"
18+
19+
$bazeliskVersion = "v1.29.0"
20+
$assetName = "bazelisk-windows-amd64.exe"
21+
$installDir = Join-Path (Get-Location) "bazel\bin"
22+
$bazelPath = Join-Path $installDir "bazel.exe"
23+
24+
$headers = @{
25+
Accept = "application/vnd.github+json"
26+
"X-GitHub-Api-Version" = "2022-11-28"
27+
}
28+
29+
if ($env:GITHUB_TOKEN) {
30+
$headers.Authorization = "Bearer $env:GITHUB_TOKEN"
31+
}
32+
33+
$release = Invoke-RestMethod `
34+
-Headers $headers `
35+
-Uri "https://api.github.com/repos/bazelbuild/bazelisk/releases/tags/$bazeliskVersion"
36+
37+
$asset = $release.assets | Where-Object { $_.name -eq $assetName } | Select-Object -First 1
38+
if (-not $asset) {
39+
throw "Could not find $assetName in Bazelisk release $bazeliskVersion"
40+
}
41+
42+
New-Item -ItemType Directory -Force -Path $installDir | Out-Null
43+
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $bazelPath
44+
45+
if (-not $asset.digest.StartsWith("sha256:")) {
46+
throw "Unexpected Bazelisk digest format: $($asset.digest)"
47+
}
48+
49+
$expectedHash = $asset.digest.Substring("sha256:".Length)
50+
$actualHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $bazelPath).Hash.ToLowerInvariant()
51+
if ($actualHash -ne $expectedHash.ToLowerInvariant()) {
52+
throw "Bazelisk SHA256 mismatch. Expected $expectedHash, got $actualHash"
53+
}
54+
55+
$pathLine = $installDir
56+
if ($env:GITHUB_PATH) {
57+
$pathLine | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
58+
}
59+
else {
60+
$env:PATH = "$installDir;$env:PATH"
61+
}
62+
63+
& $bazelPath --version

.ci/env/tbb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -eo pipefail
2020
SCRIPT_PATH=$(readlink -f "${BASH_SOURCE[0]}")
2121
SCRIPT_DIR=$(dirname "${SCRIPT_PATH}")
2222
ONEDAL_DIR=$(readlink -f "${SCRIPT_DIR}/../..")
23-
TBB_DEFAULT_VERSION=v2023.0.0
23+
TBB_DEFAULT_VERSION=v2023.1.0
2424

2525
# Function to display help
2626
show_help() {

.ci/pipeline/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pr:
3939

4040
variables:
4141
OPENBLAS_VERSION : 'v0.3.27'
42-
TBB_VERSION : 'v2023.0.0'
42+
TBB_VERSION : 'v2023.1.0'
4343
VM_IMAGE : 'ubuntu-24.04'
4444
WIN_VM_IMAGE : 'windows-2022'
4545
SYSROOT_OS: 'noble'
@@ -290,7 +290,7 @@ jobs:
290290
platform.type : 'lnxriscv64'
291291
OPENBLAS_VERSION : 'v0.3.27'
292292
OPENBLAS_CACHE_DIR : $(Pipeline.Workspace)/openblas-riscv64-clang
293-
TBB_VERSION : 'v2023.0.0'
293+
TBB_VERSION : 'v2023.1.0'
294294
TBB_CACHE_DIR : $(Pipeline.Workspace)/tbb-riscv64-clang
295295
SYSROOT_CACHE_DIR: $(Pipeline.Workspace)/sysroot-riscv64
296296
pool:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#===============================================================================
2+
# Copyright contributors to the oneDAL project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#===============================================================================
16+
17+
param(
18+
[string] $MakeReleaseDir = "__release_win_vc\daal\latest",
19+
[string] $BazelReleaseDir = "bazel-bin\release\daal\latest",
20+
[int] $CheckLevel = 4,
21+
[int] $MaxDiffLines = 200
22+
)
23+
24+
$ErrorActionPreference = "Stop"
25+
26+
$repoRoot = Resolve-Path -LiteralPath (Join-Path $PSScriptRoot "..\..")
27+
$compareScript = Join-Path $repoRoot "dev\release_tests\compare_release_trees.py"
28+
29+
python $compareScript `
30+
--platform windows `
31+
--make $MakeReleaseDir `
32+
--bazel $BazelReleaseDir `
33+
--check-level $CheckLevel `
34+
--summary-limit $MaxDiffLines
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#===============================================================================
2+
# Copyright 2026 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#===============================================================================
16+
17+
param(
18+
[string]$ReleaseDir = ".\bazel-bin\release\daal\latest",
19+
[string]$ExamplesDir = "examples\oneapi\cpp",
20+
[string]$ExampleSource = "source\basic_statistics\basic_statistics_dense_batch.cpp",
21+
[string]$ExampleTarget = "basic_statistics_dense_batch"
22+
)
23+
24+
$ErrorActionPreference = "Stop"
25+
26+
$releasePath = (Resolve-Path $ReleaseDir).Path
27+
$examplesPath = Join-Path $releasePath $ExamplesDir
28+
$buildPath = Join-Path $examplesPath "Build"
29+
30+
if (Test-Path $buildPath) {
31+
Remove-Item -Recurse -Force $buildPath
32+
}
33+
34+
$pathEntries = @(
35+
(Join-Path $releasePath "redist\intel64"),
36+
(Join-Path $releasePath "lib")
37+
)
38+
39+
$tbbDirCandidates = @(
40+
".\oneapi\tbb\latest\lib\cmake\tbb",
41+
".\__deps\tbb\win\tbb\lib\cmake\tbb"
42+
)
43+
$tbbRedistCandidates = @(
44+
".\oneapi\tbb\latest\redist\intel64\vc_mt",
45+
".\__deps\tbb\win\tbb\redist\intel64\vc_mt"
46+
)
47+
48+
$cmakeArgs = @(
49+
"-B", $buildPath,
50+
"-S", $examplesPath,
51+
"-DONEDAL_LINK=dynamic",
52+
"-DCMAKE_PREFIX_PATH=$releasePath",
53+
"-DEXAMPLES_LIST=$ExampleTarget"
54+
)
55+
56+
foreach ($candidate in $tbbDirCandidates) {
57+
if (Test-Path $candidate) {
58+
$cmakeArgs += "-DTBB_DIR=$((Resolve-Path $candidate).Path)"
59+
break
60+
}
61+
}
62+
63+
foreach ($candidate in $tbbRedistCandidates) {
64+
if (Test-Path $candidate) {
65+
$pathEntries += (Resolve-Path $candidate).Path
66+
break
67+
}
68+
}
69+
70+
$env:PATH = (($pathEntries | Where-Object { Test-Path $_ }) -join ";") + ";" + $env:PATH
71+
72+
Write-Host "Configuring CMake example from Bazel release: $examplesPath"
73+
cmake @cmakeArgs
74+
75+
Write-Host "Building CMake example target: $ExampleTarget"
76+
cmake --build $buildPath --config Release --target $ExampleTarget
77+
78+
$exampleExe = Get-ChildItem -Path @($buildPath, $examplesPath) -Recurse -Filter "$ExampleTarget.exe" -File |
79+
Select-Object -First 1
80+
if ($null -eq $exampleExe) {
81+
Write-Host "Available executables under examples directory:"
82+
Get-ChildItem -Path $examplesPath -Recurse -Filter "*.exe" -File | ForEach-Object { Write-Host " $($_.FullName)" }
83+
throw "Cannot find built example executable: $ExampleTarget.exe"
84+
}
85+
86+
Write-Host "Running CMake example: $($exampleExe.FullName)"
87+
Push-Location $examplesPath
88+
try {
89+
& $exampleExe.FullName
90+
if ($LASTEXITCODE -ne 0) {
91+
throw "Example failed with exit code $LASTEXITCODE"
92+
}
93+
}
94+
finally {
95+
Pop-Location
96+
}

.github/workflows/ci-aarch64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
env:
2828
DEP_DIR: ${{ github.workspace }}/__deps
29-
TBB_VERSION: v2023.0.0
29+
TBB_VERSION: v2023.1.0
3030
OPENBLAS_VERSION: v0.3.29
3131
OPENRNG_VERSION: 'v24.04'
3232

@@ -57,7 +57,7 @@ jobs:
5757
# Faster builds where possible. Fix version of CMake and Ninja.
5858
# Note: This will create a github actions cache
5959
- name: Get CMake and Ninja
60-
uses: lukka/get-cmake@f5b8fbb4d77cec1acc5a5f9f0df4beffaf5d98d9 # v4.3.4
60+
uses: lukka/get-cmake@e6906078ebd1ccb8ce51ab4626ac46a1b5a517e3 # v4.4.0
6161
with:
6262
cmakeVersion: 3.31.0
6363
ninjaVersion: 1.12.0
@@ -134,7 +134,7 @@ jobs:
134134
# Faster builds where possible. Fix version of CMake and Ninja.
135135
# Note: This will create a github actions cache
136136
- name: Get CMake and Ninja
137-
uses: lukka/get-cmake@f5b8fbb4d77cec1acc5a5f9f0df4beffaf5d98d9 # v4.3.4
137+
uses: lukka/get-cmake@e6906078ebd1ccb8ce51ab4626ac46a1b5a517e3 # v4.4.0
138138
with:
139139
cmakeVersion: 3.31.0
140140
ninjaVersion: 1.12.0

.github/workflows/docs-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fetch-depth: 0 # Ensures all tags are fetched
4141

4242
- name: Set Up Python
43-
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
43+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
4444
with:
4545
python-version: "3.14"
4646

.github/workflows/nightly-build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ on:
2828
paths:
2929
- .github/workflows/nightly-build.yml
3030
- .ci/pipeline/ci.yml
31+
- .bazelrc
32+
- MODULE.bazel
33+
- BUILD
3134
- makefile
3235
- '.ci/env/**'
3336
- '.ci/scripts/**'
37+
- 'dev/bazel/**'
38+
- 'dev/release_tests/**'
3439
- 'dev/make/**'
3540
- 'dev/make/compiler_definitions/**'
3641
- 'dev/make/function_definitions/**'
@@ -72,6 +77,20 @@ jobs:
7277
run: |
7378
source /opt/intel/oneapi/setvars.sh
7479
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal
80+
- name: Install Bazelisk
81+
run: .ci/env/bazelisk.sh
82+
- name: Bazel release
83+
run: |
84+
source /opt/intel/oneapi/setvars.sh
85+
bazel build //:release --config=release-dpc --cpu=avx2
86+
- name: Compare make and Bazel releases
87+
run: |
88+
source /opt/intel/oneapi/setvars.sh
89+
python dev/release_tests/compare_release_trees.py \
90+
--platform linux \
91+
--make ./__release_lnx/daal/latest \
92+
--bazel ./bazel-bin/release/daal/latest \
93+
--check-level 4
7594
- name: Archive build
7695
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7796
with:
@@ -125,6 +144,32 @@ jobs:
125144
call .\oneapi\setvars.bat
126145
call .\oneapi\compiler\latest\bin\sycl-ls.exe
127146
call .\.ci\scripts\build.bat onedal_dpc vc avx2
147+
- name: Install Bazelisk
148+
shell: pwsh
149+
run: .\.ci\env\bazelisk.ps1
150+
- name: Bazel release
151+
shell: cmd
152+
run: |
153+
set PATH=C:\msys64\usr\bin;%PATH%
154+
call .\oneapi\setvars.bat
155+
call "%ONEAPI_ROOT%\setvars-vcvarsall.bat" %VS_VER%
156+
bazel build //:release --config=release-dpc --cpu=avx2
157+
- name: Compare make and Bazel releases
158+
shell: cmd
159+
run: |
160+
call .\oneapi\setvars.bat
161+
call "%ONEAPI_ROOT%\setvars-vcvarsall.bat" %VS_VER%
162+
powershell -NoProfile -ExecutionPolicy Bypass -File .\.ci\scripts\compare_windows_release.ps1 ^
163+
-MakeReleaseDir .\__release_win_vc\daal\latest ^
164+
-BazelReleaseDir .\bazel-bin\release\daal\latest ^
165+
-CheckLevel 4
166+
- name: Build and run CMake example from Bazel release
167+
shell: cmd
168+
run: |
169+
call .\oneapi\setvars.bat
170+
call "%ONEAPI_ROOT%\setvars-vcvarsall.bat" %VS_VER%
171+
powershell -NoProfile -ExecutionPolicy Bypass -File .\.ci\scripts\test_bazel_release_cmake_example.ps1 ^
172+
-ReleaseDir .\bazel-bin\release\daal\latest
128173
- name: Compress Intel BaseKit
129174
shell: cmd
130175
run: |

0 commit comments

Comments
 (0)