Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix cache #85

Merged
merged 18 commits into from
Nov 6, 2024
39 changes: 15 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:

jobs:
cache-pixi:
if: ${{github.event_name == 'push'}}
if: ${{github.event_name== 'push'}}
uses: Glatzel/template/.github/workflows/cache-pixi.yml@main
with:
machine: windows-latest
Expand All @@ -31,32 +31,23 @@ jobs:
ruff-lint:
uses: Glatzel/template/.github/workflows/ruff.yml@main

pytest-audio:
needs: cache-pixi
if: always()
pytest:
strategy:
matrix:
include:
- submodule: true
pixi_python_env: audio
test_path: ./src/audio
- submodule: false
pixi_python_env: arithmetic-cpu
test_path: ./src/arithmetic
uses: Glatzel/template/.github/workflows/pytest.yml@main
with:
name: test
machine: windows-latest
cache_write: ${{ github.event_name == 'push'}}
pixi_python_env: audio
test_path: ./src/audio
update_submodule: true
test_args: --benchmark-max-time=0.00005 --benchmark-min-rounds=1 --benchmark-histogram=histogram/audio
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

pytest-arithmetic:
needs: cache-pixi
if: always()
uses: Glatzel/template/.github/workflows/pytest.yml@main
with:
name: test
machine: windows-latest
cache_write: ${{ github.event_name == 'push'}}
pixi_python_env: arithmetic-cpu
test_path: ./src/arithmetic
update_submodule: true
test_args: --benchmark-max-time=0.00005 --benchmark-min-rounds=1 --benchmark-histogram=histogram/arithmetic
pixi_python_env: ${{matrix.pixi_python_env}}
test_path: ${{matrix.test_path}}
update_submodule: ${{matrix.submodule}}
test_args: --benchmark-max-time=0.00005 --benchmark-min-rounds=1 --benchmark-histogram=histogram
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 1 addition & 4 deletions src/audio/test_stft.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

def dataset():
if os.getenv("CI"):
return [
dataset_dir / "single channel/ff-16b-1c-44100hz.wav",
dataset_dir / "two channel/ff-16b-2c-44100hz.wav",
]
return [dataset_dir / "two channel/ff-16b-2c-44100hz.wav"]
else: # pragma: nocover
return [
dataset_dir / "BeeMoved/Sample_BeeMoved_96kHz24bit.flac",
Expand Down