forked from spack/spack-packages
-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (80 loc) · 2.76 KB
/
Copy pathprechecks.yml
File metadata and controls
90 lines (80 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: prechecks
on:
workflow_call:
inputs:
with_packages:
required: true
type: string
concurrency:
group: prechecks-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
# Validate that the code can be run on all the Python versions supported by Spack
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install Python Packages
run: |
pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin (Repositories)
run: |
vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv repos tests
# Run style checks on the files that have been changed
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install Python packages
run: |
pip install -r .github/workflows/requirements/style/requirements.txt
- name: Run style tests
run: .ci/style_check.sh HEAD^
# todo: license check
# todo: mypy
audit:
uses: ./.github/workflows/audit.yaml
secrets: inherit
with:
python_version: '3.13'
verify-checksums:
# do not run if the commit message or PR description contains [skip-verify-checksums]
if: >-
${{ inputs.with_packages == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
# Depth 2 is required for this check
fetch-depth: 2
- uses: ./.github/actions/checkout-spack
with:
fetch-depth: 1
- name: Verify Added Checksums
run: |
. spack-core/share/spack/setup-env.sh
spack ci verify-versions HEAD~1 HEAD
canonicalization:
name: package.py canonicalization
runs-on: ubuntu-latest
container:
image: ghcr.io/spack/all-pythons:2025-10-10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-spack
- name: Test package.py canonicalization
run: .github/workflows/bin/canonicalize.py
--spack $PWD/spack-core
--python python3.6 python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
--input-dir repos/spack_repo/builtin/packages/
--output-dir canonicalized