summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/bootstrap.yml33
-rw-r--r--.github/workflows/build-containers.yml6
-rw-r--r--.github/workflows/unit_tests.yaml83
3 files changed, 79 insertions, 43 deletions
diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 5b3e237b0c..ec7d9a3898 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -1,6 +1,8 @@
name: Bootstrapping
on:
+ # This Workflow can be triggered manually
+ workflow_dispatch:
pull_request:
branches:
- develop
@@ -76,13 +78,42 @@ jobs:
spack -d solve zlib
tree ~/.spack/bootstrap/store/
+ ubuntu-clingo-binaries-and-patchelf:
+ runs-on: ubuntu-latest
+ container: "ubuntu:latest"
+ steps:
+ - name: Install dependencies
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ apt-get update -y && apt-get upgrade -y
+ apt-get install -y \
+ bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
+ make patch unzip xz-utils python3 python3-dev tree
+ - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # @v2
+ - name: Setup repo and non-root user
+ run: |
+ git --version
+ git fetch --unshallow
+ . .github/workflows/setup_git.sh
+ useradd -m spack-test
+ chown -R spack-test .
+ - name: Bootstrap clingo
+ shell: runuser -u spack-test -- bash {0}
+ run: |
+ source share/spack/setup-env.sh
+ spack -d solve zlib
+ tree ~/.spack/bootstrap/store/
+
+
opensuse-clingo-sources:
runs-on: ubuntu-latest
container: "opensuse/leap:latest"
steps:
- name: Install dependencies
run: |
- zypper update -y
+ # Harden CI by applying the workaround described here: https://www.suse.com/support/kb/doc/?id=000019505
+ zypper update -y || zypper update -y
zypper install -y \
bzip2 curl file gcc-c++ gcc gcc-fortran tar git gpg2 gzip \
make patch unzip which xz python3 python3-devel tree \
diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml
index a55e0daa77..1e996111b8 100644
--- a/.github/workflows/build-containers.yml
+++ b/.github/workflows/build-containers.yml
@@ -12,6 +12,7 @@ on:
- develop
paths:
- '.github/workflows/build-containers.yml'
+ - 'share/spack/docker/*'
# Let's also build & tag Spack containers on releases.
release:
types: [published]
@@ -66,14 +67,15 @@ jobs:
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # @v1
- name: Log in to GitHub Container Registry
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # @v1
+ uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # @v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to DockerHub
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # @v1
+ if: ${{ github.event_name != 'pull_request' }}
+ uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # @v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index 764a9cdcf0..a1cd2bbd42 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -24,9 +24,9 @@ jobs:
pip install --upgrade pip
pip install --upgrade vermin
- name: vermin (Spack's Core)
- run: vermin --backport argparse --violations --backport typing -t=2.6- -t=3.5- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
+ run: vermin --backport argparse --violations --backport typing -t=2.7- -t=3.5- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
- run: vermin --backport argparse --violations --backport typing -t=2.6- -t=3.5- -vvv var/spack/repos
+ run: vermin --backport argparse --violations --backport typing -t=2.7- -t=3.5- -vvv var/spack/repos
# Run style checks on the files that have been changed
style:
runs-on: ubuntu-latest
@@ -97,7 +97,14 @@ jobs:
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
- concretizer: ['original', 'clingo']
+ concretizer: ['clingo']
+ include:
+ - python-version: 2.7
+ concretizer: original
+ - python-version: 3.6
+ concretizer: original
+ - python-version: 3.9
+ concretizer: original
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # @v2
with:
@@ -114,7 +121,7 @@ jobs:
patchelf cmake bison libbison-dev kcov
- name: Install Python packages
run: |
- pip install --upgrade pip six setuptools codecov coverage[toml]
+ pip install --upgrade pip six setuptools pytest codecov coverage[toml]
# ensure style checks are not skipped in unit tests for python >= 3.6
# note that true/false (i.e., 1/0) are opposite in conditions in python and bash
if python -c 'import sys; sys.exit(not sys.version_info >= (3, 6))'; then
@@ -173,7 +180,7 @@ jobs:
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
- name: Install Python packages
run: |
- pip install --upgrade pip six setuptools codecov coverage[toml]
+ pip install --upgrade pip six setuptools pytest codecov coverage[toml]
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -193,39 +200,6 @@ jobs:
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: shelltests,linux
- # Test for Python2.6 run on Centos 6
- centos6:
- needs: [ validate, style, changes ]
- runs-on: ubuntu-latest
- container: spack/github-actions:centos6
- steps:
- - name: Run unit tests (full test-suite)
- # The CentOS 6 container doesn't run with coverage, but
- # under the same conditions it runs the full test suite
- if: ${{ needs.changes.outputs.with_coverage == 'true' }}
- env:
- HOME: /home/spack-test
- SPACK_TEST_SOLVER: original
- run: |
- whoami && echo $HOME && cd $HOME
- git clone "${{ github.server_url }}/${{ github.repository }}.git" && cd spack
- git fetch origin "${{ github.ref }}:test-branch"
- git checkout test-branch
- . .github/workflows/setup_git.sh
- bin/spack unit-test -x
- - name: Run unit tests (only package tests)
- if: ${{ needs.changes.outputs.with_coverage == 'false' }}
- env:
- HOME: /home/spack-test
- ONLY_PACKAGES: true
- SPACK_TEST_SOLVER: original
- run: |
- whoami && echo $HOME && cd $HOME
- git clone "${{ github.server_url }}/${{ github.repository }}.git" && cd spack
- git fetch origin "${{ github.ref }}:test-branch"
- git checkout test-branch
- . .github/workflows/setup_git.sh
- bin/spack unit-test -x -m "not maybeslow" -k "package_sanity"
# Test RHEL8 UBI with platform Python. This job is run
# only on PRs modifying core Spack
@@ -274,7 +248,7 @@ jobs:
patchelf kcov
- name: Install Python packages
run: |
- pip install --upgrade pip six setuptools codecov coverage[toml] clingo
+ pip install --upgrade pip six setuptools pytest codecov coverage[toml] clingo
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
@@ -317,7 +291,7 @@ jobs:
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools
- pip install --upgrade codecov coverage[toml]
+ pip install --upgrade pytest codecov coverage[toml]
- name: Setup Homebrew packages
run: |
brew install dash fish gcc gnupg2 kcov
@@ -347,3 +321,32 @@ jobs:
with:
files: ./coverage.xml
flags: unittests,macos
+
+ # Run audits on all the packages in the built-in repository
+ package-audits:
+ needs: [ validate, style, changes ]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # @v2
+ - uses: actions/setup-python@dc73133d4da04e56a135ae2246682783cc7c7cb6 # @v2
+ with:
+ python-version: 3.9
+ - name: Install Python packages
+ run: |
+ pip install --upgrade pip six setuptools pytest codecov coverage[toml]
+ - name: Package audits (with coverage)
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ run: |
+ . share/spack/setup-env.sh
+ coverage run $(which spack) audit packages
+ coverage combine
+ coverage xml
+ - name: Package audits (wwithout coverage)
+ if: ${{ needs.changes.outputs.with_coverage == 'false' }}
+ run: |
+ . share/spack/setup-env.sh
+ $(which spack) audit packages
+ - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # @v2.1.0
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ with:
+ flags: unittests,linux,audits