Commit graph

81 commits

Author SHA1 Message Date
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
Todd Gamblin
560beb098e
csh: don't require SPACK_ROOT for sourcing setup-env.csh (#18225)
Don't require SPACK_ROOT for sourcing setup-env.csh and make output more consistent
2020-10-23 18:54:34 -07:00
Adam J. Stewart
372ac4a073
Add testing for Python 3.9 (#19261) 2020-10-11 21:16:00 -07:00
Adam J. Stewart
cc136c27a9
Fix failing mpich build tests (#19259)
By default Spack uses the latest (highest version) GCC 
compiler available, which might change across updates
of the Github CI environment.

Since a C compiler is always installed and `mpich~fortran`
will result in faster build times, avoid building the FORTRAN
interface as part of the test.
2020-10-11 20:49:59 +02:00
Adam J. Stewart
d183d16abb
macOS CI: replace jupyter with jupyterlab (#19029) 2020-09-28 17:43:56 -07:00
Adam J. Stewart
443407cda5
Add new RubyPackage build system base class (#18199)
* Add new RubyPackage build system base class

* Ruby: add spack external find support

* Add build tests for RubyPackage
2020-09-02 16:26:36 -07:00
Rui Xue
d9b945f663
Mac OS: support Python >= 3.8 by using fork-based multiprocessing (#18124)
As detailed in https://bugs.python.org/issue33725, starting new
processes with 'fork' on Mac OS is not guaranteed to work in general.
As of Python 3.8 the default process spawning mechanism was changed
to avoid this issue.

Spack depends on the fork-based method to preserve file descriptors
transparently, to preserve global state, and to avoid pickling some
objects. An effort is underway to remove dependence on fork-based
process spawning (see #18205). In the meantime, this allows Spack to
run with Python 3.8 on Mac OS by explicitly choosing to use 'fork'.

Co-authored-by: Peter Josef Scheibel <scheibel1@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-09-02 00:15:39 -07:00
Massimiliano Culpo
b1133fab22 MacOS nightly builds: use Python 3.7 in CI
Nightly builds with MacOS started failing again
due to an upgrade of the default virtual environment
that now uses Python 3.8

This makes us hit #14102 and every build fails. This
commit should be reverted along with the fix to #14102.
2020-08-03 17:23:10 -07:00
Massimiliano Culpo
c65cde4cf8
Avoid update and upgrades to brew (#17815)
Ci is currently failing on brew update with the error:
```
Error: Cannot install bazelisk because conflicting formulae are installed.
  bazel: because Bazelisk replaces the bazel binary

Please `brew unlink bazel` before continuing.

Unlinking removes a formula's symlinks from /usr/local. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side effects in the
resulting software.
```
Avoiding:
```
$ brew update
$ brew upgrade
```
solves the issue by preventing the risk of conflicting formulae
2020-08-01 07:45:39 +02:00
Massimiliano Culpo
9dbad500bc
Move Python 2.6 unit tests to Github Actions (#17279)
* Run Python2.6 unit tests on Github Actions
* Skip url tests on Python 2.6 to reduce waiting times
* Skip foreground background tests on Python 2.6 to reduce waiting times
* Removed references to Travis in the documentation
* Deleted install_patchelf.sh (can be installed from repo on CentOS 6)
2020-07-31 15:01:12 -07:00
Massimiliano Culpo
3e1661a183 Use "fetch-depth: 0" to retrieve all history from remote 2020-07-29 11:23:34 -07:00
Massimiliano Culpo
c4f29c6384 Simplified YAML files for Github Actions workflows
Updated actions where needed
2020-07-29 11:23:34 -07:00
Massimiliano Culpo
1f7f076189 Group tests with similar duration together
Style and documentation tests take just a few minutes
to run. Since in Github actions one can't restart a single
job but needs to restart an entire workflow, here we group
tests with similar duration together.
2020-07-29 11:23:34 -07:00
Massimiliano Culpo
ab32799b52
Fix MacOS build tests (#17542)
* MacOS build tests

- Run on PR that modify the YAML file of the workflow
- Don't clone Spack, since we are in the Spack repo now

* Try to add opengl to configuration to build jupyter

* fixup
2020-07-20 17:25:42 -07:00
Todd Gamblin
11088df402 Remove references to master from CI
- [x] remove master from github actions
- [x] remove master from .travis.yml
- [x] make `develop` the default branch for `spack ci`
2020-07-06 11:39:19 -07:00
Massimiliano Culpo
a5eabfad91
Moved flake8, shell and documentation tests to Github Action (#17328)
* Move flake8 tests on Github Actions

* Move shell test to Github Actions

* Moved documentation build to Github Action

* Don't run coverage on Python 2.6

Since we get connection errors consistently on Travis
when trying to upload coverage results for Python 2.6,
avoid computing coverage entirely to speed-up tests.
2020-07-01 11:58:53 -05:00
Greg Becker
4433e4de2d
Use apple-clang for MacOS nightly tests (#17320) 2020-07-01 08:21:08 +02:00
Greg Becker
cec55577d4
run github workflows on release branches (#17317) 2020-06-30 18:10:10 -05:00
Massimiliano Culpo
239b709f97
Added unit tests to Github Actions (#16610)
* Added unit tests to Github Actions

* Set user e-mail and name for git tests to succeed

* Simplify setup.sh logic

* Replicate Travis script on Github Actions

* Update flags since '.' is not allowed

* Added badge, simplified workflow

* Remove pinning of coverage

* Remove unit tests run on Github Actions from Travis
2020-06-23 08:24:02 -05:00
Massimiliano Culpo
5fc88a7c65
Skip failing test on MacOS (#17072)
* Skip failing test on MacOS

* Update setup-python action and unpin coverage
2020-06-15 13:24:56 -05:00
Massimiliano Culpo
8c12030498 Fix MacOS tests on develop
The -u option allows to update the current head,
so tests won't fail if we are on develop
2020-05-09 17:41:57 -07:00
Axel Huebl
29105da445 macOS nightly: +1hr py-jupyter
check if failures ares actually a real timeout or an error that
just causes a hang.
2020-05-09 17:41:10 -07:00
Axel Huebl
2b234b7a66 macOS nightly: two cores
All GitHub actions provide two cores. Just make sure this does not
get oversubscribed with potentially visible additional physical
cores.
2020-05-09 17:41:10 -07:00
Massimiliano Culpo
05203ec3fb
Add unit test on MacOS using Github Actions (#14220)
- Remove macos tests from travis
- Add macos tests in github actions.
2020-05-09 13:35:14 -07:00
Axel Huebl
bf203383bd
macOS Package Builds (nightly) (#16345)
Add nightly builds for popular and commonly used packages on
macOS that should improve the onramp user experience if
working well.
2020-05-06 11:51:29 -07:00
Adam J. Stewart
93e22426a6
Don't run linux build tests for doc PRs (#15895) 2020-04-07 09:09:08 +02:00
Massimiliano Culpo
a22d52a67d
Minor updates to CI configuration (#15458)
* Check on Python versions uses action/checkout@v2
* Update the apt cache before installing system packages
2020-03-12 08:19:42 +01:00
Massimiliano Culpo
2fbc774c8b Use checkout v2 to avoid issues on retriggering 2020-02-27 16:34:24 -08:00
Todd Gamblin
9192f046d2 tests: rename checks in github actions
I usually want to look at the Travis CI output, but I currently have to
scroll down to see it. This renames checks to be a bit shorter and more
consistent with Travis's naming, and also so that actions appear lower
than travis and codecov in the list of checks.
2019-12-31 17:59:59 -08:00
Massimiliano Culpo
2aa8132afd Migrate build tests from Travis to Github Actions (#13967)
This PR moves build smoke tests from TravisCI and migrates them to Github Actions. The result is that build tests are performed in parallel with unit tests and they don't hog additional resources on Travis. The workflow will not run if a PR only changes packages in the built-in repository, but will always run on pushes to develop or master.

* Removed build tests from Travis and passed them to Github Actions
* Store ~/.ccache in Github Actions cache
* Add filters on paths and make sure this workflow don't run
* Use paths-ignore and exclude only files in the built-in repo
* Added a badge to README.md
2019-12-25 00:06:48 -08:00
Massimiliano Culpo
d333e14721 tests: check min required python version with vermin (#14289)
This commit removes the `python_version.py` unit test module
and the vendored dependencies `pyqver2.py` and `pyqver3.py`.
It substitutes them with an equivalent check done using
`vermin` that is run as a separate workflow via Github Actions.

This allows us to delete 2 vendored dependencies that are unmaintained
and substitutes them with a maintained tool.

Also, updates the list of vendored dependencies.
2019-12-24 09:28:33 -08:00