Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #40
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: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [ created ] | |
jobs: | |
build: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build manylinux image | |
run: | | |
docker build -t manylinux manylinux | |
- name: Build python wheels | |
run: | | |
docker run -t -v $PWD:/github/workspace manylinux | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: wheels | |
path: wheelhouse | |
test: | |
runs-on: 'ubuntu-latest' | |
needs: build | |
strategy: | |
matrix: | |
python-version: [3.6, 3.7, 3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: wheels | |
path: wheelhouse | |
- name: Install wheel | |
run: | | |
PYTHON_VERSION=${{ matrix.python-version }} | |
pip install wheelhouse/*-cp${PYTHON_VERSION//./}* | |
- name: Install dev dependencies | |
run: | | |
pip install -r dev-requirements.txt | |
- name: Lint with flake8 | |
if: ${{ matrix.python-version == '3.6' }} | |
run: | | |
flake8 | |
- name: Check types with mypy | |
if: ${{ matrix.python-version == '3.6' }} | |
run: | | |
mypy | |
- name: Test with pytest | |
run: | | |
mv abieos _abieos | |
pytest --cov --cov-report xml | |
- name: Upload coverage | |
if: ${{ matrix.python-version == '3.6' }} | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
file: ./coverage.xml # optional | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
build_abieos_macos: | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build abieos | |
run: | | |
cd external/abieos | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: abieos-macos | |
path: external/abieos/build | |
build_package_macos: | |
runs-on: macos-10.15 | |
needs: build_abieos_macos | |
strategy: | |
matrix: | |
python-version: [3.6, 3.7, 3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: abieos-macos | |
path: external/abieos/build | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build library | |
run: | | |
pip install wheel | |
python setup.py build --static | |
python setup.py sdist bdist bdist_wheel | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: dist-macos-${{ matrix.python-version }} | |
path: dist | |
deploy: | |
if: ${{ github.event_name == 'release' }} | |
needs: | |
- test | |
- build_package_macos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: wheels | |
path: wheelhouse | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-macos-3.6 | |
path: dist | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-macos-3.7 | |
path: dist | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: dist-macos-3.8 | |
path: dist | |
- name: 'Install twine' | |
run: | | |
pip install --upgrade pip twine | |
- name: Publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload dist/* wheelhouse/*.whl || true |