Skip to content

Commit f146b2f

Browse files
committed
Fix CI to run on release branches
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent b9e007b commit f146b2f

7 files changed

Lines changed: 31 additions & 30 deletions

File tree

.github/workflows/build-msi-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all

.github/workflows/build-multi-static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all

.github/workflows/build-multi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all

.github/workflows/build-quick-static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all

.github/workflows/build-quick.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ master ]
3+
branches: [ master,release_branch* ]
44
pull_request:
5-
branches: [ master ]
5+
branches: [ master,release_branch* ]
66
workflow_dispatch:
77

88
permissions: read-all

scripts/templates/ldrddi.cpp.mako

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,27 @@ namespace loader
7979
%elif re.match(r"\w+DriverGet$", th.make_func_name(n, tags, obj)) or re.match(r"\w+InitDrivers$", th.make_func_name(n, tags, obj)):
8080
uint32_t total_driver_handle_count = 0;
8181

82-
{
83-
std::lock_guard<std::mutex> lock(loader::context->sortMutex);
84-
if (!loader::context->sortingInProgress.exchange(true) && !loader::context->instrumentationEnabled) {
85-
%if namespace != "zes":
86-
%if not re.match(r"\w+InitDrivers$", th.make_func_name(n, tags, obj)):
87-
std::call_once(loader::context->coreDriverSortOnce, []() {
88-
loader::context->driverSorting(&loader::context->zeDrivers, nullptr, false);
89-
});
90-
%else:
91-
std::call_once(loader::context->coreDriverSortOnce, [desc]() {
92-
loader::context->driverSorting(&loader::context->zeDrivers, desc, false);
93-
});
94-
%endif
95-
%else:
96-
std::call_once(loader::context->sysmanDriverSortOnce, []() {
97-
loader::context->driverSorting(loader::context->sysmanInstanceDrivers, nullptr, true);
98-
});
99-
%endif
100-
loader::context->sortingInProgress.store(false);
82+
{
83+
std::lock_guard<std::mutex> lock(loader::context->sortMutex);
84+
if (!loader::context->sortingInProgress.exchange(true) && !loader::context->instrumentationEnabled) {
85+
%if namespace != "zes":
86+
%if not re.match(r"\w+InitDrivers$", th.make_func_name(n, tags, obj)):
87+
std::call_once(loader::context->coreDriverSortOnce, []() {
88+
loader::context->driverSorting(&loader::context->zeDrivers, nullptr, false);
89+
});
90+
%else:
91+
std::call_once(loader::context->coreDriverSortOnce, [desc]() {
92+
loader::context->driverSorting(&loader::context->zeDrivers, desc, false);
93+
});
94+
%endif
95+
%else:
96+
std::call_once(loader::context->sysmanDriverSortOnce, []() {
97+
loader::context->driverSorting(loader::context->sysmanInstanceDrivers, nullptr, true);
98+
});
99+
%endif
100+
loader::context->sortingInProgress.store(false);
101+
}
101102
}
102-
}
103103

104104
%if namespace != "zes":
105105
for( auto& drv : loader::context->zeDrivers )

scripts/templates/ze_loader_internal.h.mako

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ namespace loader
121121
std::once_flag coreDriverSortOnce;
122122
std::once_flag sysmanDriverSortOnce;
123123
std::atomic<bool> sortingInProgress = {false};
124+
std::mutex sortMutex;
124125
bool instrumentationEnabled = false;
125126
dditable_t tracing_dditable = {};
126127
std::shared_ptr<Logger> zel_logger;

0 commit comments

Comments
 (0)