summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/audit.yaml51
-rwxr-xr-x.github/workflows/bin/bootstrap-test.sh (renamed from .github/workflows/bootstrap-test.sh)5
-rw-r--r--.github/workflows/bin/execute_installer.ps1 (renamed from .github/workflows/execute_installer.ps1)0
-rwxr-xr-x.github/workflows/bin/generate_spack_yaml_containerize.sh (renamed from .github/workflows/generate_spack_yaml_containerize.sh)0
-rw-r--r--.github/workflows/bin/setup_git.ps1 (renamed from .github/workflows/setup_git.ps1)0
-rwxr-xr-x.github/workflows/bin/setup_git.sh (renamed from .github/workflows/setup_git.sh)0
-rw-r--r--.github/workflows/bin/system_shortcut_check.ps1 (renamed from .github/workflows/system_shortcut_check.ps1)0
-rw-r--r--.github/workflows/bootstrap.yml367
-rw-r--r--.github/workflows/build-containers.yml48
-rw-r--r--.github/workflows/ci.yaml71
-rw-r--r--.github/workflows/coverage.yml35
-rwxr-xr-x.github/workflows/install_spack.sh8
-rw-r--r--.github/workflows/nightly-win-builds.yml4
-rw-r--r--.github/workflows/requirements/coverage/requirements.txt1
-rw-r--r--.github/workflows/requirements/style/requirements.txt7
-rw-r--r--.github/workflows/style/requirements.txt7
-rw-r--r--.github/workflows/unit_tests.yaml122
-rw-r--r--.github/workflows/valid-style.yml80
-rw-r--r--.github/workflows/windows_python.yml79
19 files changed, 423 insertions, 462 deletions
diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml
index 2120d82b73..5476039357 100644
--- a/.github/workflows/audit.yaml
+++ b/.github/workflows/audit.yaml
@@ -17,33 +17,58 @@ concurrency:
jobs:
# Run audits on all the packages in the built-in repository
package-audits:
- runs-on: ${{ matrix.operating_system }}
+ runs-on: ${{ matrix.system.os }}
strategy:
matrix:
- operating_system: ["ubuntu-latest", "macos-latest"]
+ system:
+ - { os: windows-latest, shell: 'powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}' }
+ - { os: ubuntu-latest, shell: bash }
+ - { os: macos-latest, shell: bash }
+ defaults:
+ run:
+ shell: ${{ matrix.system.shell }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pytest coverage[toml]
+ - name: Setup for Windows run
+ if: runner.os == 'Windows'
+ run: |
+ python -m pip install --upgrade pywin32
- name: Package audits (with coverage)
- if: ${{ inputs.with_coverage == 'true' }}
+ env:
+ COVERAGE_FILE: coverage/.coverage-audits-${{ matrix.system.os }}
+ if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
run: |
. share/spack/setup-env.sh
coverage run $(which spack) audit packages
- coverage run $(which spack) audit externals
+ coverage run $(which spack) audit configs
+ coverage run $(which spack) -d audit externals
coverage combine
- coverage xml
- name: Package audits (without coverage)
- if: ${{ inputs.with_coverage == 'false' }}
+ if: ${{ inputs.with_coverage == 'false' && runner.os != 'Windows' }}
+ run: |
+ . share/spack/setup-env.sh
+ spack -d audit packages
+ spack -d audit configs
+ spack -d audit externals
+ - name: Package audits (without coverage)
+ if: ${{ runner.os == 'Windows' }}
run: |
. share/spack/setup-env.sh
- $(which spack) audit packages
- $(which spack) audit externals
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
- if: ${{ inputs.with_coverage == 'true' }}
+ spack -d audit packages
+ ./share/spack/qa/validate_last_exit.ps1
+ spack -d audit configs
+ ./share/spack/qa/validate_last_exit.ps1
+ spack -d audit externals
+ ./share/spack/qa/validate_last_exit.ps1
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
with:
- flags: unittests,audits
+ name: coverage-audits-${{ matrix.system.os }}
+ path: coverage
+ include-hidden-files: true
diff --git a/.github/workflows/bootstrap-test.sh b/.github/workflows/bin/bootstrap-test.sh
index b51db3d1b7..0d774c248c 100755
--- a/.github/workflows/bootstrap-test.sh
+++ b/.github/workflows/bin/bootstrap-test.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-set -ex
+set -e
source share/spack/setup-env.sh
+$PYTHON bin/spack bootstrap disable github-actions-v0.5
$PYTHON bin/spack bootstrap disable spack-install
-$PYTHON bin/spack -d solve zlib
+$PYTHON bin/spack $SPACK_FLAGS solve zlib
tree $BOOTSTRAP/store
exit 0
diff --git a/.github/workflows/execute_installer.ps1 b/.github/workflows/bin/execute_installer.ps1
index 9d9f5cfbeb..9d9f5cfbeb 100644
--- a/.github/workflows/execute_installer.ps1
+++ b/.github/workflows/bin/execute_installer.ps1
diff --git a/.github/workflows/generate_spack_yaml_containerize.sh b/.github/workflows/bin/generate_spack_yaml_containerize.sh
index 2a180b7dd1..2a180b7dd1 100755
--- a/.github/workflows/generate_spack_yaml_containerize.sh
+++ b/.github/workflows/bin/generate_spack_yaml_containerize.sh
diff --git a/.github/workflows/setup_git.ps1 b/.github/workflows/bin/setup_git.ps1
index 836b7f8a2c..836b7f8a2c 100644
--- a/.github/workflows/setup_git.ps1
+++ b/.github/workflows/bin/setup_git.ps1
diff --git a/.github/workflows/setup_git.sh b/.github/workflows/bin/setup_git.sh
index 4eb416720b..4eb416720b 100755
--- a/.github/workflows/setup_git.sh
+++ b/.github/workflows/bin/setup_git.sh
diff --git a/.github/workflows/system_shortcut_check.ps1 b/.github/workflows/bin/system_shortcut_check.ps1
index 03b3a236f1..03b3a236f1 100644
--- a/.github/workflows/system_shortcut_check.ps1
+++ b/.github/workflows/bin/system_shortcut_check.ps1
diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 21c1b2f0ba..90b31a098a 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -13,221 +13,141 @@ concurrency:
cancel-in-progress: true
jobs:
- fedora-clingo-sources:
+ distros-clingo-sources:
runs-on: ubuntu-latest
- container: "fedora:latest"
+ container: ${{ matrix.image }}
+ strategy:
+ matrix:
+ image: ["fedora:latest", "opensuse/leap:latest"]
steps:
- - name: Install dependencies
+ - name: Setup Fedora
+ if: ${{ matrix.image == 'fedora:latest' }}
run: |
dnf install -y \
- bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
+ bzip2 curl file gcc-c++ gcc gcc-gfortran git gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison bison-devel libstdc++-static
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- - name: Bootstrap clingo
- shell: runuser -u spack-test -- bash {0}
- run: |
- source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find cmake bison
- spack -d solve zlib
- tree ~/.spack/bootstrap/store/
-
- ubuntu-clingo-sources:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
- steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
+ - name: Setup OpenSUSE
+ if: ${{ matrix.image == 'opensuse/leap:latest' }}
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 \
+ # 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 \
cmake bison
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- name: Bootstrap clingo
- shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
spack external find cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
- ubuntu-clingo-binaries-and-patchelf:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
+ clingo-sources:
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ runner: ['macos-13', 'macos-14', "ubuntu-latest"]
steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
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
+ brew install cmake bison tree
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- - 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: |
- # 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 \
- cmake bison
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
- fetch-depth: 0
- - name: Setup repo
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- git --version
- . .github/workflows/setup_git.sh
+ python-version: "3.12"
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find cmake bison
+ spack external find --not-buildable cmake bison
spack -d solve zlib
- tree ~/.spack/bootstrap/store/
+ tree $HOME/.spack/bootstrap/store/
- macos-clingo-sources:
- runs-on: macos-latest
+ gnupg-sources:
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ runner: [ 'macos-13', 'macos-14', "ubuntu-latest" ]
steps:
- - name: Install dependencies
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
+ run: brew install tree gawk
+ - name: Remove system executables
run: |
- brew install cmake bison@2.7 tree
+ while [ -n "$(command -v gpg gpg2 patchelf)" ]; do
+ sudo rm $(command -v gpg gpg2 patchelf)
+ done
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
- python-version: "3.12"
- - name: Bootstrap clingo
+ fetch-depth: 0
+ - name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
- export PATH=/usr/local/opt/bison@2.7/bin:$PATH
+ spack solve zlib
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find --not-buildable cmake bison
- spack -d solve zlib
+ spack -d gpg list
tree ~/.spack/bootstrap/store/
- macos-clingo-binaries:
- runs-on: ${{ matrix.macos-version }}
+ from-binaries:
+ runs-on: ${{ matrix.runner }}
strategy:
matrix:
- macos-version: ['macos-11', 'macos-12']
+ runner: ['macos-13', 'macos-14', "ubuntu-latest"]
steps:
- - name: Install dependencies
- run: |
- brew install tree
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: Bootstrap clingo
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
+ run: brew install tree
+ - name: Remove system executables
run: |
- set -ex
- for ver in '3.7' '3.8' '3.9' '3.10' '3.11' ; do
- not_found=1
- ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
- echo "Testing $ver_dir"
- if [[ -d "$ver_dir" ]] ; then
- if $ver_dir/python --version ; then
- export PYTHON="$ver_dir/python"
- not_found=0
- old_path="$PATH"
- export PATH="$ver_dir:$PATH"
- ./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
- export PATH="$old_path"
- fi
- fi
- # NOTE: test all pythons that exist, not all do on 12
+ while [ -n "$(command -v gpg gpg2 patchelf)" ]; do
+ sudo rm $(command -v gpg gpg2 patchelf)
done
-
- ubuntu-clingo-binaries:
- runs-on: ubuntu-20.04
- steps:
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup repo
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: |
+ 3.8
+ 3.9
+ 3.10
+ 3.11
+ 3.12
+ 3.13
+ - name: Set bootstrap sources
run: |
- git --version
- . .github/workflows/setup_git.sh
+ source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.5
+ spack bootstrap disable spack-install
- name: Bootstrap clingo
run: |
- set -ex
- for ver in '3.7' '3.8' '3.9' '3.10' '3.11' ; do
+ set -e
+ for ver in '3.8' '3.9' '3.10' '3.11' '3.12' '3.13'; do
not_found=1
ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
- echo "Testing $ver_dir"
if [[ -d "$ver_dir" ]] ; then
+ echo "Testing $ver_dir"
if $ver_dir/python --version ; then
export PYTHON="$ver_dir/python"
not_found=0
old_path="$PATH"
export PATH="$ver_dir:$PATH"
- ./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
+ ./bin/spack-tmpconfig -b ./.github/workflows/bin/bootstrap-test.sh
export PATH="$old_path"
fi
fi
@@ -236,122 +156,49 @@ jobs:
exit 1
fi
done
-
- ubuntu-gnupg-binaries:
- 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 patchelf gfortran git gzip \
- make patch unzip xz-utils python3 python3-dev tree
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- name: Bootstrap GnuPG
- shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.4
- spack bootstrap disable spack-install
spack -d gpg list
- tree ~/.spack/bootstrap/store/
+ tree $HOME/.spack/bootstrap/store/
+ - name: Bootstrap File
+ run: |
+ source share/spack/setup-env.sh
+ spack -d python share/spack/qa/bootstrap-file.py
+ tree $HOME/.spack/bootstrap/store/
- ubuntu-gnupg-sources:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
+ windows:
+ runs-on: "windows-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 patchelf gfortran git gzip \
- make patch unzip xz-utils python3 python3-dev tree \
- gawk
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: "3.12"
+ - name: Setup Windows
run: |
- git --version
- . .github/workflows/setup_git.sh
- - name: Bootstrap GnuPG
- shell: runuser -u spack-test -- bash {0}
+ Remove-Item -Path (Get-Command gpg).Path
+ Remove-Item -Path (Get-Command file).Path
+ - name: Bootstrap clingo
run: |
- source share/spack/setup-env.sh
- spack solve zlib
+ ./share/spack/setup-env.ps1
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
- macos-gnupg-binaries:
- runs-on: macos-latest
- steps:
- - name: Install dependencies
- run: |
- brew install tree
- # Remove GnuPG since we want to bootstrap it
- sudo rm -rf /usr/local/bin/gpg
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: Bootstrap GnuPG
- run: |
- source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.4
- spack bootstrap disable spack-install
- spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
- macos-gnupg-sources:
- runs-on: macos-latest
- steps:
- - name: Install dependencies
- run: |
- brew install gawk tree
- # Remove GnuPG since we want to bootstrap it
- sudo rm -rf /usr/local/bin/gpg
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ spack external find --not-buildable cmake bison
+ spack -d solve zlib
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
- name: Bootstrap GnuPG
run: |
- source share/spack/setup-env.sh
- spack solve zlib
- spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
+ ./share/spack/setup-env.ps1
spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
-
-# [1] Distros that have patched git to resolve CVE-2022-24765 (e.g. Ubuntu patching v2.25.1)
-# introduce breaking behaviorso we have to set `safe.directory` in gitconfig ourselves.
-# See:
-# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
-# - https://github.com/actions/checkout/issues/760
-# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
+ - name: Bootstrap File
+ run: |
+ ./share/spack/setup-env.ps1
+ spack -d python share/spack/qa/bootstrap-file.py
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml
index e5543a0ae1..178de5ac36 100644
--- a/.github/workflows/build-containers.yml
+++ b/.github/workflows/build-containers.yml
@@ -40,24 +40,30 @@ jobs:
# 1: Platforms to build for
# 2: Base image (e.g. ubuntu:22.04)
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
- [centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'],
- [centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'],
+ [centos-stream9, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream9'],
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
+ [ubuntu-noble, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:24.04'],
[almalinux8, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:8'],
[almalinux9, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:9'],
[rockylinux8, 'linux/amd64,linux/arm64', 'rockylinux:8'],
[rockylinux9, 'linux/amd64,linux/arm64', 'rockylinux:9'],
- [fedora37, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:37'],
- [fedora38, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:38']]
+ [fedora39, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:39'],
+ [fedora40, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:40']]
name: Build ${{ matrix.dockerfile[0] }}
if: github.repository == 'spack/spack'
steps:
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e
+ - name: Determine latest release tag
+ id: latest
+ run: |
+ git fetch --quiet --tags
+ echo "tag=$(git tag --list --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | tee -a $GITHUB_OUTPUT
+
+ - uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
id: docker_meta
with:
images: |
@@ -71,12 +77,13 @@ jobs:
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
+ type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.latest.outputs.tag) }}
- name: Generate the Dockerfile
env:
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
run: |
- .github/workflows/generate_spack_yaml_containerize.sh
+ .github/workflows/bin/generate_spack_yaml_containerize.sh
. share/spack/setup-env.sh
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
@@ -87,19 +94,19 @@ jobs:
fi
- name: Upload Dockerfile
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
+ uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- name: dockerfiles
+ name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
- name: Set up QEMU
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
+ uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
+ uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
- name: Log in to GitHub Container Registry
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -107,18 +114,27 @@ jobs:
- name: Log in to DockerHub
if: github.event_name != 'pull_request'
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
+ uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}
push: ${{ github.event_name != 'pull_request' }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
+
+ merge-dockerfiles:
+ runs-on: ubuntu-latest
+ needs: deploy-images
+ steps:
+ - name: Merge Artifacts
+ uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ with:
+ name: dockerfiles
+ pattern: dockerfiles_*
+ delete-merged: true
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 047109ca76..a7ceb1bd8e 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -15,17 +15,6 @@ concurrency:
cancel-in-progress: true
jobs:
- prechecks:
- needs: [ changes ]
- uses: ./.github/workflows/valid-style.yml
- with:
- with_coverage: ${{ needs.changes.outputs.core }}
- all-prechecks:
- needs: [ prechecks ]
- runs-on: ubuntu-latest
- steps:
- - name: Success
- run: "true"
# Check which files have been updated by the PR
changes:
runs-on: ubuntu-latest
@@ -35,12 +24,12 @@ jobs:
core: ${{ steps.filter.outputs.core }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
# For pull requests it's not necessary to checkout the code
- - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
+ - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
@@ -52,6 +41,13 @@ jobs:
- 'var/spack/repos/builtin/packages/clingo/**'
- 'var/spack/repos/builtin/packages/python/**'
- 'var/spack/repos/builtin/packages/re2c/**'
+ - 'var/spack/repos/builtin/packages/gnupg/**'
+ - 'var/spack/repos/builtin/packages/libassuan/**'
+ - 'var/spack/repos/builtin/packages/libgcrypt/**'
+ - 'var/spack/repos/builtin/packages/libgpg-error/**'
+ - 'var/spack/repos/builtin/packages/libksba/**'
+ - 'var/spack/repos/builtin/packages/npth/**'
+ - 'var/spack/repos/builtin/packages/pinentry/**'
- 'lib/spack/**'
- 'share/spack/**'
- '.github/workflows/bootstrap.yml'
@@ -70,17 +66,54 @@ jobs:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.bootstrap == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/bootstrap.yml
+ secrets: inherit
+
unit-tests:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/unit_tests.yaml
- windows:
- if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
+ secrets: inherit
+
+ prechecks:
+ needs: [ changes ]
+ uses: ./.github/workflows/valid-style.yml
+ secrets: inherit
+ with:
+ with_coverage: ${{ needs.changes.outputs.core }}
+
+ all-prechecks:
needs: [ prechecks ]
- uses: ./.github/workflows/windows_python.yml
- all:
- needs: [ windows, unit-tests, bootstrap ]
+ if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Success
- run: "true"
+ run: |
+ if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
+ echo "Unit tests failed."
+ exit 1
+ else
+ exit 0
+ fi
+
+ coverage:
+ needs: [ unit-tests, prechecks ]
+ uses: ./.github/workflows/coverage.yml
+ secrets: inherit
+
+ all:
+ needs: [ unit-tests, coverage, bootstrap ]
+ if: ${{ always() }}
+ runs-on: ubuntu-latest
+ # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#needs-context
+ steps:
+ - name: Status summary
+ run: |
+ if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
+ echo "Unit tests failed."
+ exit 1
+ elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
+ echo "Bootstrap tests failed."
+ exit 1
+ else
+ exit 0
+ fi
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 0000000000..be4302bfbc
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,35 @@
+name: coverage
+
+on:
+ workflow_call:
+
+jobs:
+ # Upload coverage reports to codecov once as a single bundle
+ upload:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: '3.11'
+ cache: 'pip'
+
+ - name: Install python dependencies
+ run: pip install -r .github/workflows/requirements/coverage/requirements.txt
+
+ - name: Download coverage artifact files
+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
+ with:
+ pattern: coverage-*
+ path: coverage
+ merge-multiple: true
+
+ - run: ls -la coverage
+ - run: coverage combine -a coverage/.coverage*
+ - run: coverage xml
+
+ - name: "Upload coverage report to CodeCov"
+ uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
+ with:
+ verbose: true
+ fail_ci_if_error: true
diff --git a/.github/workflows/install_spack.sh b/.github/workflows/install_spack.sh
deleted file mode 100755
index be8ec8af21..0000000000
--- a/.github/workflows/install_spack.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env sh
-. share/spack/setup-env.sh
-echo -e "config:\n build_jobs: 2" > etc/spack/config.yaml
-spack config add "packages:all:target:[x86_64]"
-spack compiler find
-spack compiler info apple-clang
-spack debug report
-spack solve zlib
diff --git a/.github/workflows/nightly-win-builds.yml b/.github/workflows/nightly-win-builds.yml
index e93e80e3e4..11f19c9244 100644
--- a/.github/workflows/nightly-win-builds.yml
+++ b/.github/workflows/nightly-win-builds.yml
@@ -14,10 +14,10 @@ jobs:
build-paraview-deps:
runs-on: windows-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: 3.9
- name: Install Python packages
diff --git a/.github/workflows/requirements/coverage/requirements.txt b/.github/workflows/requirements/coverage/requirements.txt
new file mode 100644
index 0000000000..1bf0f9a76b
--- /dev/null
+++ b/.github/workflows/requirements/coverage/requirements.txt
@@ -0,0 +1 @@
+coverage==7.6.1
diff --git a/.github/workflows/requirements/style/requirements.txt b/.github/workflows/requirements/style/requirements.txt
new file mode 100644
index 0000000000..93ab7eaa7f
--- /dev/null
+++ b/.github/workflows/requirements/style/requirements.txt
@@ -0,0 +1,7 @@
+black==24.10.0
+clingo==5.7.1
+flake8==7.1.1
+isort==5.13.2
+mypy==1.8.0
+types-six==1.16.21.20241105
+vermin==1.6.0
diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt
deleted file mode 100644
index eabbd46467..0000000000
--- a/.github/workflows/style/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-black==23.12.1
-clingo==5.6.2
-flake8==6.1.0
-isort==5.13.2
-mypy==1.8.0
-types-six==1.16.21.9
-vermin==1.6.0
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index b05a935c6a..72184b7fbf 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -16,45 +16,34 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
- concretizer: ['clingo']
on_develop:
- ${{ github.ref == 'refs/heads/develop' }}
include:
- - python-version: '3.11'
- os: ubuntu-latest
- concretizer: original
- on_develop: ${{ github.ref == 'refs/heads/develop' }}
- python-version: '3.6'
os: ubuntu-20.04
- concretizer: clingo
on_develop: ${{ github.ref == 'refs/heads/develop' }}
exclude:
- python-version: '3.7'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.8'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.9'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.10'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.11'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -72,7 +61,7 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Bootstrap clingo
if: ${{ matrix.concretizer == 'clingo' }}
env:
@@ -85,23 +74,25 @@ jobs:
- name: Run unit tests
env:
SPACK_PYTHON: python
- SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
SPACK_TEST_PARALLEL: 2
COVERAGE: true
+ COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,linux,${{ matrix.concretizer }}
+ name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
+ path: coverage
+ include-hidden-files: true
# Test shell integration
shell:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
- name: Install System packages
@@ -116,15 +107,17 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Run shell tests
env:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: shelltests,linux
+ name: coverage-shell
+ path: coverage
+ include-hidden-files: true
# Test RHEL8 UBI with platform Python. This job is run
# only on PRs modifying core Spack
@@ -137,13 +130,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Run unit tests
@@ -156,45 +149,49 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
- python-version: '3.11'
+ python-version: '3.13'
- name: Install System packages
run: |
sudo apt-get -y update
- sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
+ sudo apt-get -y install coreutils gfortran graphviz gnupg2
- name: Install Python packages
run: |
- pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
+ pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
- - name: Setup git configuration
- run: |
- # Need this for the git tests to succeed.
- git --version
- . .github/workflows/setup_git.sh
- name: Run unit tests (full suite with coverage)
env:
COVERAGE: true
- SPACK_TEST_SOLVER: clingo
+ COVERAGE_FILE: coverage/.coverage-clingo-cffi
run: |
- share/spack/qa/run-unit-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
+ . share/spack/setup-env.sh
+ spack bootstrap disable spack-install
+ spack bootstrap disable github-actions-v0.5
+ spack bootstrap disable github-actions-v0.6
+ spack bootstrap status
+ spack solve zlib
+ spack unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml lib/spack/spack/test/concretization/core.py
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,linux,clingo
+ name: coverage-clingo-cffi
+ path: coverage
+ include-hidden-files: true
# Run unit tests on MacOS
macos:
- runs-on: macos-latest
+ runs-on: ${{ matrix.os }}
strategy:
matrix:
+ os: [macos-13, macos-14]
python-version: ["3.11"]
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -203,19 +200,52 @@ jobs:
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
- name: Setup Homebrew packages
run: |
- brew install dash fish gcc gnupg2 kcov
+ brew install dash fish gcc gnupg kcov
- name: Run unit tests
env:
- SPACK_TEST_SOLVER: clingo
SPACK_TEST_PARALLEL: 4
+ COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
run: |
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
. share/spack/setup-env.sh
$(which spack) bootstrap disable spack-install
$(which spack) solve zlib
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ with:
+ name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
+ path: coverage
+ include-hidden-files: true
+ # Run unit tests on Windows
+ windows:
+ defaults:
+ run:
+ shell:
+ powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: 3.9
+ - name: Install Python packages
+ run: |
+ python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
+ - name: Create local develop
+ run: |
+ ./.github/workflows/bin/setup_git.ps1
+ - name: Unit Test
+ env:
+ COVERAGE_FILE: coverage/.coverage-windows
+ run: |
+ spack unit-test -x --verbose --cov --cov-config=pyproject.toml
+ ./share/spack/qa/validate_last_exit.ps1
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,macos
+ name: coverage-windows
+ path: coverage
+ include-hidden-files: true
diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml
index d75a70344d..ad96ff2cc5 100644
--- a/.github/workflows/valid-style.yml
+++ b/.github/workflows/valid-style.yml
@@ -18,15 +18,15 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python Packages
run: |
pip install --upgrade pip setuptools
- pip install -r .github/workflows/style/requirements.txt
+ pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin (Spack's Core)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
@@ -35,27 +35,28 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools
- pip install -r .github/workflows/style/requirements.txt
+ pip install -r .github/workflows/requirements/style/requirements.txt
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Run style tests
run: |
share/spack/qa/run-style-tests
audit:
uses: ./.github/workflows/audit.yaml
+ secrets: inherit
with:
with_coverage: ${{ inputs.with_coverage }}
python_version: '3.11'
@@ -69,13 +70,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Bootstrap Spack development environment
@@ -84,5 +85,64 @@ jobs:
source share/spack/setup-env.sh
spack debug report
spack -d bootstrap now --dev
- spack style -t black
+ spack -d style -t black
spack unit-test -V
+ import-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: julia-actions/setup-julia@v2
+ with:
+ version: '1.10'
+ - uses: julia-actions/cache@v2
+
+ # PR: use the base of the PR as the old commit
+ - name: Checkout PR base commit
+ if: github.event_name == 'pull_request'
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ ref: ${{ github.event.pull_request.base.sha }}
+ path: old
+ # not a PR: use the previous commit as the old commit
+ - name: Checkout previous commit
+ if: github.event_name != 'pull_request'
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ fetch-depth: 2
+ path: old
+ - name: Checkout previous commit
+ if: github.event_name != 'pull_request'
+ run: git -C old reset --hard HEAD^
+
+ - name: Checkout new commit
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ path: new
+ - name: Install circular import checker
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ repository: haampie/circular-import-fighter
+ ref: 9f60f51bc7134e0be73f27623f1b0357d1718427
+ path: circular-import-fighter
+ - name: Install dependencies
+ working-directory: circular-import-fighter
+ run: make -j dependencies
+ - name: Import cycles before
+ working-directory: circular-import-fighter
+ run: make SPACK_ROOT=../old && cp solution solution.old
+ - name: Import cycles after
+ working-directory: circular-import-fighter
+ run: make clean-graph && make SPACK_ROOT=../new && cp solution solution.new
+ - name: Compare import cycles
+ working-directory: circular-import-fighter
+ run: |
+ edges_before="$(grep -oP 'edges to delete: \K\d+' solution.old)"
+ edges_after="$(grep -oP 'edges to delete: \K\d+' solution.new)"
+ if [ "$edges_after" -gt "$edges_before" ]; then
+ printf '\033[1;31mImport check failed: %s imports need to be deleted, ' "$edges_after"
+ printf 'previously this was %s\033[0m\n' "$edges_before"
+ printf 'Compare \033[1;97m"Import cycles before"\033[0m and '
+ printf '\033[1;97m"Import cycles after"\033[0m to see problematic imports.\n'
+ exit 1
+ else
+ printf '\033[1;32mImport check passed: %s <= %s\033[0m\n' "$edges_after" "$edges_before"
+ fi
diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml
deleted file mode 100644
index b1e4f72f2c..0000000000
--- a/.github/workflows/windows_python.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-name: windows
-
-on:
- workflow_call:
-
-concurrency:
- group: windows-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
- cancel-in-progress: true
-
-defaults:
- run:
- shell:
- powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
-jobs:
- unit-tests:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- - name: Create local develop
- run: |
- ./.github/workflows/setup_git.ps1
- - name: Unit Test
- run: |
- spack unit-test -x --verbose --cov --cov-config=pyproject.toml --ignore=lib/spack/spack/test/cmd
- ./share/spack/qa/validate_last_exit.ps1
- coverage combine -a
- coverage xml
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- with:
- flags: unittests,windows
- unit-tests-cmd:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools coverage pytest-cov clingo
- - name: Create local develop
- run: |
- ./.github/workflows/setup_git.ps1
- - name: Command Unit Test
- run: |
- spack unit-test -x --verbose --cov --cov-config=pyproject.toml lib/spack/spack/test/cmd
- ./share/spack/qa/validate_last_exit.ps1
- coverage combine -a
- coverage xml
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- with:
- flags: unittests,windows
- build-abseil:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools coverage
- - name: Build Test
- run: |
- spack compiler find
- spack -d external find cmake ninja
- spack -d install abseil-cpp