Skip to content

Commit

Permalink
Update and simplify github CI workflow
Browse files Browse the repository at this point in the history
- update to latest action workflows
- pip with python 3.10 has resolution issues installing dependencies, so disable for now
- installing packages is now fast, so remove use of a cache for simplicity

PiperOrigin-RevId: 713721692
Change-Id: Id3559b9456e51ce21a085f2e2a2c5a04d9dfd28b
  • Loading branch information
jsspencer committed Jan 9, 2025
1 parent a2530ba commit 57f784d
Showing 1 changed file with 8 additions and 36 deletions.
44 changes: 8 additions & 36 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']

python-version: ['3.11']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -e '.[testing]'
Expand All @@ -44,7 +31,7 @@ jobs:
flake8 .
- name: Lint with pylint
run: |
pylint --fail-under 9.75 ferminet
pylint --fail-under 9.5 ferminet
- name: Type check with pytype
run: |
pytype ferminet
Expand All @@ -54,34 +41,19 @@ jobs:
strategy:
matrix:
include:
- name-prefix: "all tests"
python-version: '3.10'
os: ubuntu-latest
package-overrides: "none"
- name-prefix: "all tests"
python-version: '3.11'
os: ubuntu-latest
package-overrides: "none"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e '.[testing]'
if [ ${{ matrix.package-overrides }} != none ]; then
pip install ${{ matrix.package-overrides }}
Expand All @@ -90,6 +62,6 @@ jobs:
run: |
python -m pytest
- name: Run multi-device tests
if: matrix.python-version == '3.10'
if: matrix.python-version == '3.11'
run: |
FERMINET_CHEX_N_CPU_DEVICES=2 python -m pytest ferminet/tests/train_test.py

0 comments on commit 57f784d

Please sign in to comment.