From 1db66beb2e4c13c4a3f89fb39a293944eccb23d5 Mon Sep 17 00:00:00 2001 From: Gregorio Andrea Giudici Date: Thu, 19 Sep 2024 12:45:04 +0200 Subject: [PATCH] Trying to fix error on line 34 --- .github/workflows/wheels.yml | 44 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 76e88c6..6d54c4b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -5,7 +5,7 @@ on: pull_request: push: branches: - - main + - main release: types: - published @@ -19,6 +19,9 @@ jobs: with: submodules: true + - name: Install pipx + run: python -m pip install --user pipx + - name: Build SDist run: pipx run build --sdist @@ -30,7 +33,6 @@ jobs: name: dist-sdist path: dist/*.tar.gz - build_wheels: name: Wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -38,6 +40,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-12, macos-14, windows-latest] + python-version: ["3.8", "3.11"] steps: - uses: actions/checkout@v4 @@ -45,23 +48,26 @@ jobs: submodules: true - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.x # Adjust Python version as needed + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest numpy librosa # Add numpy and other dependencies + pip install pytest numpy librosa - - uses: pypa/cibuildwheel@v2.19 + - name: Build Wheels + uses: pypa/cibuildwheel@v2.19 + with: + output-dir: wheelhouse - name: Verify clean directory run: git diff --exit-code shell: bash - name: Run tests - run: pytest # Ensure pytest runs here after installing the dependencies + run: pytest # Run tests after building the wheels - name: Upload wheels uses: actions/upload-artifact@v4 @@ -74,14 +80,20 @@ jobs: runs-on: ubuntu-latest needs: [build_wheels, build_sdist] steps: - - name: Merge Artifacts - uses: actions/upload-artifact/merge@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist-${{ matrix.os }} + path: wheelhouse + + - name: Merge wheels + uses: actions/upload-artifact@v4 with: name: dist - pattern: dist-* + path: wheelhouse upload_all: - name: Upload if release + name: Upload to PyPI if release needs: merge_wheels runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' @@ -89,11 +101,13 @@ jobs: steps: - uses: actions/setup-python@v5 - - uses: actions/download-artifact@v4 + - name: Download merged artifacts + uses: actions/download-artifact@v4 with: path: dist - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Upload to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ - password: ${{ secrets.pypi_password }} \ No newline at end of file + password: ${{ secrets.pypi_password }}