mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
ci: Intel icc/icpc via oneAPI (#2573)
* CI: Intel icc/icpc via oneAPI
Add testing for Intel icc/icpc via the oneAPI images.
Intel oneAPI is in a late beta stage, currently shipping
oneAPI beta09 with ICC 20.2.
* CI: Skip Interpreter Tests for Intel
Cannot find how to add this, neiter the package `libc6-dev` nor
`intel-oneapi-mkl-devel` help when installed to solve this:
```
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - not found
CMake Error at /__t/cmake/3.18.4/x64/cmake-3.18.4-Linux-x86_64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/__t/cmake/3.18.4/x64/cmake-3.18.4-Linux-x86_64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
/__t/cmake/3.18.4/x64/cmake-3.18.4-Linux-x86_64/share/cmake-3.18/Modules/FindThreads.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
tests/test_embed/CMakeLists.txt:17 (find_package)
```
* CI: libc6-dev from GCC for ICC
* CI: Run bare metal for oneAPI
* CI: Ubuntu 18.04 for oneAPI
* CI: Intel +Catch -Eigen
* CI: CMake from Apt (ICC tests)
* CI: Replace Intel Py with GCC Py
* CI: Intel w/o GCC's Eigen
* CI: ICC with verbose make
* [Debug] Find core dump
* tests: use arg{} instead of arg() for Intel
* tests: adding a few more missing {}
* fix: sync with @tobiasleibner's branch
* fix: try ubuntu 20-04
* fix: drop exit 1
* style: clang tidy fix
* style: fix missing NOLINT
* ICC: Update Compiler Name
Changed upstream with the last oneAPI release.
* ICC CI: Downgrade pytest
pytest 6 does not capture the `discard_as_unraisable` stderr and
just writes a warning with its content instead.
* Use new test pinning requirements.txt
* tests: add notes about intel, cleanup
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -322,22 +322,24 @@ TEST_SUBMODULE(methods_and_attributes, m) {
|
||||
m.def("should_fail", [](int, UnregisteredType) {}, py::arg(), py::arg() = UnregisteredType());
|
||||
});
|
||||
|
||||
// [workaround(intel)] ICC 20/21 breaks with py::arg().stuff, using py::arg{}.stuff works.
|
||||
|
||||
// test_accepts_none
|
||||
py::class_<NoneTester, std::shared_ptr<NoneTester>>(m, "NoneTester")
|
||||
.def(py::init<>());
|
||||
m.def("no_none1", &none1, py::arg().none(false));
|
||||
m.def("no_none2", &none2, py::arg().none(false));
|
||||
m.def("no_none3", &none3, py::arg().none(false));
|
||||
m.def("no_none4", &none4, py::arg().none(false));
|
||||
m.def("no_none5", &none5, py::arg().none(false));
|
||||
m.def("no_none1", &none1, py::arg{}.none(false));
|
||||
m.def("no_none2", &none2, py::arg{}.none(false));
|
||||
m.def("no_none3", &none3, py::arg{}.none(false));
|
||||
m.def("no_none4", &none4, py::arg{}.none(false));
|
||||
m.def("no_none5", &none5, py::arg{}.none(false));
|
||||
m.def("ok_none1", &none1);
|
||||
m.def("ok_none2", &none2, py::arg().none(true));
|
||||
m.def("ok_none2", &none2, py::arg{}.none(true));
|
||||
m.def("ok_none3", &none3);
|
||||
m.def("ok_none4", &none4, py::arg().none(true));
|
||||
m.def("ok_none4", &none4, py::arg{}.none(true));
|
||||
m.def("ok_none5", &none5);
|
||||
|
||||
m.def("no_none_kwarg", &none2, py::arg("a").none(false));
|
||||
m.def("no_none_kwarg_kw_only", &none2, py::kw_only(), py::arg("a").none(false));
|
||||
m.def("no_none_kwarg", &none2, "a"_a.none(false));
|
||||
m.def("no_none_kwarg_kw_only", &none2, py::kw_only(), "a"_a.none(false));
|
||||
|
||||
// test_str_issue
|
||||
// Issue #283: __str__ called on uninitialized instance when constructor arguments invalid
|
||||
|
||||
Reference in New Issue
Block a user