Skip to content

Use PyPA's build for CI #128

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 32 additions & 29 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
submodules: true

- uses: actions/setup-python@v2
with:
Expand All @@ -49,29 +49,32 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
submodules: true

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.architecture }}

- name: Install build dependencies
run: pip --disable-pip-version-check install wheel
- name: Install build
run: pip --disable-pip-version-check install build

- name: Build wheel
run: python setup.py bdist_wheel

run: python -m build --wheel

- name: Install
shell: bash
working-directory: dist
run: pip --disable-pip-version-check install *.whl

- name: Test wheel
shell: bash
env:
RPYBUILD_PARALLEL: 1
RPYBUILD_STRIP_LIBPYTHON: 1
working-directory: tests
run: |
cd dist
python -m pip --disable-pip-version-check install *.whl
cd ../tests
python -m pip --disable-pip-version-check install -r requirements.txt
pip --disable-pip-version-check install -r requirements.txt
python run_tests.py

cross-build:
Expand All @@ -88,24 +91,24 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install build dependencies
run: /build/venv/bin/cross-pip --disable-pip-version-check install wheel
submodules: true

- name: Install build
run: /build/venv/bin/cross-pip --disable-pip-version-check install build

- name: Build wheel
run: /build/venv/bin/cross-python setup.py bdist_wheel

run: /build/venv/bin/cross-python -m build --wheel

- name: Install
working-directory: dist
run: /build/venv/bin/cross-pip --disable-pip-version-check install *.whl

- name: Build cross wheel
shell: bash
env:
RPYBUILD_PARALLEL: 1
RPYBUILD_STRIP_LIBPYTHON: 1
run: |
cd dist
/build/venv/bin/cross-pip --disable-pip-version-check install *.whl
cd ../tests/cpp
/build/venv/bin/cross-python run_install.py wheel
working-directory: tests/cpp
run: /build/venv/bin/cross-python run_install.py wheel

publish:
runs-on: ubuntu-latest
Expand All @@ -115,15 +118,15 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
submodules: true

- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: pip --disable-pip-version-check install wheel

- run: pip --disable-pip-version-check install build

- name: Build packages
run: python setup.py sdist bdist_wheel
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/run_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def http_server():
cwd = None

if len(sys.argv) == 2 and sys.argv[1] == "wheel":
cmd_args = [sys.executable, "setup.py", "bdist_wheel"]
cmd_args = [sys.executable, "-m", "build", "--wheel"]
cwd = root
else:
# run pip install
Expand Down