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
This commit is contained in:
Massimiliano Culpo 2020-07-21 02:25:42 +02:00 committed by GitHub
parent bd236918dd
commit ab32799b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 11 deletions

View File

@ -1,5 +1,20 @@
#!/usr/bin/env sh
git clone https://github.com/spack/spack.git
echo -e "config:\n build_jobs: 2" > spack/etc/spack/config.yaml
. spack/share/spack/setup-env.sh
spack compilers
. share/spack/setup-env.sh
echo -e "config:\n build_jobs: 2" > etc/spack/config.yaml
spack config add "packages:all:target:[x86_64]"
# TODO: remove this explicit setting once apple-clang detection is fixed
cat <<EOF > etc/spack/compilers.yaml
compilers:
- compiler:
spec: apple-clang@11.0.3
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: /usr/local/bin/gfortran-9
fc: /usr/local/bin/gfortran-9
modules: []
operating_system: catalina
target: x86_64
EOF
spack compiler info apple-clang
spack debug report

View File

@ -8,6 +8,13 @@ on:
schedule:
# nightly at 1 AM
- cron: '0 1 * * *'
pull_request:
branches:
- develop
paths:
# Run if we modify this yaml file
- '.github/workflows/macos_python.yml'
# TODO: run if we touch any of the recipes involved in this
# GitHub Action Limits
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
@ -21,7 +28,8 @@ jobs:
- name: spack install
run: |
. .github/workflows/install_spack.sh
spack install -v gcc
# 9.2.0 is the latest version on which we apply homebrew patch
spack install -v --fail-fast gcc@9.2.0 %apple-clang
install_jupyter_clang:
name: jupyter
@ -32,7 +40,8 @@ jobs:
- name: spack install
run: |
. .github/workflows/install_spack.sh
spack install -v py-jupyter %apple-clang
spack config add packages:opengl:paths:opengl@4.1:/usr/X11R6
spack install -v --fail-fast py-jupyter %apple-clang
install_scipy_clang:
name: scipy, mpl, pd
@ -42,9 +51,9 @@ jobs:
- name: spack install
run: |
. .github/workflows/install_spack.sh
spack install -v py-scipy %apple-clang
spack install -v py-matplotlib %apple-clang
spack install -v py-pandas %apple-clang
spack install -v --fail-fast py-scipy %apple-clang
spack install -v --fail-fast py-matplotlib %apple-clang
spack install -v --fail-fast py-pandas %apple-clang
install_mpi4py_clang:
name: mpi4py, petsc4py
@ -54,5 +63,5 @@ jobs:
- name: spack install
run: |
. .github/workflows/install_spack.sh
spack install -v py-mpi4py %apple-clang
spack install -v py-petsc4py %apple-clang
spack install -v --fail-fast py-mpi4py %apple-clang
spack install -v --fail-fast py-petsc4py %apple-clang