Skip to content

Commit

Permalink
Update workflows (PyTorch 2.5.1, zizmor security fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Dec 18, 2024
1 parent 1d04fdf commit cbc416c
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/macos-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# https://github.com/actions/setup-python/issues/696
python-version: ["3.10", "3.11", "3.12"]
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.5.0"]
torch-version: ["1.11.0", "2.5.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
Expand Down Expand Up @@ -74,7 +74,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -90,7 +92,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')-nolibcint" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: EXTRAS=pyscf tox -e ${{ env.TOXENV }}
run: EXTRAS=pyscf tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
15 changes: 9 additions & 6 deletions .github/workflows/macos-x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ jobs:
torch-version: "1.12.1"
- python-version: "3.11"
torch-version: "1.13.1"
# PyTorch>=2.5.0 does not support Python<3.9
- python-version: "3.8"
torch-version: "2.5.0"

runs-on: ${{ matrix.os }}

Expand All @@ -88,7 +85,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -104,7 +103,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')-nolibcint" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: EXTRAS=pyscf tox -e ${{ env.TOXENV }}
run: EXTRAS=pyscf tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
8 changes: 6 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build wheel (bdist)
run: pipx run build --wheel
Expand All @@ -48,7 +50,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build source distribution (sdist)
run: pipx run build --sdist
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/ubuntu-nolibcint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
os: [ubuntu-latest]
# PyTorch>=2.5.0 does not support Python<3.9
python-version: ["3.9", "3.10", "3.11", "3.12"]
torch-version: ["2.5.0"]
torch-version: ["2.5.1"]

runs-on: ${{ matrix.os }}

Expand All @@ -54,7 +54,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -70,18 +72,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')-nolibcint" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: EXTRAS=pyscf tox -e ${{ env.TOXENV }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: >
matrix.python-version == '3.11' &&
matrix.torch-version == '2.2.2' &&
matrix.os == 'ubuntu-latest'
with:
files: ./coverage.xml # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
run: EXTRAS=pyscf tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
12 changes: 9 additions & 3 deletions .github/workflows/ubuntu-pytorch-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -82,7 +84,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: EXTRAS=pyscf tox -e ${{ env.TOXENV }}-libcint
run: EXTRAS=pyscf tox -e ${TOXENV}-libcint
env:
TOXENV: ${{ env.TOXENV }}
20 changes: 13 additions & 7 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
torch-version: ["2.0.1", "2.1.2", "2.2.2", "2.3.1", "2.4.1", "2.5.0"]
torch-version: ["2.0.1", "2.1.2", "2.2.2", "2.3.1", "2.4.1", "2.5.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
Expand All @@ -59,7 +59,7 @@ jobs:
torch-version: "2.1.2"
# PyTorch>=2.5.0 does not support Python<3.9
- python-version: "3.8"
torch-version: "2.5.0"
torch-version: "2.5.1"

runs-on: ${{ matrix.os }}

Expand All @@ -69,7 +69,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -85,16 +87,20 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: EXTRAS=pyscf tox -e ${{ env.TOXENV }}-libcint
run: EXTRAS=pyscf tox -e ${TOXENV}-libcint
env:
TOXENV: ${{ env.TOXENV }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # 5.1.1
if: >
matrix.python-version == '3.11' &&
matrix.torch-version == '2.2.2' &&
matrix.torch-version == '2.5.1' &&
matrix.os == 'ubuntu-latest'
with:
files: ./coverage.xml # optional
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
os: [windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.5.0"]
torch-version: ["1.11.0", "2.5.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
torch-version: "1.13.1"
# PyTorch>=2.5.0 does not support Python<3.9
- python-version: "3.8"
torch-version: "2.5.0"
torch-version: "2.5.1"

runs-on: ${{ matrix.os }}

Expand All @@ -83,7 +83,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -99,7 +101,11 @@ jobs:
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')-nolibcint" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."
run: echo "TOXENV is set to '${TOXENV}'."
env:
TOXENV: ${{ env.TOXENV }}

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
run: tox -e $TOXENV
env:
TOXENV: ${{ env.TOXENV }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ For more examples and details, check out [the documentation](https://dxtb.readth
| 2.2.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.3.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.4.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.5.0 | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.5.1 | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Note that only the latest bug fix version is listed, but all preceding bug fix minor versions are supported.
For example, although only version 2.2.2 is listed, version 2.2.0 and 2.2.1 are also supported.
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ min_version = 4.0
isolated_build = True
envlist =
py38-torch{1110,1121,1131,201,212,222,231,241}-{nolibcint,libcint},
py39-torch{1110,1121,1131,201,212,222,231,241,250,260}-{nolibcint,libcint},
py310-torch{1110,1121,1131,201,212,222,231,241,250,260}-{nolibcint,libcint},
py311-torch{1131,201,212,222,231,241,250,260}-{nolibcint,libcint},
py312-torch{222,231,241,250,260}-{nolibcint,libcint}
py39-torch{1110,1121,1131,201,212,222,231,241,251,260}-{nolibcint,libcint},
py310-torch{1110,1121,1131,201,212,222,231,241,251,260}-{nolibcint,libcint},
py311-torch{1131,201,212,222,231,241,251,260}-{nolibcint,libcint},
py312-torch{222,231,241,251,260}-{nolibcint,libcint}

[testenv]
setenv =
Expand All @@ -47,6 +47,7 @@ deps =
torch240: torch==2.4.0
torch241: torch==2.4.1
torch250: torch==2.5.0
torch250: torch==2.5.1
torch260: torch==2.6.0

extras =
Expand Down

0 comments on commit cbc416c

Please sign in to comment.