spack/.github/workflows
Peter Scheibel bb42470211
macos: update build process to use spawn instead of fork (#18205)
Spack creates a separate process to do package installation. Different
operating systems and Python versions use different methods to create
it but up until Python 3.8 both Linux and Mac OS used "fork" (which
duplicates process memory, file descriptor table, etc.).

Python >= 3.8 on Mac OS prefers creating an entirely new process
(referred to as the "spawn" start method) because "fork" was found to
cause issues (in other words "spawn" is the default start method used
by multiprocessing.Process). Spack was dependent on the particular
behavior of fork to replicate process memory and transmit file
descriptors.

This PR refactors the Spack internals to support starting a child
process with the "spawn" method. To achieve this, it makes the
following changes:

- ensure that the package repository and other global state are
  transmitted to the child process
- ensure that file descriptors are transmitted to the child process in
  a way that works with multiprocessing and spawn
- make all the state needed for the build process and tests picklable
  (package, stage, etc.)
- move a number of locally-defined functions into global scope so that
  they can be pickled
- rework tests where needed to avoid using local functions

This PR also reworks sbang tests to work on macOS, where temporary
directories are deeper than the Linux sbang limit. We make the limit
platform-dependent (macOS supports 512-character shebangs)

See: #14102
2020-11-12 12:26:23 -08:00
..
install_spack.sh Fix MacOS build tests (#17542) 2020-07-20 17:25:42 -07:00
linux_build_tests.yaml Add testing for Python 3.9 (#19261) 2020-10-11 21:16:00 -07:00
linux_unit_tests.yaml csh: don't require SPACK_ROOT for sourcing setup-env.csh (#18225) 2020-10-23 18:54:34 -07:00
macos_python.yml Add testing for Python 3.9 (#19261) 2020-10-11 21:16:00 -07:00
macos_unit_tests.yaml macos: update build process to use spawn instead of fork (#18205) 2020-11-12 12:26:23 -08:00
setup_git.sh Use "fetch-depth: 0" to retrieve all history from remote 2020-07-29 11:23:34 -07:00
style_and_docs.yaml Add testing for Python 3.9 (#19261) 2020-10-11 21:16:00 -07:00