Skip to content

Commit

Permalink
ci: ensure that sdist builds (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils authored Nov 6, 2023
1 parent c6d4e06 commit 1773549
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,22 @@ jobs:

- if: runner.os == 'Linux'
name: Install maturin[zig] from PyPI
uses: install-pinned/maturin-with-zig@3dc710cb9a94df049eeafac5f23cafb9f29c8afe
uses: install-pinned/maturin-with-zig@930de5c8284dfb26f11fd30a35a0df4c15ee4f8b
- if: runner.os != 'Linux'
name: Install maturin from PyPI
uses: install-pinned/maturin@09aa0b0195763bcba00172065cbf95c8454cf64d
uses: install-pinned/maturin@4fd3810fa566280146c1de9a0b166cdf7748155d

- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: python .github/scripts/pin-versions.py

- run: maturin build --release ${{ matrix.args }}
working-directory: ./mitmproxy-rs

# ensure that sdist is building.
# We do this here instead of a separate job because we don't want to wait for the entire matrix.
- if: contains(matrix.args, 'sdist')
run: pip install target/wheels/*.tar.gz

- uses: actions/upload-artifact@v3
with:
name: wheels
Expand Down Expand Up @@ -173,9 +178,6 @@ jobs:
- name: Install build from PyPI
uses: install-pinned/build@11bbf2deeb1a44228c45910f3b57e346927960b4
- run: python -m build --wheel ./mitmproxy-${{ matrix.os }} --outdir target/wheels/
# Build sdist for Homebrew
- run: python -m build --sdist ./mitmproxy-${{ matrix.os }} --outdir target/wheels/
if: runner.os == 'macOS'
- uses: actions/upload-artifact@v3
with:
name: wheels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 2
continue-on-error: true
- name: Install maturin[zig] from PyPI
uses: install-pinned/maturin-with-zig@3dc710cb9a94df049eeafac5f23cafb9f29c8afe
uses: install-pinned/maturin-with-zig@930de5c8284dfb26f11fd30a35a0df4c15ee4f8b
- name: Install mypy from PyPI
uses: install-pinned/mypy@020b6c0814d9de4c275f3b4f858c2c40b02554fa
- name: Install pdoc from PyPI
Expand Down
5 changes: 3 additions & 2 deletions mitmproxy-rs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=1.2.3,<2"]
requires = ["maturin>=1,<2"]
build-backend = "maturin"

[project]
Expand All @@ -12,7 +12,8 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.12",
"Development Status :: 5 - Production/Stable",
]

dependencies = [
Expand Down

0 comments on commit 1773549

Please sign in to comment.