Skip to content

Commit

Permalink
Merge pull request #96 from Quantomatic/deploy
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
boldar99 committed Oct 2, 2023
2 parents d6b3417 + 997ffcc commit ff72438
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy

on:
push:
tags:
- '*'

env:
SRC_DIR: zxlive

jobs:
build_and_deploy:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.11 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install base package
run: pip install cx_freeze
- name: Deploy
run: |
python deploy.py build
- name: Publish
run: |
ls build
echo "TODO: publish build/zxlive and the related files"
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: test

on:
push:

env:
SRC_DIR: zxlive

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependecies
run:
python -m pip install ".[test]"
- name: Flake8
continue-on-error: true
run:
pflake8 zxlive
- name: Pylint
continue-on-error: true
run:
pylint zxlive
- name: mypy
continue-on-error: true
run:
mypy zxlive
7 changes: 7 additions & 0 deletions deploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import sys
from cx_Freeze import setup, Executable

# base="Win32GUI" should be used only for Windows GUI app
base = "Win32GUI" if sys.platform == "win32" else None

setup(executables=[Executable("zxlive/__main__.py", base=base, target_name="zxlive")])
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ test = [
"PySide6-stubs",
"shapely-stubs @ git+https://github.com/ciscorn/shapely-stubs.git",
"mypy",
"pyproject-flake8",
"pylint",
]
deploy = ["cx_Freeze"]

[project.urls]
Homepage = "https://github.com/Quantomatic/zxlive"
Expand All @@ -63,6 +66,11 @@ zxlive = "zxlive.app:main"
[tool.pyright]
reportWildcardImportFromLibrary = "none"

[tool.flake8]
extend-ignore = [
"E501",
]

[tool.mypy]
python_version = "3.9"
warn_return_any = true
Expand All @@ -71,3 +79,16 @@ disallow_untyped_defs = true
disable_error_code = [
"import",
]

[tool.distutils.build_exe]
excludes = [
"IPython",
"jupyter",
"pytest",
"mypy",
]
zip_include_packages = [
"encodings",
"zxlive",
"pyzx",
]

0 comments on commit ff72438

Please sign in to comment.