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:
|
|
|
|
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-05-05 14:24:08 -04:00
|
|
|
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra gcc-aarch64-linux-gnu
|
2021-03-19 18:22:23 -04:00
|
|
|
pip install -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
|
|
|
|
- name: Build and Validate Stubs
|
|
|
|
run: make check-stubs -j2
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: stubs
|
2021-06-22 15:09:27 -04:00
|
|
|
path: circuitpython-stubs/dist/*
|
2021-06-05 13:07:12 -04:00
|
|
|
- name: Install pypi dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install setuptools wheel twine
|
2020-12-26 02:24:36 -05:00
|
|
|
- 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
|
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-06-19 13:33:34 -04:00
|
|
|
|
|
|
|
- name: Upload stubs to PyPi
|
2021-06-24 12:08:34 -04:00
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'
|
2021-06-19 13:33:34 -04:00
|
|
|
env:
|
|
|
|
TWINE_USERNAME: ${{ secrets.pypi_username }}
|
|
|
|
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
|
|
|
run: |
|
2021-07-08 20:05:26 -04:00
|
|
|
# setup.py sdist was run by 'make stubs'
|
2021-07-16 23:26:19 -04:00
|
|
|
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
|
|
|
|
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
|
2021-09-07 17:59:45 -04:00
|
|
|
- uses: dorny/paths-filter@v2
|
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
# Enable listing of files matching each filter.
|
|
|
|
# Paths to files will be available in `${FILTER_NAME}_files` output variable.
|
|
|
|
# Paths will be formatted as JSON array
|
|
|
|
list-files: json
|
|
|
|
|
|
|
|
# Compare against this branch. (Ignored for PRs.)
|
|
|
|
base: ${{ github.ref }}
|
|
|
|
|
|
|
|
# In this example all changed files are passed to the following action to do
|
|
|
|
# some custom processing.
|
|
|
|
filters: |
|
|
|
|
changed:
|
|
|
|
- '**'
|
|
|
|
- name: "Set boards to build"
|
|
|
|
id: set-matrix
|
|
|
|
working-directory: tools
|
|
|
|
env:
|
|
|
|
CHANGED_FILES: ${{ steps.filter.outputs.changed_files }}
|
|
|
|
run: |
|
|
|
|
python3 -u ci_changed_board_list.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
|
|
|
|
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-03-19 18:22:23 -04:00
|
|
|
pip install -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
|
|
|
|
|
|
|
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-08-12 07:47:34 -04:00
|
|
|
pip install -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-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
|
|
|
|
- name: Install CircuitPython deps
|
|
|
|
run: |
|
|
|
|
source $IDF_PATH/export.sh
|
2021-03-19 18:22:23 -04:00
|
|
|
pip install -r requirements-dev.txt
|
2020-04-17 19:23:28 -04:00
|
|
|
sudo apt-get install -y gettext ninja-build
|
|
|
|
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'))
|