Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #29
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
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
tags: | |
- v* | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-wheels: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: [37, 38, 39, 310, 311] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Setup rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: cp${{matrix.python-version}}-* | |
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"' | |
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"' | |
- name: Upload Binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
test-wheels: | |
needs: [build-wheels] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, '3.10', '3.11'] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: py_cpp_demangle_source | |
- uses: actions/[email protected] | |
with: | |
name: wheels | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install wheel | |
run: | | |
pip install --force-reinstall --no-deps --no-index --find-links . cpp-demangle | |
- name: Run unittests | |
run: | | |
python -m unittest discover py_cpp_demangle_source/tests | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [test-wheels] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: wheels | |
- name: Create GitHub Release | |
uses: fnkr/[email protected] | |
env: | |
GHR_PATH: . | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Push to PyPi | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install --upgrade wheel pip setuptools twine | |
twine upload * | |
rm * |