Add scripts and CI for ulab-circuitpython
This will check - that the unix port builds and passes its tests - that the doc build succeeds
This commit is contained in:
parent
d0f68c8560
commit
57ab95cc70
2 changed files with 50 additions and 3 deletions
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
|
|
@ -13,17 +13,17 @@ on:
|
|||
types: [rerequested]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
micropython:
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Set up Python 3.5
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.5
|
||||
python-version: 3.8
|
||||
|
||||
- name: Versions
|
||||
run: |
|
||||
|
|
@ -60,3 +60,30 @@ jobs:
|
|||
done
|
||||
if: failure()
|
||||
|
||||
circuitpython:
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Set up Python 3.5
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Versions
|
||||
run: |
|
||||
gcc --version
|
||||
python3 --version
|
||||
|
||||
- name: Checkout ulab
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
sudo apt install librsvg2-bin gettext
|
||||
pip install "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter astroid isort polib black
|
||||
|
||||
- name: Run build-cp.sh
|
||||
run: ./build-cp.sh
|
||||
|
|
|
|||
20
build-cp.sh
Executable file
20
build-cp.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
nproc=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())')
|
||||
HERE="$(dirname -- "$(readlink -f -- "${0}")" )"
|
||||
[ -e circuitpython/py/py.mk ] || (git clone --depth 100 --branch 6.0.x https://github.com/adafruit/circuitpython && cd circuitpython && git submodule update --init)
|
||||
rm -rf circuitpython/extmod/ulab; ln -s "$HERE" circuitpython/extmod/ulab
|
||||
make -C circuitpython/mpy-cross -j$nproc
|
||||
make -C circuitpython/ports/unix -j$nproc deplibs
|
||||
make -C circuitpython/ports/unix -j$nproc
|
||||
|
||||
if ! env MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests -d tests; then
|
||||
for exp in *.exp; do
|
||||
testbase=$(basename $exp .exp);
|
||||
echo -e "\nFAILURE $testbase";
|
||||
diff -u $testbase.exp $testbase.out;
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(cd circuitpython && sphinx-build -E -W -b html . _build/html)
|
||||
Loading…
Reference in a new issue