Improve organization of CI workflow scripts and pip requirements (#45037)

This commit is contained in:
Alec Scott 2024-07-09 04:46:09 +02:00 committed by GitHub
parent b19c4cdcf6
commit 7c5fbee327
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 14 additions and 22 deletions

View File

@ -12,6 +12,7 @@ updates:
interval: "daily" interval: "daily"
# Requirements to run style checks # Requirements to run style checks
- package-ecosystem: "pip" - package-ecosystem: "pip"
directory: "/.github/workflows/style" directories:
- "/.github/workflows/requirements/*"
schedule: schedule:
interval: "daily" interval: "daily"

View File

@ -152,7 +152,7 @@ jobs:
not_found=0 not_found=0
old_path="$PATH" old_path="$PATH"
export PATH="$ver_dir:$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" export PATH="$old_path"
fi fi
fi fi
@ -166,4 +166,3 @@ jobs:
source share/spack/setup-env.sh source share/spack/setup-env.sh
spack -d gpg list spack -d gpg list
tree ~/.spack/bootstrap/store/ tree ~/.spack/bootstrap/store/

View File

@ -76,7 +76,7 @@ jobs:
env: env:
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}" SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
run: | run: |
.github/workflows/generate_spack_yaml_containerize.sh .github/workflows/bin/generate_spack_yaml_containerize.sh
. share/spack/setup-env.sh . share/spack/setup-env.sh
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }} mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile

View File

@ -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

View File

@ -72,7 +72,7 @@ jobs:
run: | run: |
# Need this for the git tests to succeed. # Need this for the git tests to succeed.
git --version git --version
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
- name: Bootstrap clingo - name: Bootstrap clingo
if: ${{ matrix.concretizer == 'clingo' }} if: ${{ matrix.concretizer == 'clingo' }}
env: env:
@ -118,7 +118,7 @@ jobs:
run: | run: |
# Need this for the git tests to succeed. # Need this for the git tests to succeed.
git --version git --version
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
- name: Run shell tests - name: Run shell tests
env: env:
COVERAGE: true COVERAGE: true
@ -147,7 +147,7 @@ jobs:
git --version git --version
git config --global --add safe.directory /__w/spack/spack git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow git fetch --unshallow
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
useradd spack-test useradd spack-test
chown -R spack-test . chown -R spack-test .
- name: Run unit tests - name: Run unit tests
@ -178,7 +178,7 @@ jobs:
run: | run: |
# Need this for the git tests to succeed. # Need this for the git tests to succeed.
git --version git --version
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
- name: Run unit tests (full suite with coverage) - name: Run unit tests (full suite with coverage)
env: env:
COVERAGE: true COVERAGE: true
@ -217,7 +217,7 @@ jobs:
SPACK_TEST_PARALLEL: 4 SPACK_TEST_PARALLEL: 4
run: | run: |
git --version git --version
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
. share/spack/setup-env.sh . share/spack/setup-env.sh
$(which spack) bootstrap disable spack-install $(which spack) bootstrap disable spack-install
$(which spack) solve zlib $(which spack) solve zlib
@ -247,7 +247,7 @@ jobs:
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- name: Create local develop - name: Create local develop
run: | run: |
./.github/workflows/setup_git.ps1 ./.github/workflows/bin/setup_git.ps1
- name: Unit Test - name: Unit Test
run: | run: |
spack unit-test -x --verbose --cov --cov-config=pyproject.toml spack unit-test -x --verbose --cov --cov-config=pyproject.toml

View File

@ -26,7 +26,7 @@ jobs:
- name: Install Python Packages - name: Install Python Packages
run: | run: |
pip install --upgrade pip setuptools 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) - 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/ run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories) - name: vermin (Repositories)
@ -45,12 +45,12 @@ jobs:
- name: Install Python packages - name: Install Python packages
run: | run: |
pip install --upgrade pip setuptools 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 - name: Setup git configuration
run: | run: |
# Need this for the git tests to succeed. # Need this for the git tests to succeed.
git --version git --version
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
- name: Run style tests - name: Run style tests
run: | run: |
share/spack/qa/run-style-tests share/spack/qa/run-style-tests
@ -76,7 +76,7 @@ jobs:
git --version git --version
git config --global --add safe.directory /__w/spack/spack git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow git fetch --unshallow
. .github/workflows/setup_git.sh . .github/workflows/bin/setup_git.sh
useradd spack-test useradd spack-test
chown -R spack-test . chown -R spack-test .
- name: Bootstrap Spack development environment - name: Bootstrap Spack development environment