Skip to content

Commit

Permalink
ci(github): add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Dec 11, 2020
1 parent 9804a55 commit 46b2a52
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
with:
source: "./src"
extensions: "c"
clangFormatVersion: 9
inplace: True
- uses: EndBug/add-and-commit@v4
with:
message: "style: clang-format"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ${{ matrix.platform }}
container:
image: darvid/manylinux-hyperscan:5.3.0
strategy:
matrix:
# Only Linux is supported at the moment
platform: [ubuntu-latest]
python-version:
- cp36-cp36m
- cp37-cp37m
- cp38-cp38
- cp39-cp39
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Build and test
run: |
PYTHONDIR=/opt/python/${PYTHON_VERSION}
${PYTHONDIR}/bin/pip install -UI poetry setuptools
${PYTHONDIR}/bin/poetry build -vvv
${PYTHONDIR}/bin/poetry install
${PYTHONDIR}/bin/poetry run pytest -vvv tests/
- name: Archive dist
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/*.whl
dist/*.tar.gz
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download dist
uses: actions/download-artifact@v2
with:
name: dist
- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 46b2a52

Please sign in to comment.