Skip to content

Commit

Permalink
Avoid recompilation of already built wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Aug 30, 2024
1 parent d9e21cf commit 5752f5a
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,23 @@ jobs:
name: Compile the CCD subset for structure.info from the wwPDB CCD

runs-on: ubuntu-latest
needs:
- test-and-build
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/download-artifact@v4
with:
activate-environment: biotite-dev
miniforge-variant: Mambaforge
python-version: "3.10"
channels: conda-forge,defaults
- name: Build distribution
run: pip wheel -w dist .
name: release-cp312-manylinux_x86_64
path: dist
- uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install distribution
run: pip install .//dist//*.whl pytest
run: pip install dist//*.whl
- name: Compile CCD subset
run: python setup_ccd.py
- name: Zip CCD
Expand All @@ -219,6 +220,8 @@ jobs:
name: Build documentation

runs-on: ubuntu-20.04
needs:
- test-and-build
defaults:
run:
shell: bash -l {0}
Expand All @@ -231,14 +234,16 @@ jobs:
# Make sure to fetch the latest tag, so 'switcher.py' works correctly
fetch-depth: 0
fetch-tags: true
- uses: actions/download-artifact@v4
with:
name: release-cp311-manylinux_x86_64
path: dist
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
- name: Build distribution
run: pip wheel --no-deps -w dist .
- name: Install distribution
run: pip install .//dist//*.whl
run: pip install dist//*.whl
- name: Build base documentation
run: sphinx-build -a -D plot_gallery=0 doc build//doc
- name: Build tutorial and gallery
Expand All @@ -260,15 +265,21 @@ jobs:
path: dist//doc.zip


benchmarks:
benchmark:
runs-on: ubuntu-latest
needs:
- test-and-build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: release-cp312-manylinux_x86_64
path: dist
- uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: pip install .[test]
run: pip install dist//*.whl pytest pytest-codspeed
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
Expand All @@ -281,6 +292,7 @@ jobs:
contents: write
needs:
- lint
- benchmark
- test-and-build
- make-sdist
- test-interfaces
Expand Down

0 comments on commit 5752f5a

Please sign in to comment.