From 28e1ee402c68dac8a27d551a329f431733a0843e Mon Sep 17 00:00:00 2001 From: dherrada <33632497+dherrada@users.noreply.github.com> Date: Fri, 18 Oct 2019 10:55:29 -0400 Subject: [PATCH 1/6] Added PyPi installation instructions --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 3bb2b5a..e6d8667 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ This is easily achieved by downloading `the Adafruit library and driver bundle `_. Installing from PyPI --------------------- +==================== On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from PyPI `_. To install for current user: From eced9c5d82e8b19f226d4d749a2f9d82df38c626 Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 20 Nov 2019 10:55:58 -0500 Subject: [PATCH 2/6] Moved from Travis to Github Actions --- .github/workflows/release.yml | 70 +++++++++++++++++++++++++++++++++++ README.rst | 4 +- 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..83fc810 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,70 @@ +name: Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Versions + run: | + python3 --version + - uses: actions/checkout@v1 + with: + submodules: true + - name: Install deps + run: | + sudo apt-get install -y gettext + pip install -r requirements.txt + pip install circuitpython-build-tools Sphinx sphinx-rtd-theme + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Upload Release Assets + # the 'official' actions version does not yet support dynamically + # supplying asset names to upload. @csexton's version chosen based on + # discussion in the issue below, as its the simplest to implement and + # allows for selecting files with a pattern. + # https://github.com/actions/upload-release-asset/issues/4 + #uses: actions/upload-release-asset@v1.0.1 + uses: csexton/release-asset-action@master + with: + pattern: "bundles/*" + github-token: ${{ secrets.GITHUB_TOKEN }} + + upload-pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + python setup.py sdist + twine upload dist/* diff --git a/README.rst b/README.rst index 3bb2b5a..ec1c6a5 100644 --- a/README.rst +++ b/README.rst @@ -9,8 +9,8 @@ Introduction :target: https://discord.gg/nBQh6qu :alt: Discord -.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_74HC595.svg?branch=master - :target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_74HC595 +.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RGBLED/workflows/Build%20CI/badge.svg + :target: https://github.com/adafruit/Adafruit_CircuitPython_RGBLED/actions :alt: Build Status CircuitPython driver for 74HC595 shift register. From f7a08402b73a2c5e493a8495259aca9e08b68ea4 Mon Sep 17 00:00:00 2001 From: dherrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 20 Nov 2019 10:59:27 -0500 Subject: [PATCH 3/6] Fixed actions badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index d59d410..b226a37 100644 --- a/README.rst +++ b/README.rst @@ -9,8 +9,8 @@ Introduction :target: https://discord.gg/nBQh6qu :alt: Discord -.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RGBLED/workflows/Build%20CI/badge.svg - :target: https://github.com/adafruit/Adafruit_CircuitPython_RGBLED/actions +.. image:: https://github.com/adafruit/Adafruit_CircuitPython_74HC595/workflows/Build%20CI/badge.svg + :target: https://github.com/adafruit/Adafruit_CircuitPython_74HC595/actions :alt: Build Status CircuitPython driver for 74HC595 shift register. From d32456a886b6a8ada2142aab1313565cee164d3f Mon Sep 17 00:00:00 2001 From: dherrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Nov 2019 15:00:09 -0500 Subject: [PATCH 4/6] Removed build line from .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 55f127b..1be1c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,8 @@ __pycache__ _build *.pyc .env -build* bundles *.DS_Store .eggs dist -**/*.egg-info \ No newline at end of file +**/*.egg-info From a9d3b85404ac96b5f5eda5dde7633f1d272baf06 Mon Sep 17 00:00:00 2001 From: dherrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Nov 2019 15:07:18 -0500 Subject: [PATCH 5/6] Deleted .travis.yml --- .travis.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0e90577..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -dist: trusty -sudo: false -language: python -python: -- '3.6' -cache: - pip: true -deploy: -- provider: releases - api_key: "$GITHUB_TOKEN" - file_glob: true - file: "$TRAVIS_BUILD_DIR/bundles/*" - skip_cleanup: true - overwrite: true - on: - tags: true -- provider: pypi - user: adafruit-travis - on: - tags: true - password: - secure: EYgKwBVeB5uI6fpBb7JMCkxs7SPfDupTweqfBHS0Ch2i8uk/xYGfkjQ5BUEoTnDQKV/F1Wj9QCj+wpDmVbtNATtm3lG+72vHKlnfpyz5BHjcE0xEOjKj0ShTdCe2xMHGSI6YW37Odf68DTjby2OhBPHLhaJlDQ3x5lVuv+8d4Q8Xi9dzJE5JmZEn/hUTjnHY6wEdyAkekoCF6kgduK2JllBSPYKOtsrp7IwkitZbKdkc51DsM+EuESitanCP3f8d3eyzLcd9DuopP0IgUm2hllJZshlkty6zmr/6o9L4Z8RR3S2UfrvJIbaq+i1NJwRHfl8nX8AOPM+V8rxixOrwqLI2BMdu343IS0P33J+mTrL7hZ9U0s7mTnFyXQaXB8qaHN+2TqUHxxIwP3wl4/ejyNdjhBRnp4Br3IeabV7SVzjN2QzfFwL5Nj6eyyVVL8L1MR5IcybKfJr4B8kLLeOJfbAkKDC4gjuEou0uBl0XId0GIY+IT/40rkXeUw/3q/80iJdba+a+WIpPWZZwzOhoyT/hSrJhdlkNjIZFbudf/BHLwVKG2dEEmWKNg9kedo9XjFRZn8MR6dwtLUW8mvkhpzI/lZ1QR0K3+Q82bM+dM/smHS7793paWRPcFf90UaKRI8xtryNrgIBS9erZKnVBPmMY3H6TqmQp0ys4svM2+Z0= -install: -- pip install -r requirements.txt -- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme -- pip install --force-reinstall pylint==1.9.2 -script: -- pylint adafruit_74hc595.py -- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace - examples/*.py) -- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-74hc595 --library_location - . -- cd docs && sphinx-build -E -W -b html . _build/html && cd .. From 3efc2dbca7c3cedf748757734c3a26639ab66616 Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 27 Nov 2019 15:15:32 -0500 Subject: [PATCH 6/6] Added build.yaml --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..54c6663 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build CI + +on: [pull_request, push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Versions + run: | + python3 --version + - uses: actions/checkout@v1 + with: + submodules: true + - name: Install deps + run: | + sudo apt-get install -y gettext + pip install -r requirements.txt + pip install circuitpython-build-tools Sphinx sphinx-rtd-theme + pip install --force-reinstall pylint==1.9.2 + - name: Library version + run: git describe --dirty --always --tags + - name: PyLint + run: | + pylint $( find . -path './adafruit*.py' ) + ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py) + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Build docs + working-directory: docs + run: sphinx-build -E -W -b html . _build/html