-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build and test packages | ||
|
||
on: [push] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Build source distribution | ||
run: | | ||
python -m pip install build | ||
python -m build --sdist | ||
- name: Upload source distribution | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: sdist-${{ github.sha }} | ||
path: ./dist/webp-*.tar.gz | ||
retention-days: 7 | ||
|
||
test-sdist: | ||
name: Test source distribution | ||
needs: build-sdist | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Fetch source distribution | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: sdist-${{ github.sha }} | ||
path: dist/ | ||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install the package | ||
run: | | ||
python -m pip install dist/webp-*.tar.gz | ||
- name: Test with pytest | ||
run: | | ||
python -m pip install pytest | ||
pytest tests/ | ||
build-wheels: | ||
name: Build and test wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019] | ||
env: | ||
CIBW_BUILD: 'cp3*-manylinux_x86_64 cp3*-win_amd64' | ||
CIBW_TEST_REQUIRES: pytest | ||
CIBW_TEST_COMMAND: pytest {package}/tests | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.3.1 | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels-${{ github.sha }} | ||
path: ./wheelhouse/*.whl | ||
retention-days: 7 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.