-
Notifications
You must be signed in to change notification settings - Fork 17
57 lines (54 loc) · 1.85 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: 2021 James Carr
#
# SPDX-License-Identifier: MIT
name: Build CI
on: [pull_request, push]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Versions
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v4
with:
filter: 'blob:none'
depth: 0
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0
sudo apt-get install -y gettext
pip install -r requirements.txt
- name: Library version
run: git describe --dirty --always --tags
- name: Install package locally
run: pip install -e .
- name: Test building single package
run: |
git clone https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing.git
cd Adafruit_CircuitPython_FeatherWing
circuitpython-build-bundles --filename_prefix test-single --library_location .
- name: Test building bundle
run: |
# Use the community bundle because it's smaller and faster
git clone --recurse-submodules https://github.com/adafruit/CircuitPython_Community_Bundle.git
cd CircuitPython_Community_Bundle
circuitpython-build-bundles --filename_prefix test-bundle --library_location libraries --library_depth 2
- name: Munge tests
run: pytest tests
- name: Build Python package
run: |
pip install --upgrade setuptools wheel twine readme_renderer testresources
python setup.py sdist
twine check dist/*