Skip to content

fix: icc needs cast, upgrade 20.04 runners to 22.04 (ICC, NVHPC) #5621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ jobs:

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

env:
Expand Down Expand Up @@ -550,7 +550,7 @@ jobs:

# Testing on ICC using the oneAPI apt repo
icc:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

name: "🐍 3 • ICC latest • x64"

Expand Down
2 changes: 1 addition & 1 deletion include/pybind11/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class type_caster<std::chrono::time_point<std::chrono::system_clock, Duration>>
using us_t = duration<int, std::micro>;
auto us = duration_cast<us_t>(src.time_since_epoch() % seconds(1));
if (us.count() < 0) {
us += seconds(1);
us += duration_cast<us_t>(seconds(1));
}

// Subtract microseconds BEFORE `system_clock::to_time_t`, because:
Expand Down
Loading