Skip to content

Commit

Permalink
gh workflow: generate sdist alongside pure python wheel
Browse files Browse the repository at this point in the history
Fixes #919.
  • Loading branch information
reyammer committed Jan 29, 2025
1 parent 91adadd commit 01a156f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/python-build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,26 @@ jobs:
- run: python3 ./python/scripts/run_quick_test_magika_cli.py
- run: python3 ./python/scripts/run_quick_test_magika_module.py

build-pure-python-wheel:
build-pure-python-wheel-and-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.5.22/install.sh | sh
- run: uv run ./scripts/prepare_pyproject_for_pure_python_wheel.py
working-directory: python
- name: Build pure python wheel
run: uv build --wheel --out-dir ../dist
- name: Build pure python wheel and source distribution
run: uv build --out-dir ../dist
working-directory: python
- name: Upload wheel
- name: Upload wheel and sdist
uses: actions/upload-artifact@v4
with:
name: wheel-pure-python
name: wheel-pure-python-and-sdist
path: dist

# Download, install, and test the pure python wheel on multiple platforms
test-pure-python-wheel:
needs: [build-pure-python-wheel]
needs: [build-pure-python-wheel-and-sdist]
runs-on: ${{ matrix.platform.runner }}
strategy:
# We want to know in which exact situation the tests fail
Expand All @@ -155,7 +155,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: wheel-pure-python
name: wheel-pure-python-and-sdist
path: dist
- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # pin@v5
Expand Down

0 comments on commit 01a156f

Please sign in to comment.