Add CI/build infrastructure

This commit is contained in:
2021-11-27 21:31:48 -05:00
parent 3724bcff8b
commit 4f04c78701
4 changed files with 85 additions and 0 deletions

14
.gitignore vendored Normal file
View File

@@ -0,0 +1,14 @@
.DS_Store
.idea
*.log
tmp/
*.py[cod]
*.egg
build
htmlcov
src/gbasm.egg-info
**/.mypy_cache
**/.pytest_cache
**/.tox
**/__pycache__

31
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,31 @@
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
lint:
script:
- pip3 install black
- black --check src/
test:
script:
- pip3 install tox

36
setup.cfg Normal file
View File

@@ -0,0 +1,36 @@
[metadata]
name = gbasm
version = 0.0.1
author = Max Regan
author_email = mgregan2@gmail.com
description = An assembler for Gameboy assembly language
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent
[options]
package_dir =
= src
packages = find:
python_requires = >=3.7
tests_require = pytest
test_suite = test_assemble
requires = pyyaml, foobarbdfasf
[options.packages.find]
where =
src
test
[options.entry_points]
console_scripts =
gbasm = gbasm.gbasm:main
[tox:tox]
envlist = py39
[testenv]
deps = pytest
pyyaml
commands = pytest

4
setup.py Normal file
View File

@@ -0,0 +1,4 @@
import os
from setuptools import setup
setup()