spack/.github/workflows
Massimiliano Culpo 39b9f214a8
Speed-up spack external find execution (#39843)
* Perform external spec detection with multiple workers

The logic to perform external spec detection has been refactored
into classes. These classes use the GoF "template" pattern to account
for the small differences between searching for "executables" and
for "libraries", while unifying the larger part of the algorithm.

A ProcessPoolExecutor is used to parallelize the work.

* Speed-up external find by tagging detectable packages automatically

Querying packages by tag is much faster than inspecting the repository,
since tags are cached. This commit adds a "detectable" tag to every
package that implements the detection protocol, and external detection
uses it to search for packages.

* Pass package names instead of package classes to workers

The slowest part of the search is importing the Python modules
associated with candidate packages. The import is done serially
before we distribute the work to the pool of executors.

This commit pushes the import of the Python module to the job
performed by the workers, and passes just the name of the packages
to the executors.

In this way imports can be done in parallel.

* Rework unit-tests for Windows

Some unit tests were doing a full e2e run of a command
just to check a input handling. Make the test more
focused by just stressing a specific function.

Mark as xfailed 2 tests on Windows, that will be fixed
by a PR in the queue. The tests are failing because we
monkeypatch internals in the parent process, but the
monkeypatching is not done in the "spawned" child
process.
2023-09-08 09:25:50 +02:00
..
audit.yaml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
bootstrap-test.sh Deprecate spack bootstrap trust/untrust (#33600) 2022-10-29 12:24:26 -07:00
bootstrap.yml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
build-containers.yml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
ci.yaml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
execute_installer.ps1 Add Github Actions for Windows (#24504) 2022-03-17 09:01:01 -07:00
generate_spack_yaml_containerize.sh Update Dockerfiles and images for Spack v0.18.0 (#30216) 2022-04-22 08:51:26 +02:00
install_spack.sh Update actions/setup-python to latest version (#28634) 2022-01-28 14:17:59 +01:00
nightly-win-builds.yml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
setup_git.ps1 Consolidate how Spack uses git (#34700) 2022-12-28 00:44:11 -08:00
setup_git.sh Consolidate how Spack uses git (#34700) 2022-12-28 00:44:11 -08:00
system_shortcut_check.ps1 Add Github Actions for Windows (#24504) 2022-03-17 09:01:01 -07:00
unit_tests.yaml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
valid-style.yml build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#39789) 2023-09-05 09:52:14 +02:00
windows_python.yml Speed-up spack external find execution (#39843) 2023-09-08 09:25:50 +02:00