Compare commits

...

3 Commits

Author SHA1 Message Date
Harmen Stoppels
56ca5b253a actually trigger a build... 2024-05-01 18:33:34 +02:00
Harmen Stoppels
09c6243d45 ci: check time of populating misc cache 2024-05-01 18:04:22 +02:00
Gregory Becker
859745f1a9 Run audits on windows
Add debug log for external detection tests. The debug log
is used to print which test is being executed.

Skip version audit on Windows where appropriate
2024-04-29 14:13:10 +02:00
25 changed files with 68 additions and 22 deletions

View File

@@ -17,10 +17,16 @@ 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@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
@@ -29,20 +35,32 @@ jobs:
- 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' }}
if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
run: |
. share/spack/setup-env.sh
coverage run $(which spack) audit packages
coverage run $(which spack) -d audit externals
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
$(which spack) audit packages
$(which spack) audit externals
. share/spack/setup-env.sh
spack -d audit packages
spack -d audit externals
- name: Package audits (without coverage)
if: ${{ runner.os == 'Windows' }}
run: |
. share/spack/setup-env.sh
spack -d audit packages
./share/spack/qa/validate_last_exit.ps1
spack -d audit externals
./share/spack/qa/validate_last_exit.ps1
- uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed
if: ${{ inputs.with_coverage == 'true' }}
with:

View File

@@ -1046,7 +1046,7 @@ def _extracts_errors(triggers, summary):
group="externals",
tag="PKG-EXTERNALS",
description="Sanity checks for external software detection",
kwargs=("pkgs",),
kwargs=("pkgs", "debug_log"),
)
@@ -1069,7 +1069,7 @@ def packages_with_detection_tests():
@external_detection
def _test_detection_by_executable(pkgs, error_cls):
def _test_detection_by_executable(pkgs, debug_log, error_cls):
"""Test drive external detection for packages"""
import spack.detection
@@ -1095,6 +1095,7 @@ def _test_detection_by_executable(pkgs, error_cls):
for idx, test_runner in enumerate(
spack.detection.detection_tests(pkg_name, spack.repo.PATH)
):
debug_log(f"[{__file__}]: running test {idx} for package {pkg_name}")
specs = test_runner.execute()
expected_specs = test_runner.expected_specs
@@ -1115,11 +1116,10 @@ def _test_detection_by_executable(pkgs, error_cls):
for candidate in expected_specs:
try:
idx = specs.index(candidate)
matched_detection.append((candidate, specs[idx]))
except (AttributeError, ValueError):
pass
matched_detection.append((candidate, specs[idx]))
def _compare_extra_attribute(_expected, _detected, *, _spec):
result = []
# Check items are of the same type

View File

@@ -84,7 +84,7 @@ def externals(parser, args):
return
pkgs = args.name or spack.repo.PATH.all_package_names()
reports = spack.audit.run_group(args.subcommand, pkgs=pkgs)
reports = spack.audit.run_group(args.subcommand, pkgs=pkgs, debug_log=tty.debug)
_process_reports(reports)

View File

@@ -13,7 +13,7 @@ ci:
before_script-:
- - cat /proc/loadavg || true
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
- - spack list --count # ensure that spack's cache is populated
- - time spack list --count # ensure that spack's cache is populated
- - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
- spack compiler list
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi

View File

@@ -22,6 +22,8 @@ class ArmForge(Package):
# TODO: this mess should be fixed as soon as a way to parametrize/constrain
# versions (and checksums) based on the target platform shows up
skip_version_audit = ["platform=windows"]
if platform.machine() in ["aarch64", "arm64"]:
version(
"22.1.3", sha256="131884f998b82673e885a7b42cc883210e3a0229b50af374092140cdfd42a408"

View File

@@ -592,7 +592,7 @@ class Cuda(Package):
maintainers("ax3l", "Rombur")
executables = ["^nvcc$"]
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())

View File

@@ -298,7 +298,7 @@ class Cudnn(Package):
# need to use modified URLs like in url_for_version.
maintainers("adamjstewart", "bvanessen")
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
license("MIT")

View File

@@ -27,7 +27,7 @@ class Cutensor(Package):
maintainers("bvanessen")
url = "cutensor"
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())

View File

@@ -23,7 +23,7 @@ class GccRuntime(Package):
tags = ["runtime"]
# gcc-runtime versions are declared dynamically
skip_version_audit = ["platform=linux", "platform=darwin"]
skip_version_audit = ["platform=linux", "platform=darwin", "platform=windows"]
maintainers("haampie")

View File

@@ -59,6 +59,7 @@ paths:
- "bin/x86_64-linux-gnu-gcc-10"
- "bin/x86_64-linux-gnu-g++-10"
script: "echo 10.1.0"
platforms: [darwin, linux]
results:
- spec: "gcc@6.5.0 languages=c"
extra_attributes:

View File

@@ -47,7 +47,7 @@ class GitAnnex(Package):
# - $ git annex whereis git-annex/linux/current/git-annex-standalone-arm64.tar.gz
# -> gives web url
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
license("AGPL-3.0-or-later")

View File

@@ -46,6 +46,8 @@ class Hpcviewer(Package):
homepage = "http://hpctoolkit.org"
maintainers("mwkrentel")
skip_version_audit = ["platform=windows"]
darwin_sha = {
("2024.02", "aarch64"): "0f2bf2f89b7b9656b1b249efc8b24763f7865e8ddae5b22a3c21cc79fda49ce9",
("2024.02", "x86_64"): "7f61166155f326179e309aa18568b44d98a2219973a323cd4713123b5bf6fd54",

View File

@@ -47,6 +47,8 @@ class Javafx(Package):
except KeyError:
continue
skip_version_audit = ["platform=windows"]
maintainers("snehring")
extends("openjdk")

View File

@@ -17,6 +17,8 @@ class NfTowerCli(Package):
homepage = "https://github.com/seqeralabs/tower-cli"
maintainers("marcodelapierre")
skip_version_audit = ["platform=windows"]
if platform.machine() == "x86_64":
if platform.system() == "Darwin":
version(

View File

@@ -388,7 +388,7 @@ class Nvhpc(Package):
maintainers("samcmill")
tags = ["e4s"]
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
redistribute(source=False, binary=False)

View File

@@ -367,6 +367,8 @@ class Openjdk(Package):
executables = ["^java$"]
skip_version_audit = ["platform=windows"]
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("-version", output=str, error=str)

View File

@@ -20,6 +20,8 @@ class Pandoc(Package):
# the challenges with Haskell. Until the Haskell framework is in Spack this
# package will meet the needs of packages that have a dependency on pandoc.
skip_version_audit = ["platform=windows"]
if platform.system() == "Linux" and platform.machine() == "aarch64":
url = "https://github.com/jgm/pandoc/releases/download/2.14.0.3/pandoc-2.14.0.3-linux-arm64.tar.gz"
version(

View File

@@ -122,7 +122,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
extendable = True
if sys.platform != "win32":
depends_on("gmake", type="build")
depends_on("gmake@4.3", type="build")
depends_on("gdbm@:1.23")
# Bind us below gdbm-1.20 due to API change: https://github.com/Perl/perl5/issues/18915
depends_on("gdbm@:1.19", when="@:5.35")

View File

@@ -13,6 +13,8 @@ class PyAzuremlDataprepNative(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py"
skip_version_audit = ["platform=windows"]
if sys.platform == "darwin":
version(
"30.0.0-py3.9",

View File

@@ -16,6 +16,8 @@ class PyAzuremlDataprepRslex(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py"
skip_version_audit = ["platform=windows"]
if sys.platform == "darwin":
version(
"1.9.0-py3.9",

View File

@@ -13,6 +13,8 @@ class PyDotnetcore2(PythonPackage):
homepage = "https://github.com/dotnet/core"
skip_version_audit = ["platform=windows"]
if sys.platform == "darwin":
version(
"2.1.14",

View File

@@ -15,6 +15,8 @@ class PyItk(PythonPackage):
homepage = "https://itk.org/"
skip_version_audit = ["platform=windows"]
if sys.platform == "darwin":
# version 5.1.1
version(

View File

@@ -16,7 +16,7 @@ class PyNvidiaDali(PythonPackage):
homepage = "https://developer.nvidia.com/dali"
url = "https://developer.download.nvidia.com/compute/redist/"
skip_version_audit = ["platform=darwin"]
skip_version_audit = ["platform=darwin", "platform=windows"]
maintainers("thomas-bouvier")

View File

@@ -13,6 +13,8 @@ class PyShiboken2(PythonPackage):
homepage = "https://www.pyside.org/"
skip_version_audit = ["platform=windows"]
if sys.platform.startswith("linux"):
version(
"5.15.2",

View File

@@ -16,6 +16,8 @@ class RustBootstrap(Package):
maintainers("alecbcs")
skip_version_audit = ["platform=windows"]
# List binary rust releases for multiple operating systems and architectures.
# These binary versions are not intended to stay up-to-date. Instead we
# should update these binary releases as bootstrapping requirements are
@@ -110,6 +112,9 @@ class RustBootstrap(Package):
version(release, sha256=rust_releases[release][os][target])
def url_for_version(self, version):
if self.os not in ("linux", "darwin"):
return None
# Allow maintainers to checksum multiple architectures via
# `spack checksum rust-bootstrap@1.70.0-darwin-aarch64`.
match = re.search(r"(\S+)-(\S+)-(\S+)", str(version))