Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Migrate to github actions #50

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

Merged
merged 1 commit into from
Sep 19, 2020
Merged
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
91 changes: 91 additions & 0 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
name: dist

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable

check-doc:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Sphinx
run: |
pip --disable-pip-version-check install -e .
pip --disable-pip-version-check install -r docs/requirements.txt
cd docs && make clean html SPHINXOPTS="-W --keep-going"

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-18.04]
python_version: [2.7, 3.5, 3.6, 3.7, 3.8]
architecture: [x86, x64]
exclude:
- os: macos-latest
architecture: x86
- os: ubuntu-18.04
architecture: x86

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

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

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

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

- name: Test wheel
shell: bash
run: |
cd dist
python -m pip --disable-pip-version-check install *.whl
cd ../test
python test_CppHeaderParser.py

publish:
runs-on: ubuntu-latest
needs: [check, check-doc, test]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

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

- name: Build packages
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx
sphinx-rtd-theme