minimize gha
This commit is contained in:
parent
f772d97865
commit
6c5711e7b6
73
.github/workflows/audit.yaml
vendored
73
.github/workflows/audit.yaml
vendored
@ -1,73 +0,0 @@
|
|||||||
name: audit
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
with_coverage:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
python_version:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: audit-${{inputs.python_version}}-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Run audits on all the packages in the built-in repository
|
|
||||||
package-audits:
|
|
||||||
runs-on: ${{ matrix.system.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
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@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
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' && runner.os != 'Windows' }}
|
|
||||||
run: |
|
|
||||||
. share/spack/setup-env.sh
|
|
||||||
coverage run $(which spack) audit packages
|
|
||||||
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' && 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
|
|
||||||
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: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
if: ${{ inputs.with_coverage == 'true' }}
|
|
||||||
with:
|
|
||||||
flags: unittests,audits
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: true
|
|
201
.github/workflows/bootstrap.yml
vendored
201
.github/workflows/bootstrap.yml
vendored
@ -1,201 +0,0 @@
|
|||||||
name: Bootstrapping
|
|
||||||
|
|
||||||
on:
|
|
||||||
# This Workflow can be triggered manually
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_call:
|
|
||||||
schedule:
|
|
||||||
# nightly at 2:16 AM
|
|
||||||
- cron: '16 2 * * *'
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: bootstrap-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
distros-clingo-sources:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: ${{ matrix.image }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
image: ["fedora:latest", "opensuse/leap:latest"]
|
|
||||||
steps:
|
|
||||||
- name: Setup Fedora
|
|
||||||
if: ${{ matrix.image == 'fedora:latest' }}
|
|
||||||
run: |
|
|
||||||
dnf install -y \
|
|
||||||
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: Setup OpenSUSE
|
|
||||||
if: ${{ matrix.image == 'opensuse/leap:latest' }}
|
|
||||||
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@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Bootstrap clingo
|
|
||||||
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/
|
|
||||||
|
|
||||||
clingo-sources:
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runner: ['macos-13', 'macos-14', "ubuntu-latest", "windows-latest"]
|
|
||||||
steps:
|
|
||||||
- name: Setup macOS
|
|
||||||
if: ${{ matrix.runner != 'ubuntu-latest' && matrix.runner != 'windows-latest' }}
|
|
||||||
run: |
|
|
||||||
brew install cmake bison tree
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
- name: Bootstrap clingo
|
|
||||||
env:
|
|
||||||
SETUP_SCRIPT_EXT: ${{ matrix.runner == 'windows-latest' && 'ps1' || 'sh' }}
|
|
||||||
SETUP_SCRIPT_SOURCE: ${{ matrix.runner == 'windows-latest' && './' || 'source ' }}
|
|
||||||
USER_SCOPE_PARENT_DIR: ${{ matrix.runner == 'windows-latest' && '$env:userprofile' || '$HOME' }}
|
|
||||||
VALIDATE_LAST_EXIT: ${{ matrix.runner == 'windows-latest' && './share/spack/qa/validate_last_exit.ps1' || '' }}
|
|
||||||
run: |
|
|
||||||
${{ env.SETUP_SCRIPT_SOURCE }}share/spack/setup-env.${{ env.SETUP_SCRIPT_EXT }}
|
|
||||||
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
|
|
||||||
${{ env.VALIDATE_LAST_EXIT }}
|
|
||||||
tree ${{ env.USER_SCOPE_PARENT_DIR }}/.spack/bootstrap/store/
|
|
||||||
|
|
||||||
gnupg-sources:
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runner: [ 'macos-13', 'macos-14', "ubuntu-latest" ]
|
|
||||||
steps:
|
|
||||||
- name: Setup macOS
|
|
||||||
if: ${{ matrix.runner != 'ubuntu-latest' }}
|
|
||||||
run: |
|
|
||||||
brew install tree gawk
|
|
||||||
sudo rm -rf $(command -v gpg gpg2)
|
|
||||||
- name: Setup Ubuntu
|
|
||||||
if: ${{ matrix.runner == 'ubuntu-latest' }}
|
|
||||||
run: sudo rm -rf $(command -v gpg gpg2 patchelf)
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- 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
|
|
||||||
spack -d gpg list
|
|
||||||
tree ~/.spack/bootstrap/store/
|
|
||||||
|
|
||||||
from-binaries:
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runner: ['macos-13', 'macos-14', "ubuntu-latest", "windows-latest"]
|
|
||||||
steps:
|
|
||||||
- name: Setup macOS
|
|
||||||
if: ${{ matrix.runner != 'ubuntu-latest' && matrix.runner != 'windows-latest'}}
|
|
||||||
run: |
|
|
||||||
brew install tree
|
|
||||||
# Remove GnuPG since we want to bootstrap it
|
|
||||||
sudo rm -rf /usr/local/bin/gpg
|
|
||||||
- name: Setup Ubuntu
|
|
||||||
if: ${{ matrix.runner == 'ubuntu-latest' }}
|
|
||||||
run: |
|
|
||||||
sudo rm -rf $(which gpg) $(which gpg2) $(which patchelf)
|
|
||||||
- name: Setup Windows
|
|
||||||
if: ${{ matrix.runner == 'windows-latest' }}
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path (Get-Command gpg).Path
|
|
||||||
Remove-Item -Path (Get-Command file).Path
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: |
|
|
||||||
3.8
|
|
||||||
3.9
|
|
||||||
3.10
|
|
||||||
3.11
|
|
||||||
3.12
|
|
||||||
- name: Set bootstrap sources
|
|
||||||
env:
|
|
||||||
SETUP_SCRIPT_EXT: ${{ matrix.runner == 'windows-latest' && 'ps1' || 'sh' }}
|
|
||||||
SETUP_SCRIPT_SOURCE: ${{ matrix.runner == 'windows-latest' && './' || 'source ' }}
|
|
||||||
run: |
|
|
||||||
${{ env.SETUP_SCRIPT_SOURCE }}share/spack/setup-env.${{ env.SETUP_SCRIPT_EXT }}
|
|
||||||
spack bootstrap disable github-actions-v0.4
|
|
||||||
- name: Disable from source bootstrap
|
|
||||||
if: ${{ matrix.runner != 'windows-latest' }}
|
|
||||||
run: |
|
|
||||||
source share/spack/setup-env.sh
|
|
||||||
spack bootstrap disable spack-install
|
|
||||||
- name: Bootstrap clingo
|
|
||||||
# No binary clingo on Windows yet
|
|
||||||
if: ${{ matrix.runner != 'windows-latest' }}
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
for ver in '3.8' '3.9' '3.10' '3.11' '3.12' ; do
|
|
||||||
not_found=1
|
|
||||||
ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
|
|
||||||
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/bin/bootstrap-test.sh
|
|
||||||
export PATH="$old_path"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if (($not_found)) ; then
|
|
||||||
echo Required python version $ver not found in runner!
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
- name: Bootstrap GnuPG
|
|
||||||
env:
|
|
||||||
SETUP_SCRIPT_EXT: ${{ matrix.runner == 'windows-latest' && 'ps1' || 'sh' }}
|
|
||||||
SETUP_SCRIPT_SOURCE: ${{ matrix.runner == 'windows-latest' && './' || 'source ' }}
|
|
||||||
USER_SCOPE_PARENT_DIR: ${{ matrix.runner == 'windows-latest' && '$env:userprofile' || '$HOME' }}
|
|
||||||
VALIDATE_LAST_EXIT: ${{ matrix.runner == 'windows-latest' && './share/spack/qa/validate_last_exit.ps1' || '' }}
|
|
||||||
run: |
|
|
||||||
${{ env.SETUP_SCRIPT_SOURCE }}share/spack/setup-env.${{ env.SETUP_SCRIPT_EXT }}
|
|
||||||
spack -d gpg list
|
|
||||||
${{ env.VALIDATE_LAST_EXIT }}
|
|
||||||
tree ${{ env.USER_SCOPE_PARENT_DIR }}/.spack/bootstrap/store/
|
|
||||||
- name: Bootstrap File
|
|
||||||
env:
|
|
||||||
SETUP_SCRIPT_EXT: ${{ matrix.runner == 'windows-latest' && 'ps1' || 'sh' }}
|
|
||||||
SETUP_SCRIPT_SOURCE: ${{ matrix.runner == 'windows-latest' && './' || 'source ' }}
|
|
||||||
USER_SCOPE_PARENT_DIR: ${{ matrix.runner == 'windows-latest' && '$env:userprofile' || '$HOME' }}
|
|
||||||
VALIDATE_LAST_EXIT: ${{ matrix.runner == 'windows-latest' && './share/spack/qa/validate_last_exit.ps1' || '' }}
|
|
||||||
run: |
|
|
||||||
${{ env.SETUP_SCRIPT_SOURCE }}share/spack/setup-env.${{ env.SETUP_SCRIPT_EXT }}
|
|
||||||
spack -d python share/spack/qa/bootstrap-file.py
|
|
||||||
${{ env.VALIDATE_LAST_EXIT }}
|
|
||||||
tree ${{ env.USER_SCOPE_PARENT_DIR }}/.spack/bootstrap/store/
|
|
133
.github/workflows/build-containers.yml
vendored
133
.github/workflows/build-containers.yml
vendored
@ -1,133 +0,0 @@
|
|||||||
name: Containers
|
|
||||||
|
|
||||||
on:
|
|
||||||
# This Workflow can be triggered manually
|
|
||||||
workflow_dispatch:
|
|
||||||
# Build new Spack develop containers nightly.
|
|
||||||
schedule:
|
|
||||||
- cron: '34 0 * * *'
|
|
||||||
# Run on pull requests that modify this file
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/build-containers.yml'
|
|
||||||
- 'share/spack/docker/*'
|
|
||||||
- 'share/spack/templates/container/*'
|
|
||||||
- 'lib/spack/spack/container/*'
|
|
||||||
# Let's also build & tag Spack containers on releases.
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: build_containers-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
strategy:
|
|
||||||
# Even if one container fails to build we still want the others
|
|
||||||
# to continue their builds.
|
|
||||||
fail-fast: false
|
|
||||||
# A matrix of Dockerfile paths, associated tags, and which architectures
|
|
||||||
# they support.
|
|
||||||
matrix:
|
|
||||||
# Meaning of the various items in the matrix list
|
|
||||||
# 0: Container name (e.g. ubuntu-bionic)
|
|
||||||
# 1: Platforms to build for
|
|
||||||
# 2: Base image (e.g. ubuntu:22.04)
|
|
||||||
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
|
|
||||||
[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'],
|
|
||||||
[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@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
|
|
||||||
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
|
||||||
id: docker_meta
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ github.repository_owner }}/${{ matrix.dockerfile[0] }}
|
|
||||||
${{ github.repository_owner }}/${{ matrix.dockerfile[0] }}
|
|
||||||
tags: |
|
|
||||||
type=schedule,pattern=nightly
|
|
||||||
type=schedule,pattern=develop
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
|
|
||||||
- name: Generate the Dockerfile
|
|
||||||
env:
|
|
||||||
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
|
|
||||||
run: |
|
|
||||||
.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
|
|
||||||
printf "Preparing to build ${{ env.container }} from dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile"
|
|
||||||
if [ ! -f "dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile" ]; then
|
|
||||||
printf "dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile does not exist"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload Dockerfile
|
|
||||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
|
|
||||||
with:
|
|
||||||
name: dockerfiles_${{ matrix.dockerfile[0] }}
|
|
||||||
path: dockerfiles
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
|
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
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@5cd11c3a4ced054e52742c5fd54dca954e0edd85
|
|
||||||
with:
|
|
||||||
context: dockerfiles/${{ matrix.dockerfile[0] }}
|
|
||||||
platforms: ${{ matrix.dockerfile[1] }}
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
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@50769540e7f4bd5e21e526ee35c689e35e0d6874
|
|
||||||
with:
|
|
||||||
name: dockerfiles
|
|
||||||
pattern: dockerfiles_*
|
|
||||||
delete-merged: true
|
|
16
.github/workflows/ci.yaml
vendored
16
.github/workflows/ci.yaml
vendored
@ -74,19 +74,3 @@ jobs:
|
|||||||
# job outputs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
# job outputs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
# setting environment variables from earlier steps: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
# setting environment variables from earlier steps: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
||||||
#
|
#
|
||||||
bootstrap:
|
|
||||||
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
|
|
||||||
secrets: inherit
|
|
||||||
all:
|
|
||||||
needs: [ unit-tests, bootstrap ]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Success
|
|
||||||
run: "true"
|
|
||||||
|
31
.github/workflows/nightly-win-builds.yml
vendored
31
.github/workflows/nightly-win-builds.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: Windows Paraview Nightly
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 2 * * *' # Run at 2 am
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell:
|
|
||||||
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-paraview-deps:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: 3.9
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip six pywin32 setuptools coverage
|
|
||||||
- name: Build Test
|
|
||||||
run: |
|
|
||||||
spack compiler find
|
|
||||||
spack external find cmake ninja win-sdk win-wdk wgl msmpi
|
|
||||||
spack -d install -y --cdash-upload-url https://cdash.spack.io/submit.php?project=Spack+on+Windows --cdash-track Nightly --only dependencies paraview
|
|
||||||
exit 0
|
|
247
.github/workflows/unit_tests.yaml
vendored
247
.github/workflows/unit_tests.yaml
vendored
@ -1,247 +0,0 @@
|
|||||||
name: unit tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_call:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: unit_tests-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Run unit tests with different configurations on linux
|
|
||||||
ubuntu:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
|
||||||
on_develop:
|
|
||||||
- ${{ github.ref == 'refs/heads/develop' }}
|
|
||||||
include:
|
|
||||||
- python-version: '3.6'
|
|
||||||
os: ubuntu-20.04
|
|
||||||
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
|
||||||
exclude:
|
|
||||||
- python-version: '3.7'
|
|
||||||
os: ubuntu-latest
|
|
||||||
on_develop: false
|
|
||||||
- python-version: '3.8'
|
|
||||||
os: ubuntu-latest
|
|
||||||
on_develop: false
|
|
||||||
- python-version: '3.9'
|
|
||||||
os: ubuntu-latest
|
|
||||||
on_develop: false
|
|
||||||
- python-version: '3.10'
|
|
||||||
os: ubuntu-latest
|
|
||||||
on_develop: false
|
|
||||||
- python-version: '3.11'
|
|
||||||
os: ubuntu-latest
|
|
||||||
on_develop: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install System packages
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y update
|
|
||||||
# Needed for unit tests
|
|
||||||
sudo apt-get -y install \
|
|
||||||
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
|
|
||||||
cmake bison libbison-dev kcov
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
|
|
||||||
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/bin/setup_git.sh
|
|
||||||
- name: Bootstrap clingo
|
|
||||||
if: ${{ matrix.concretizer == 'clingo' }}
|
|
||||||
env:
|
|
||||||
SPACK_PYTHON: python
|
|
||||||
run: |
|
|
||||||
. share/spack/setup-env.sh
|
|
||||||
spack bootstrap disable spack-install
|
|
||||||
spack bootstrap now
|
|
||||||
spack -v solve zlib
|
|
||||||
- name: Run unit tests
|
|
||||||
env:
|
|
||||||
SPACK_PYTHON: python
|
|
||||||
SPACK_TEST_PARALLEL: 2
|
|
||||||
COVERAGE: true
|
|
||||||
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
|
|
||||||
run: |
|
|
||||||
share/spack/qa/run-unit-tests
|
|
||||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
with:
|
|
||||||
flags: unittests,linux,${{ matrix.concretizer }}
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: true
|
|
||||||
# Test shell integration
|
|
||||||
shell:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
- name: Install System packages
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y update
|
|
||||||
# Needed for shell tests
|
|
||||||
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
|
|
||||||
- name: Setup git configuration
|
|
||||||
run: |
|
|
||||||
# Need this for the git tests to succeed.
|
|
||||||
git --version
|
|
||||||
. .github/workflows/bin/setup_git.sh
|
|
||||||
- name: Run shell tests
|
|
||||||
env:
|
|
||||||
COVERAGE: true
|
|
||||||
run: |
|
|
||||||
share/spack/qa/run-shell-tests
|
|
||||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
with:
|
|
||||||
flags: shelltests,linux
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: true
|
|
||||||
|
|
||||||
# Test RHEL8 UBI with platform Python. This job is run
|
|
||||||
# only on PRs modifying core Spack
|
|
||||||
rhel8-platform-python:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: registry.access.redhat.com/ubi8/ubi
|
|
||||||
steps:
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
dnf install -y \
|
|
||||||
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
|
||||||
make patch tcl unzip which xz
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
- name: Setup repo and non-root user
|
|
||||||
run: |
|
|
||||||
git --version
|
|
||||||
git config --global --add safe.directory /__w/spack/spack
|
|
||||||
git fetch --unshallow
|
|
||||||
. .github/workflows/bin/setup_git.sh
|
|
||||||
useradd spack-test
|
|
||||||
chown -R spack-test .
|
|
||||||
- name: Run unit tests
|
|
||||||
shell: runuser -u spack-test -- bash {0}
|
|
||||||
run: |
|
|
||||||
source share/spack/setup-env.sh
|
|
||||||
spack -d bootstrap now --dev
|
|
||||||
spack unit-test -k 'not cvs and not svn and not hg' -x --verbose
|
|
||||||
# Test for the clingo based solver (using clingo-cffi)
|
|
||||||
clingo-cffi:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
- name: Install System packages
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y update
|
|
||||||
sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
|
|
||||||
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/bin/setup_git.sh
|
|
||||||
- name: Run unit tests (full suite with coverage)
|
|
||||||
env:
|
|
||||||
COVERAGE: true
|
|
||||||
run: |
|
|
||||||
share/spack/qa/run-unit-tests
|
|
||||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
with:
|
|
||||||
flags: unittests,linux,clingo
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: true
|
|
||||||
# Run unit tests on MacOS
|
|
||||||
macos:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-13, macos-14]
|
|
||||||
python-version: ["3.11"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip setuptools
|
|
||||||
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
|
|
||||||
- name: Setup Homebrew packages
|
|
||||||
run: |
|
|
||||||
brew install dash fish gcc gnupg2 kcov
|
|
||||||
- name: Run unit tests
|
|
||||||
env:
|
|
||||||
SPACK_TEST_PARALLEL: 4
|
|
||||||
run: |
|
|
||||||
git --version
|
|
||||||
. .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@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
with:
|
|
||||||
flags: unittests,macos
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: 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@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
|
|
||||||
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
|
|
||||||
run: |
|
|
||||||
spack unit-test -x --verbose --cov --cov-config=pyproject.toml
|
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
|
||||||
coverage combine -a
|
|
||||||
coverage xml
|
|
||||||
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
|
||||||
with:
|
|
||||||
flags: unittests,windows
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
verbose: true
|
|
34
.github/workflows/valid-style.yml
vendored
34
.github/workflows/valid-style.yml
vendored
@ -54,36 +54,4 @@ jobs:
|
|||||||
- name: Run style tests
|
- name: Run style tests
|
||||||
run: |
|
run: |
|
||||||
share/spack/qa/run-style-tests
|
share/spack/qa/run-style-tests
|
||||||
audit:
|
|
||||||
uses: ./.github/workflows/audit.yaml
|
|
||||||
secrets: inherit
|
|
||||||
with:
|
|
||||||
with_coverage: ${{ inputs.with_coverage }}
|
|
||||||
python_version: '3.11'
|
|
||||||
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
|
|
||||||
bootstrap-dev-rhel8:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: registry.access.redhat.com/ubi8/ubi
|
|
||||||
steps:
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
dnf install -y \
|
|
||||||
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
|
||||||
make patch tcl unzip which xz
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
||||||
- name: Setup repo and non-root user
|
|
||||||
run: |
|
|
||||||
git --version
|
|
||||||
git config --global --add safe.directory /__w/spack/spack
|
|
||||||
git fetch --unshallow
|
|
||||||
. .github/workflows/bin/setup_git.sh
|
|
||||||
useradd spack-test
|
|
||||||
chown -R spack-test .
|
|
||||||
- name: Bootstrap Spack development environment
|
|
||||||
shell: runuser -u spack-test -- bash {0}
|
|
||||||
run: |
|
|
||||||
source share/spack/setup-env.sh
|
|
||||||
spack debug report
|
|
||||||
spack -d bootstrap now --dev
|
|
||||||
spack style -t black
|
|
||||||
spack unit-test -V
|
|
||||||
|
Loading…
Reference in New Issue
Block a user