Skip to content
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

ci: merge workflows #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
72 changes: 0 additions & 72 deletions .github/workflows/presubmit.yml

This file was deleted.

118 changes: 117 additions & 1 deletion .github/workflows/publish-to-pypi.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyPI
name: Test

on:
push:
Expand All @@ -7,6 +7,10 @@ on:

jobs:

#
# PyPI
#

Source:
runs-on: ubuntu-20.04
name: Source
Expand Down Expand Up @@ -215,3 +219,115 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*.whl

#
# presubmit
#

presubmit-check:
name: Source checks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# Always clone the full depth so git-describe works.
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install clang-format
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Python style check
run: |
make format lint
test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }
- name: C++ style check
run: |
make format-cpp
test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }
- name: Check license
run: make check-license
- name: Python checks
run: make check-python-scripts

presubmit-test:
name: Test Python package
runs-on: ubuntu-20.04
strategy:
matrix:
antlr_runtime_type: [static, shared]
python_version: [3.5, 3.6, 3.7, 3.8, 3.9]
include:
- python-version: 3.5
TOXENV: py35
- python-version: 3.6
TOXENV: py36
- python-version: 3.7
TOXENV: py37
- python-version: 3.8
TOXENV: py38
- python-version: 3.9
TOXENV: py39
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
# Always clone the full depth so git-describe works.
fetch-depth: 0
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
python update_version.py
- name: Tox
run: ANTLR4_RUNTIME_TYPE=${{ matrix.antlr_runtime_type }} tox -e ${{ matrix.TOXENV }}

#
# Wheels
#

wheels:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
# Always clone the full depth so git-describe works.
fetch-depth: 0
submodules: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade -r requirements.txt
- name: Generate version
run: python update_version.py
- name: Build wheels
run: python setup.py bdist_wheel
- name: Test wheel installation
run: |
python -m pip install dist/*.whl
(cd tests; python test_simple.py)
- uses: actions/upload-artifact@v2
with:
name: fasm
path: dist
40 changes: 0 additions & 40 deletions .github/workflows/wheel.yml

This file was deleted.