]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blob - .github/workflows/build.yml
Remove building assets
[hackapet/Adafruit_Blinka_Displayio.git] / .github / workflows / build.yml
1 # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2 # SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries
3 #
4 # SPDX-License-Identifier: MIT
5
6 name: Build CI
7
8 on: [pull_request, push]
9
10 jobs:
11   test:
12     runs-on: ubuntu-latest
13     steps:
14     - name: Dump GitHub context
15       env:
16         GITHUB_CONTEXT: ${{ toJson(github) }}
17       run: echo "$GITHUB_CONTEXT"
18     - name: Translate Repo Name For Build Tools filename_prefix
19       id: repo-name
20       run: |
21         echo ::set-output name=repo-name::Adafruit-Blinka-displayio
22     - name: Set up Python 3.x
23       uses: actions/setup-python@v2
24       with:
25         python-version: "3.x"
26     - name: Versions
27       run: |
28         python3 --version
29     - name: Checkout Current Repo
30       uses: actions/checkout@v1
31       with:
32         submodules: true
33     - name: Checkout tools repo
34       uses: actions/checkout@v2
35       with:
36         repository: adafruit/actions-ci-circuitpython-libs
37         path: actions-ci
38     - name: Install dependencies
39       # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
40       run: |
41         source actions-ci/install.sh
42     - name: Pip install Sphinx, pre-commit
43       run: |
44         pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
45     - name: Library version
46       run: git describe --dirty --always --tags
47     - name: Setup problem matchers
48       uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
49     - name: Pre-commit hooks
50       run: |
51         pre-commit run --all-files
52     - name: Archive bundles
53       uses: actions/upload-artifact@v2
54       with:
55         name: bundles
56         path: ${{ github.workspace }}/bundles/
57     - name: Build docs
58       working-directory: docs
59       run: sphinx-build -E -W -b html . _build/html
60     - name: Check For pyproject.toml
61       id: need-pypi
62       run: |
63         echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
64     - name: Build Python package
65       if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
66       run: |
67         pip install --upgrade build twine
68         for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
69             sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
70         done;
71         python -m build
72         twine check dist/*