2020-06-03 18:40:05 -04:00
|
|
|
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2019-08-15 03:07:29 -04:00
|
|
|
name: Build CI
|
|
|
|
|
2019-10-14 23:16:59 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
check_suite:
|
|
|
|
types: [rerequested]
|
2019-08-15 03:07:29 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2020-11-16 17:03:29 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2021-09-07 17:59:45 -04:00
|
|
|
outputs:
|
2021-09-15 05:35:05 -04:00
|
|
|
docs-build: ${{ steps.set-matrix.outputs.docs-build }}
|
2021-09-07 17:59:45 -04:00
|
|
|
arm-boards: ${{ steps.set-matrix.outputs.arm-boards }}
|
|
|
|
riscv-boards: ${{ steps.set-matrix.outputs.riscv-boards }}
|
2021-09-14 14:10:55 -04:00
|
|
|
espressif-boards: ${{ steps.set-matrix.outputs.espressif-boards }}
|
2019-08-15 03:07:29 -04:00
|
|
|
steps:
|
|
|
|
- name: Dump GitHub context
|
|
|
|
env:
|
|
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
run: echo "$GITHUB_CONTEXT"
|
2020-06-14 19:54:05 -04:00
|
|
|
- uses: actions/checkout@v2.2.0
|
2020-03-23 09:40:20 -04:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
|
|
|
- name: CircuitPython version
|
2020-07-09 15:13:48 -04:00
|
|
|
run: |
|
|
|
|
git describe --dirty --tags
|
2020-10-08 14:58:45 -04:00
|
|
|
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
|
2020-04-01 17:13:19 -04:00
|
|
|
- name: Set up Python 3.8
|
2019-08-15 03:07:29 -04:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
2020-04-01 17:13:19 -04:00
|
|
|
python-version: 3.8
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2020-12-11 08:34:40 -05:00
|
|
|
sudo apt-get update
|
2020-01-25 15:06:54 -05:00
|
|
|
sudo apt-get install -y eatmydata
|
2021-09-15 05:35:05 -04:00
|
|
|
sudo eatmydata apt-get install -y gettext gcc-aarch64-linux-gnu mingw-w64
|
|
|
|
pip install -r requirements-ci.txt -r requirements-dev.txt
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Versions
|
|
|
|
run: |
|
|
|
|
gcc --version
|
|
|
|
python3 --version
|
2020-12-26 02:24:36 -05:00
|
|
|
- name: Duplicate USB VID/PID Check
|
|
|
|
run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Build mpy-cross
|
|
|
|
run: make -C mpy-cross -j2
|
|
|
|
- name: Build unix port
|
|
|
|
run: |
|
2021-05-04 14:40:55 -04:00
|
|
|
make -C ports/unix VARIANT=coverage -j2
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Test all
|
2021-05-11 20:31:27 -04:00
|
|
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1
|
2019-08-15 03:07:29 -04:00
|
|
|
working-directory: tests
|
2021-08-03 22:46:26 -04:00
|
|
|
- name: Print failure info
|
|
|
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --print-failures
|
|
|
|
if: failure()
|
|
|
|
working-directory: tests
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Native Tests
|
2021-05-11 20:31:27 -04:00
|
|
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native
|
2019-08-15 03:07:29 -04:00
|
|
|
working-directory: tests
|
|
|
|
- name: mpy Tests
|
2021-05-11 20:31:27 -04:00
|
|
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy -d basics float micropython
|
2021-05-04 14:40:55 -04:00
|
|
|
working-directory: tests
|
|
|
|
- name: Native mpy Tests
|
2021-05-11 20:31:27 -04:00
|
|
|
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
|
2019-08-15 03:07:29 -04:00
|
|
|
working-directory: tests
|
2021-05-05 14:24:08 -04:00
|
|
|
- name: Build mpy-cross.static-aarch64
|
|
|
|
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: mpy-cross.static-aarch64
|
|
|
|
path: mpy-cross/mpy-cross.static-aarch64
|
2020-01-25 15:06:54 -05:00
|
|
|
- name: Build mpy-cross.static-raspbian
|
|
|
|
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-01-25 15:06:54 -05:00
|
|
|
with:
|
|
|
|
name: mpy-cross.static-raspbian
|
|
|
|
path: mpy-cross/mpy-cross.static-raspbian
|
|
|
|
- name: Build mpy-cross.static
|
|
|
|
run: make -C mpy-cross -j2 -f Makefile.static
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-01-25 15:06:54 -05:00
|
|
|
with:
|
|
|
|
name: mpy-cross.static-amd64-linux
|
|
|
|
path: mpy-cross/mpy-cross.static
|
|
|
|
- name: Build mpy-cross.static-mingw
|
|
|
|
run: make -C mpy-cross -j2 -f Makefile.static-mingw
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-01-25 15:06:54 -05:00
|
|
|
with:
|
|
|
|
name: mpy-cross.static-x64-windows
|
|
|
|
path: mpy-cross/mpy-cross.static.exe
|
2021-06-19 13:33:34 -04:00
|
|
|
- name: Upload mpy-cross builds to S3
|
2021-07-20 20:30:10 -04:00
|
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
2021-06-06 11:14:02 -04:00
|
|
|
env:
|
|
|
|
AWS_PAGER: ''
|
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2020-07-28 18:17:05 -04:00
|
|
|
run: |
|
2021-05-05 14:24:08 -04:00
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
2020-07-29 09:08:36 -04:00
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
|
2020-10-31 21:13:51 -04:00
|
|
|
zip -9r circuitpython-stubs.zip circuitpython-stubs
|
2021-06-22 15:09:27 -04:00
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
|
2021-09-15 05:35:05 -04:00
|
|
|
- name: "Get changes"
|
|
|
|
uses: dorny/paths-filter@v2
|
2021-09-07 17:59:45 -04:00
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
list-files: json
|
|
|
|
base: ${{ github.ref }}
|
|
|
|
filters: |
|
|
|
|
changed:
|
|
|
|
- '**'
|
2021-09-15 05:35:05 -04:00
|
|
|
- name: "Set matrix"
|
2021-09-07 17:59:45 -04:00
|
|
|
id: set-matrix
|
|
|
|
working-directory: tools
|
|
|
|
env:
|
|
|
|
CHANGED_FILES: ${{ steps.filter.outputs.changed_files }}
|
2021-09-15 05:35:05 -04:00
|
|
|
run: python3 -u ci_set_matrix.py
|
|
|
|
|
2020-01-25 15:06:54 -05:00
|
|
|
|
2020-01-25 19:49:14 -05:00
|
|
|
mpy-cross-mac:
|
2020-04-24 10:08:55 -04:00
|
|
|
runs-on: macos-10.15
|
2020-01-25 19:49:14 -05:00
|
|
|
steps:
|
|
|
|
- name: Dump GitHub context
|
|
|
|
env:
|
|
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
run: echo "$GITHUB_CONTEXT"
|
2020-06-14 19:54:05 -04:00
|
|
|
- uses: actions/checkout@v2.2.0
|
2020-01-25 19:49:14 -05:00
|
|
|
with:
|
|
|
|
submodules: true
|
2020-03-23 09:40:20 -04:00
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
2020-01-25 19:49:14 -05:00
|
|
|
- name: CircuitPython version
|
2020-07-28 18:17:05 -04:00
|
|
|
run: |
|
|
|
|
git describe --dirty --tags
|
2020-10-08 14:58:45 -04:00
|
|
|
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
|
2021-03-22 19:15:55 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
brew install gettext
|
|
|
|
echo >>$GITHUB_PATH /usr/local/opt/gettext/bin
|
|
|
|
- name: Versions
|
|
|
|
run: |
|
|
|
|
gcc --version
|
|
|
|
python3 --version
|
|
|
|
msgfmt --version
|
2020-01-25 19:49:14 -05:00
|
|
|
- name: Build mpy-cross
|
|
|
|
run: make -C mpy-cross -j2
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-01-25 19:49:14 -05:00
|
|
|
with:
|
|
|
|
name: mpy-cross-macos-catalina
|
|
|
|
path: mpy-cross/mpy-cross
|
2021-05-30 12:59:57 -04:00
|
|
|
- name: Select SDK for M1 build
|
|
|
|
run: sudo xcode-select -switch /Applications/Xcode_12.3.app
|
|
|
|
- name: Build mpy-cross (arm64)
|
|
|
|
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: mpy-cross-macos-bigsur-arm64
|
|
|
|
path: mpy-cross/mpy-cross-arm64
|
|
|
|
- name: Make universal binary
|
|
|
|
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: mpy-cross-macos-universal
|
|
|
|
path: mpy-cross-macos-universal
|
2020-07-28 18:17:05 -04:00
|
|
|
- name: Upload mpy-cross build to S3
|
2020-07-29 09:08:36 -04:00
|
|
|
run: |
|
2021-05-30 12:59:57 -04:00
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-universal-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-bigsur-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
|
2020-07-29 09:08:36 -04:00
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
2020-07-28 18:17:05 -04:00
|
|
|
env:
|
2020-11-17 08:37:07 -05:00
|
|
|
AWS_PAGER: ''
|
2020-07-28 18:17:05 -04:00
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2021-07-20 20:30:10 -04:00
|
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
2020-07-28 18:17:05 -04:00
|
|
|
|
2020-01-25 19:49:14 -05:00
|
|
|
|
2021-09-15 05:35:05 -04:00
|
|
|
build-doc:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: test
|
|
|
|
if: ${{ needs.test.outputs.docs-build == 'True' }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2.2.0
|
|
|
|
with:
|
|
|
|
submodules: false
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Populate selected submodules
|
|
|
|
run: git submodule update --init extmod/ulab
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
|
|
|
- name: CircuitPython version
|
|
|
|
run: |
|
|
|
|
git describe --dirty --tags
|
|
|
|
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
|
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y eatmydata
|
|
|
|
sudo eatmydata apt-get install -y latexmk librsvg2-bin texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
|
|
|
|
pip install -r requirements-ci.txt -r requirements-doc.txt
|
|
|
|
- name: Build and Validate Stubs
|
|
|
|
run: make check-stubs -j2
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: stubs
|
|
|
|
path: circuitpython-stubs/dist/*
|
|
|
|
- name: Test Documentation Build (HTML)
|
|
|
|
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: docs
|
|
|
|
path: _build/html
|
|
|
|
- name: Test Documentation Build (LaTeX/PDF)
|
|
|
|
run: |
|
|
|
|
make latexpdf
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: docs
|
|
|
|
path: _build/latex
|
|
|
|
- name: Upload stubs to PyPi
|
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'
|
|
|
|
env:
|
|
|
|
TWINE_USERNAME: ${{ secrets.pypi_username }}
|
|
|
|
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
|
|
|
run: |
|
|
|
|
# setup.py sdist was run by 'make stubs'
|
|
|
|
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
|
|
|
|
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
|
|
|
|
|
|
|
|
|
2019-08-15 03:07:29 -04:00
|
|
|
build-arm:
|
2020-11-16 17:03:29 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2019-08-15 03:07:29 -04:00
|
|
|
needs: test
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-07 17:59:45 -04:00
|
|
|
board: ${{ fromJSON(needs.test.outputs.arm-boards) }}
|
2021-09-10 10:30:29 -04:00
|
|
|
if: ${{ needs.test.outputs.arm-boards != '[]' }}
|
2019-08-15 03:07:29 -04:00
|
|
|
steps:
|
2020-04-01 17:13:19 -04:00
|
|
|
- name: Set up Python 3.8
|
2019-08-15 03:07:29 -04:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
2020-04-01 17:13:19 -04:00
|
|
|
python-version: 3.8
|
2021-03-22 19:15:55 -04:00
|
|
|
- uses: actions/checkout@v2.2.0
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y gettext
|
2021-09-15 05:35:05 -04:00
|
|
|
pip install -r requirements-ci.txt -r requirements-dev.txt
|
2020-12-14 15:41:17 -05:00
|
|
|
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
2020-12-14 15:55:31 -05:00
|
|
|
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
2020-03-30 22:53:58 -04:00
|
|
|
- name: Versions
|
|
|
|
run: |
|
|
|
|
gcc --version
|
|
|
|
arm-none-eabi-gcc --version
|
|
|
|
python3 --version
|
|
|
|
- name: mpy-cross
|
|
|
|
run: make -C mpy-cross -j2
|
2021-04-13 18:55:50 -04:00
|
|
|
- name: Setup build failure matcher
|
|
|
|
run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json"
|
2020-03-30 22:53:58 -04:00
|
|
|
- name: build
|
|
|
|
run: python3 -u build_release_files.py
|
|
|
|
working-directory: tools
|
|
|
|
env:
|
|
|
|
BOARDS: ${{ matrix.board }}
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-30 22:53:58 -04:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.board }}
|
|
|
|
path: bin/${{ matrix.board }}
|
|
|
|
- name: Upload to S3
|
|
|
|
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
|
|
|
|
env:
|
2020-11-17 08:37:07 -05:00
|
|
|
AWS_PAGER: ''
|
2020-03-30 22:53:58 -04:00
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2021-07-20 20:30:10 -04:00
|
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
2020-03-30 22:53:58 -04:00
|
|
|
|
2021-09-15 05:35:05 -04:00
|
|
|
|
2020-03-30 22:53:58 -04:00
|
|
|
build-riscv:
|
2020-11-16 17:03:29 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-03-30 22:53:58 -04:00
|
|
|
needs: test
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-07 17:59:45 -04:00
|
|
|
board: ${{ fromJSON(needs.test.outputs.riscv-boards) }}
|
2021-09-10 10:30:29 -04:00
|
|
|
if: ${{ needs.test.outputs.riscv-boards != '[]' }}
|
2020-03-30 22:53:58 -04:00
|
|
|
steps:
|
2020-04-01 17:13:19 -04:00
|
|
|
- name: Set up Python 3.8
|
2020-03-30 22:53:58 -04:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
2020-04-01 17:13:19 -04:00
|
|
|
python-version: 3.8
|
2021-03-22 19:15:55 -04:00
|
|
|
- uses: actions/checkout@v2.2.0
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
2020-03-30 22:53:58 -04:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y gettext
|
2021-09-15 05:35:05 -04:00
|
|
|
pip install -r requirements-ci.txt -r requirements-dev.txt
|
2020-03-30 22:05:31 -04:00
|
|
|
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
|
|
|
|
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: Versions
|
|
|
|
run: |
|
|
|
|
gcc --version
|
2020-03-30 22:05:31 -04:00
|
|
|
riscv64-unknown-elf-gcc --version
|
2019-08-15 03:07:29 -04:00
|
|
|
python3 --version
|
|
|
|
- name: mpy-cross
|
|
|
|
run: make -C mpy-cross -j2
|
2021-04-13 18:55:50 -04:00
|
|
|
- name: Setup build failure matcher
|
|
|
|
run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json"
|
2019-08-15 03:07:29 -04:00
|
|
|
- name: build
|
|
|
|
run: python3 -u build_release_files.py
|
|
|
|
working-directory: tools
|
|
|
|
env:
|
|
|
|
BOARDS: ${{ matrix.board }}
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2019-08-15 03:07:29 -04:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.board }}
|
|
|
|
path: bin/${{ matrix.board }}
|
|
|
|
- name: Upload to S3
|
2019-11-17 22:18:25 -05:00
|
|
|
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
|
2019-08-15 03:07:29 -04:00
|
|
|
env:
|
2020-11-17 08:37:07 -05:00
|
|
|
AWS_PAGER: ''
|
2019-08-15 03:07:29 -04:00
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2021-07-20 20:30:10 -04:00
|
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
2021-09-15 05:35:05 -04:00
|
|
|
|
|
|
|
|
2021-09-13 19:44:55 -04:00
|
|
|
build-espressif:
|
2020-11-17 10:01:50 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-04-17 19:23:28 -04:00
|
|
|
needs: test
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-09-13 19:44:55 -04:00
|
|
|
board: ${{ fromJSON(needs.test.outputs.espressif-boards) }}
|
|
|
|
if: ${{ needs.test.outputs.espressif-boards != '[]' }}
|
2020-04-17 19:23:28 -04:00
|
|
|
steps:
|
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2020-06-14 19:54:05 -04:00
|
|
|
- uses: actions/checkout@v2.2.0
|
2020-04-17 19:23:28 -04:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
|
|
|
|
- name: CircuitPython version
|
|
|
|
run: git describe --dirty --tags
|
2021-01-29 12:36:27 -05:00
|
|
|
- uses: actions/cache@v2
|
2020-04-17 19:23:28 -04:00
|
|
|
name: Fetch IDF tool cache
|
|
|
|
id: idf-cache
|
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/.idf_tools
|
2021-09-13 19:44:55 -04:00
|
|
|
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/espressif/esp-idf/HEAD') }}-20210716
|
2020-08-30 21:51:04 -04:00
|
|
|
- name: Clone IDF submodules
|
|
|
|
run: |
|
|
|
|
(cd $IDF_PATH && git submodule update --init)
|
|
|
|
env:
|
2021-09-13 19:44:55 -04:00
|
|
|
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
|
2020-04-17 19:23:28 -04:00
|
|
|
- name: Install IDF tools
|
|
|
|
run: |
|
|
|
|
$IDF_PATH/tools/idf_tools.py --non-interactive install required
|
|
|
|
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
|
|
|
|
$IDF_PATH/tools/idf_tools.py --non-interactive install-python-env
|
|
|
|
rm -rf $IDF_TOOLS_PATH/dist
|
|
|
|
env:
|
2021-09-13 19:44:55 -04:00
|
|
|
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
|
2020-04-17 19:23:28 -04:00
|
|
|
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
|
2021-09-15 05:35:05 -04:00
|
|
|
- name: Install deps
|
2020-04-17 19:23:28 -04:00
|
|
|
run: |
|
|
|
|
source $IDF_PATH/export.sh
|
|
|
|
sudo apt-get install -y gettext ninja-build
|
2021-09-15 05:35:05 -04:00
|
|
|
pip install -r requirements-ci.txt -r requirements-dev.txt
|
2020-04-17 19:23:28 -04:00
|
|
|
env:
|
2021-09-13 19:44:55 -04:00
|
|
|
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
|
2020-04-17 19:23:28 -04:00
|
|
|
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
|
|
|
|
- name: Versions
|
|
|
|
run: |
|
|
|
|
source $IDF_PATH/export.sh
|
|
|
|
gcc --version
|
|
|
|
xtensa-esp32s2-elf-gcc --version
|
|
|
|
python3 --version
|
|
|
|
ninja --version
|
|
|
|
cmake --version
|
|
|
|
shell: bash
|
|
|
|
env:
|
2021-09-13 19:44:55 -04:00
|
|
|
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
|
2020-04-17 19:23:28 -04:00
|
|
|
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
|
|
|
|
- name: mpy-cross
|
|
|
|
run: make -C mpy-cross -j2
|
2021-04-13 18:55:50 -04:00
|
|
|
- name: Setup build failure matcher
|
|
|
|
run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json"
|
2020-04-17 19:23:28 -04:00
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
source $IDF_PATH/export.sh
|
|
|
|
python3 -u build_release_files.py
|
|
|
|
working-directory: tools
|
|
|
|
shell: bash
|
|
|
|
env:
|
2021-09-13 19:44:55 -04:00
|
|
|
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
|
2020-04-17 19:23:28 -04:00
|
|
|
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
|
|
|
|
BOARDS: ${{ matrix.board }}
|
2020-07-29 09:08:36 -04:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-04-17 19:23:28 -04:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.board }}
|
|
|
|
path: bin/${{ matrix.board }}
|
|
|
|
- name: Upload to S3
|
|
|
|
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
|
|
|
|
env:
|
2020-11-17 08:37:07 -05:00
|
|
|
AWS_PAGER: ''
|
2020-04-17 19:23:28 -04:00
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2021-07-20 20:30:10 -04:00
|
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|