commit
e47e6454e1
10
.github/actions/deps/external/action.yml
vendored
10
.github/actions/deps/external/action.yml
vendored
@ -1,6 +1,14 @@
|
|||||||
name: Fetch external deps
|
name: Fetch external deps
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
|
action:
|
||||||
|
required: false
|
||||||
|
default: restore
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- cache
|
||||||
|
- restore
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
required: false
|
required: false
|
||||||
default: none
|
default: none
|
||||||
@ -78,7 +86,7 @@ runs:
|
|||||||
if: inputs.platform != 'esp'
|
if: inputs.platform != 'esp'
|
||||||
uses: ./.github/actions/deps/python
|
uses: ./.github/actions/deps/python
|
||||||
with:
|
with:
|
||||||
action: ${{ fromJSON('["restore", "cache"]')[github.job == 'scheduler'] }}
|
action: ${{ inputs.action }}
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: pip install -r requirements-dev.txt
|
run: pip install -r requirements-dev.txt
|
||||||
shell: bash
|
shell: bash
|
||||||
|
3
.github/actions/upload_aws/action.yml
vendored
3
.github/actions/upload_aws/action.yml
vendored
@ -24,7 +24,8 @@ runs:
|
|||||||
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
||||||
run: >-
|
run: >-
|
||||||
[ -z "$AWS_ACCESS_KEY_ID" ] ||
|
[ -z "$AWS_ACCESS_KEY_ID" ] ||
|
||||||
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }} --recursive --no-progress --region us-east-1
|
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }}
|
||||||
|
${{ endsWith(inputs.source, '/') && '--recursive' || '' }} --no-progress --region us-east-1
|
||||||
env:
|
env:
|
||||||
AWS_PAGER: ''
|
AWS_PAGER: ''
|
||||||
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
|
||||||
|
104
.github/workflows/build-boards-custom.yml
vendored
Normal file
104
.github/workflows/build-boards-custom.yml
vendored
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
name: Custom board build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
description: 'Board: Found in ports/*/boards/[board_id]'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
version:
|
||||||
|
description: 'Version: Can be a tag or a commit (>=8.1.0)'
|
||||||
|
required: false
|
||||||
|
default: latest
|
||||||
|
type: string
|
||||||
|
language:
|
||||||
|
description: 'Language: Found in locale/[language].po'
|
||||||
|
required: false
|
||||||
|
default: en_US
|
||||||
|
type: string
|
||||||
|
flags:
|
||||||
|
description: 'Flags: Build flags (e.g. CIRCUITPY_WIFI=1)'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
debug:
|
||||||
|
description: 'Make a debug build'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
run-name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
PLATFORM_atmel-samd: arm
|
||||||
|
PLATFORM_broadcom: aarch
|
||||||
|
PLATFORM_cxd56: arm
|
||||||
|
PLATFORM_espressif: esp
|
||||||
|
PLATFORM_litex: riscv
|
||||||
|
PLATFORM_mimxrt10xx: arm
|
||||||
|
PLATFORM_nrf: arm
|
||||||
|
PLATFORM_raspberrypi: arm
|
||||||
|
PLATFORM_stm: arm
|
||||||
|
steps:
|
||||||
|
- name: Set up repository
|
||||||
|
run: |
|
||||||
|
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
|
||||||
|
git checkout ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
|
||||||
|
- name: Set up identifier
|
||||||
|
if: inputs.debug || inputs.flags != ''
|
||||||
|
run: |
|
||||||
|
> custom-build && git add custom-build
|
||||||
|
- name: Get port
|
||||||
|
id: get-port
|
||||||
|
run: |
|
||||||
|
PORT=$(find ports/*/boards/ -type d -name ${{ inputs.board }} | sed 's/^ports\///g;s/\/boards.*//g')
|
||||||
|
if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
|
||||||
|
- name: Port to platform
|
||||||
|
run: echo >> $GITHUB_ENV "PLATFORM=${{ env[format('PLATFORM_{0}', steps.get-port.outputs.port)] }}"
|
||||||
|
- name: Set up python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Set up port
|
||||||
|
if: env.PLATFORM == 'esp'
|
||||||
|
uses: ./.github/actions/deps/ports/espressif
|
||||||
|
- name: Set up submodules
|
||||||
|
id: set-up-submodules
|
||||||
|
uses: ./.github/actions/deps/submodules
|
||||||
|
with:
|
||||||
|
action: cache
|
||||||
|
target: ${{ inputs.board }}
|
||||||
|
- name: Set up external
|
||||||
|
uses: ./.github/actions/deps/external
|
||||||
|
with:
|
||||||
|
action: cache
|
||||||
|
platform: ${{ env.PLATFORM }}
|
||||||
|
- name: Set up mpy-cross
|
||||||
|
if: steps.set-up-submodules.outputs.frozen == 'True'
|
||||||
|
uses: ./.github/actions/mpy_cross
|
||||||
|
with:
|
||||||
|
download: false
|
||||||
|
- name: Versions
|
||||||
|
run: |
|
||||||
|
tools/describe
|
||||||
|
gcc --version
|
||||||
|
python3 --version
|
||||||
|
cmake --version || true
|
||||||
|
ninja --version || true
|
||||||
|
aarch64-none-elf-gcc --version || true
|
||||||
|
arm-none-eabi-gcc --version || true
|
||||||
|
xtensa-esp32-elf-gcc --version || true
|
||||||
|
riscv32-esp-elf-gcc --version || true
|
||||||
|
riscv64-unknown-elf-gcc --version || true
|
||||||
|
mkfs.fat --version || true
|
||||||
|
- name: Build board
|
||||||
|
run: make -j2 ${{ inputs.flags }} BOARD=${{ inputs.board }} DEBUG=${{ inputs.debug && '1' || '0' }} TRANSLATION=${{ inputs.language }}
|
||||||
|
working-directory: ports/${{ steps.get-port.outputs.port }}
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }}
|
||||||
|
path: ports/${{ steps.get-port.outputs.port }}/build-${{ inputs.board }}/firmware.*
|
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -52,6 +52,8 @@ jobs:
|
|||||||
version: true
|
version: true
|
||||||
- name: Set up external
|
- name: Set up external
|
||||||
uses: ./.github/actions/deps/external
|
uses: ./.github/actions/deps/external
|
||||||
|
with:
|
||||||
|
action: cache
|
||||||
# Disabled: Needs to be updated
|
# Disabled: Needs to be updated
|
||||||
# - name: Get last commit with checks
|
# - name: Get last commit with checks
|
||||||
# id: get-last-commit-with-checks
|
# id: get-last-commit-with-checks
|
||||||
@ -200,16 +202,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: docs
|
name: docs
|
||||||
path: _build/latex
|
path: _build/latex
|
||||||
- name: Zip stubs
|
|
||||||
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'))
|
|
||||||
run: zip -9r circuitpython-stubs.zip circuitpython-stubs
|
|
||||||
- name: Upload to S3
|
- name: Upload to S3
|
||||||
uses: ./.github/actions/upload_aws
|
uses: ./.github/actions/upload_aws
|
||||||
with:
|
with:
|
||||||
source: circuitpython-stubs/dist/*.tar.gz
|
source: circuitpython-stubs/dist/*.tar.gz
|
||||||
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip
|
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.tar.gz
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
- name: Upload stubs to PyPi
|
- name: Upload stubs to PyPi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user