Skip to content

Commit 4e91497

Browse files
dyollbb-pass
authored andcommitted
fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (pybind#5621)
* Upgrade the deprecated 20.04 runners to 22.04 (ICC, NVHPC) * fix ICC compile error --------- Co-authored-by: Bryn Lloyd <[email protected]>
1 parent b391e42 commit 4e91497

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ jobs:
432432

433433
# Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds
434434
ubuntu-nvhpc7:
435-
runs-on: ubuntu-20.04
435+
runs-on: ubuntu-22.04
436436
name: "🐍 3 • NVHPC 23.5 • C++17 • x64"
437437

438438
env:
@@ -550,7 +550,7 @@ jobs:
550550

551551
# Testing on ICC using the oneAPI apt repo
552552
icc:
553-
runs-on: ubuntu-20.04
553+
runs-on: ubuntu-22.04
554554

555555
name: "🐍 3 • ICC latest • x64"
556556

include/pybind11/chrono.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class type_caster<std::chrono::time_point<std::chrono::system_clock, Duration>>
185185
using us_t = duration<int, std::micro>;
186186
auto us = duration_cast<us_t>(src.time_since_epoch() % seconds(1));
187187
if (us.count() < 0) {
188-
us += seconds(1);
188+
us += duration_cast<us_t>(seconds(1));
189189
}
190190

191191
// Subtract microseconds BEFORE `system_clock::to_time_t`, because:

0 commit comments

Comments
 (0)