diff options
Diffstat (limited to '.github')
-rwxr-xr-x | .github/workflows/install_spack.sh | 23 | ||||
-rw-r--r-- | .github/workflows/linux_build_tests.yaml | 3 | ||||
-rw-r--r-- | .github/workflows/linux_unit_tests.yaml | 80 | ||||
-rw-r--r-- | .github/workflows/macos_python.yml | 23 | ||||
-rw-r--r-- | .github/workflows/macos_unit_tests.yaml | 3 | ||||
-rw-r--r-- | .github/workflows/minimum_python_versions.yaml | 3 |
6 files changed, 118 insertions, 17 deletions
diff --git a/.github/workflows/install_spack.sh b/.github/workflows/install_spack.sh index 5efae461a5..bc1c5f43ec 100755 --- a/.github/workflows/install_spack.sh +++ b/.github/workflows/install_spack.sh @@ -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 diff --git a/.github/workflows/linux_build_tests.yaml b/.github/workflows/linux_build_tests.yaml index ecdf38bfe4..3f5c575df3 100644 --- a/.github/workflows/linux_build_tests.yaml +++ b/.github/workflows/linux_build_tests.yaml @@ -3,13 +3,12 @@ name: linux builds on: push: branches: - - master - develop - releases/** pull_request: branches: - - master - develop + - releases/** paths-ignore: # Don't run if we only modified packages in the built-in repository - 'var/spack/repos/builtin/**' diff --git a/.github/workflows/linux_unit_tests.yaml b/.github/workflows/linux_unit_tests.yaml index 3130bfa36e..78fd0e8ce0 100644 --- a/.github/workflows/linux_unit_tests.yaml +++ b/.github/workflows/linux_unit_tests.yaml @@ -60,3 +60,83 @@ jobs: uses: codecov/codecov-action@v1 with: flags: unittests,linux + flake8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install Python packages + run: | + pip install --upgrade pip six setuptools flake8 + - name: Setup git configuration + run: | + # Need this for the git tests to succeed. + git --version + git config --global user.email "spack@example.com" + git config --global user.name "Test User" + git fetch -u origin develop:develop + - name: Run flake8 tests + run: | + share/spack/qa/run-flake8-tests + shell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install System packages + run: | + sudo apt-get -y update + sudo apt-get install -y coreutils gfortran gnupg2 mercurial ninja-build patchelf zsh fish + # Needed for kcov + sudo apt-get -y install cmake binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev + - name: Install Python packages + run: | + pip install --upgrade pip six setuptools codecov coverage + - name: Setup git configuration + run: | + # Need this for the git tests to succeed. + git --version + git config --global user.email "spack@example.com" + git config --global user.name "Test User" + git fetch -u origin develop:develop + - name: Install kcov for bash script coverage + env: + KCOV_VERSION: 38 + run: | + KCOV_ROOT=$(mktemp -d) + wget --output-document=${KCOV_ROOT}/${KCOV_VERSION}.tar.gz https://github.com/SimonKagstrom/kcov/archive/v${KCOV_VERSION}.tar.gz + tar -C ${KCOV_ROOT} -xzvf ${KCOV_ROOT}/${KCOV_VERSION}.tar.gz + mkdir -p ${KCOV_ROOT}/build + cd ${KCOV_ROOT}/build && cmake -Wno-dev ${KCOV_ROOT}/kcov-${KCOV_VERSION} && cd - + make -C ${KCOV_ROOT}/build && sudo make -C ${KCOV_ROOT}/build install + - name: Run shell tests + env: + COVERAGE: true + run: | + share/spack/qa/run-shell-tests + - name: Upload to codecov.io + uses: codecov/codecov-action@v1 + with: + flags: shelltests,linux + documentation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install System packages + run: | + sudo apt-get -y update + sudo apt-get install -y coreutils ninja-build graphviz + - name: Install Python packages + run: | + pip install --upgrade pip six setuptools + pip install --upgrade -r lib/spack/docs/requirements.txt + - name: Build documentation + run: | + share/spack/qa/run-doc-tests diff --git a/.github/workflows/macos_python.yml b/.github/workflows/macos_python.yml index e136102a46..6134ef4cf2 100644 --- a/.github/workflows/macos_python.yml +++ b/.github/workflows/macos_python.yml @@ -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 %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 %clang - spack install -v py-matplotlib %clang - spack install -v py-pandas %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 %clang - spack install -v py-petsc4py %clang + spack install -v --fail-fast py-mpi4py %apple-clang + spack install -v --fail-fast py-petsc4py %apple-clang diff --git a/.github/workflows/macos_unit_tests.yaml b/.github/workflows/macos_unit_tests.yaml index 38feb2fc6a..f1e856070c 100644 --- a/.github/workflows/macos_unit_tests.yaml +++ b/.github/workflows/macos_unit_tests.yaml @@ -3,13 +3,12 @@ name: macos tests on: push: branches: - - master - develop - releases/** pull_request: branches: - - master - develop + - releases/** jobs: build: diff --git a/.github/workflows/minimum_python_versions.yaml b/.github/workflows/minimum_python_versions.yaml index 474f091514..a6ab5dfa40 100644 --- a/.github/workflows/minimum_python_versions.yaml +++ b/.github/workflows/minimum_python_versions.yaml @@ -3,13 +3,12 @@ name: python version check on: push: branches: - - master - develop - releases/** pull_request: branches: - - master - develop + - releases/** jobs: validate: |