Skip to content

Commit 19ead69

Browse files
committed
github: Add dependabot configuration and update workflows
- Added dependabot configuration for GitHub Actions and Docker. - Updated docker_manifest.yml to include ARM64 build job. - Modified on_pr.yml and on_push.yml to comment out unused platforms. - Updated Containerfile to define fork repository arguments. - Added LICENSE file with MIT License. - Created action.yml for Circuitpython Port Builder Composite Action. - Enhanced entrypoint.sh for better build and release handling. Signed-off-by: Chiho Sin <[email protected]>
1 parent a425e2e commit 19ead69

File tree

8 files changed

+132
-36
lines changed

8 files changed

+132
-36
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: docker
8+
directory: /
9+
schedule:
10+
interval: daily

.github/workflows/docker_manifest.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,20 @@ jobs:
2727
push: true
2828
secrets: inherit
2929

30+
docker-arm64:
31+
if: inputs.cpy_platform != 'litex'
32+
uses: ./.github/workflows/docker_build.yml
33+
with:
34+
cpy_platform: ${{ inputs.cpy_platform }}
35+
platform: linux/arm64
36+
runs-on: ubuntu-24.04-arm
37+
push: true
38+
secrets: inherit
39+
3040
docker-manifest:
3141
needs:
3242
- docker-amd64
43+
- docker-arm64
3344
runs-on: ubuntu-24.04
3445
steps:
3546
- uses: actions/checkout@v4
@@ -58,4 +69,5 @@ jobs:
5869
${{ steps.meta_docker.outputs.tags }}
5970
push: true
6071
sources: |
61-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.docker-amd64.outputs.digest }}
72+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.docker-amd64.outputs.digest }}
73+
${{ inputs.cpy_platform != 'litex' && env.REGISTRY }}/${{ inputs.cpy_platform != 'litex' && env.IMAGE_NAME }}@${{ inputs.cpy_platform != 'litex' && needs.docker-arm64.outputs.digest }}

.github/workflows/on_pr.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
cpy_platform:
17-
- analog
18-
- atmel-samd
19-
- broadcom
20-
- cxd56
17+
# - analog
18+
# - atmel-samd
19+
# - broadcom
20+
# - cxd56
2121
- espressif
22-
- litex
23-
- mimxrt10xx
22+
# - litex
23+
# - mimxrt10xx
2424
- nordic
25-
- raspberrypi
26-
- renode
27-
- silabs
28-
- stm
29-
- zephyr-cp
25+
# - raspberrypi
26+
# - renode
27+
# - silabs
28+
# - stm
29+
# - zephyr-cp
3030
uses: ./.github/workflows/docker_build.yml
3131
with:
3232
cpy_platform: ${{ matrix.cpy_platform }}

.github/workflows/on_push.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
schedule:
88
# build and push weekly
9-
- cron: '0 5 * * 5'
9+
- cron: 0 5 * * 5
1010
workflow_dispatch: # allow manual triggering
1111

1212
permissions:
@@ -21,19 +21,19 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
cpy_platform:
24-
- analog
25-
- atmel-samd
26-
- broadcom
27-
- cxd56
24+
# - analog
25+
# - atmel-samd
26+
# - broadcom
27+
# - cxd56
2828
- espressif
29-
- litex
30-
- mimxrt10xx
29+
# - litex
30+
# - mimxrt10xx
3131
- nordic
32-
- raspberrypi
33-
- renode
34-
- silabs
35-
- stm
36-
- zephyr-cp
32+
# - raspberrypi
33+
# - renode
34+
# - silabs
35+
# - stm
36+
# - zephyr-cp
3737
uses: ./.github/workflows/docker_manifest.yml
3838
with:
3939
cpy_platform: ${{ matrix.cpy_platform }}

Containerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ RUN apt-get update && apt-get install -y \
1515
FROM base AS repo
1616
ARG BUILD_REPO="https://github.com/adafruit/circuitpython.git"
1717
ARG BUILD_REF="main"
18-
ARG BUILD_FORK_REPO="https://github.com/fobe-projects/circuitpython.git"
19-
ARG BUILD_FORK_REF="main"
2018

2119
WORKDIR /workspace
2220

@@ -135,6 +133,9 @@ fi
135133

136134
FROM port AS fork
137135

136+
ARG BUILD_FORK_REPO="https://github.com/fobe-projects/circuitpython.git"
137+
ARG BUILD_FORK_REF="main"
138+
138139
RUN git config --global --add safe.directory /workspace \
139140
&& git config --global protocol.file.allow always \
140141
&& git remote add fork "${BUILD_FORK_REPO}" \

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 FoBE Studio
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

action.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Setup Circuitpython Port Builder Composite Action
2+
description: Port builder actions for Circuitpython steps
3+
author: FoBE Studio
4+
5+
inputs:
6+
cpy_platform:
7+
description: The Circuitpython platform to build (espressif, nordic)
8+
required: true
9+
cpy_target:
10+
description: The Circuitpython run target (default is 'build')
11+
required: false
12+
default: build
13+
cpy_board:
14+
description: The Circuitpython board to build for build target
15+
required: false
16+
cpy_boards:
17+
description: The Circuitpython board to build for release target
18+
required: false
19+
20+
runs:
21+
using: composite
22+
steps:
23+
- id: validate_inputs
24+
run: |
25+
if [[ "${{ inputs.cpy_target }}" == "build" && -z "${{ inputs.cpy_board }}" ]]; then
26+
echo "Error: 'cpy_board' must be provided when 'cpy_target' is 'build'."
27+
exit 1
28+
fi
29+
if [[ "${{ inputs.cpy_target }}" == "release" && -z "${{ inputs.cpy_boards }}" ]]; then
30+
echo "Error: 'cpy_boards' must be provided when 'cpy_target' is 'release'."
31+
exit 1
32+
fi
33+
shell: bash
34+
- id: build_circuitpython
35+
run: |
36+
docker run --rm \
37+
--env GITHUB_ACTIONS \
38+
--env GITHUB_SHA \
39+
--env CPY_PLATFORM \
40+
--env CPY_TARGET \
41+
--env CPY_BOARD \
42+
--env CPY_BOARDS \
43+
-v $GITHUB_WORKSPACE/bin:/workspace/bin \
44+
-v $GITHUB_WORKSPACE/build/${{ inputs.cpy_board }}:/workspace/ports/${{ inputs.cpy_platform }}/build-${{ inputs.cpy_board }} \
45+
ghcr.io/fobe-projects/action-circuitpython-builder:main-${{ inputs.cpy_platform }}
46+
shell: bash
47+
env:
48+
GITHUB_SHA: ${{ github.sha }}
49+
CPY_PLATFORM: ${{ inputs.cpy_platform }}
50+
CPY_TARGET: ${{ inputs.cpy_target }}
51+
CPY_BOARD: ${{ inputs.cpy_board }}
52+
CPY_BOARDS: ${{ inputs.cpy_boards }}

entrypoint.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ make -j"$(nproc)" -C mpy-cross
2222

2323
# Espressif IDF
2424
if [[ ${CPY_PLATFORM} == "espressif" ]]; then
25-
export IDF_PATH=/workspace/ports/espressif/esp-idf
26-
export IDF_TOOLS_PATH=/workspace/.idf_tools
27-
export ESP_ROM_ELF_DIR=/workspace/.idf_tools
28-
source "${IDF_PATH}/export.sh"
25+
export IDF_PATH=/workspace/ports/espressif/esp-idf
26+
export IDF_TOOLS_PATH=/workspace/.idf_tools
27+
export ESP_ROM_ELF_DIR=/workspace/.idf_tools
28+
source "${IDF_PATH}/export.sh"
2929
fi
3030

3131
# Build
3232
if [[ ${CPY_TARGET} == "build" ]]; then
33-
echo "Building CircuitPython: ${CPY_PLATFORM}:${CPY_BOARD}"
34-
make -j"$(nproc)" -C "ports/${CPY_PLATFORM}" ${CPY_FLAGS} BOARD="${CPY_BOARD}" DEBUG="${CPY_DEBUG}" TRANSLATION="${CPY_TRANSLATION}"
35-
echo "Build artifacts are located at: /workspace/ports/${CPY_PLATFORM}/build-${CPY_BOARD}"
33+
echo "Building CircuitPython: ${CPY_PLATFORM}:${CPY_BOARD}"
34+
make -j"$(nproc)" -C "ports/${CPY_PLATFORM}" "${CPY_FLAGS}" BOARD="${CPY_BOARD}" DEBUG="${CPY_DEBUG}" TRANSLATION="${CPY_TRANSLATION}"
35+
echo "Build artifacts are located at: /workspace/ports/${CPY_PLATFORM}/build-${CPY_BOARD}"
3636
fi
3737

3838
# Release
3939
if [[ ${CPY_TARGET} == "release" ]]; then
40-
echo "Building CircuitPython release: ${CPY_PLATFORM}:${CPY_BOARDS}"
41-
cd ./tools && BOARDS="${CPY_BOARDS}" python3 -u build_release_files.py
42-
echo "Build artifacts are located at: /workspace/bin"
40+
echo "Building CircuitPython release: ${CPY_PLATFORM}:${CPY_BOARDS}"
41+
cd ./tools && BOARDS="${CPY_BOARDS}" python3 -u build_release_files.py
42+
echo "Build artifacts are located at: /workspace/bin"
4343
fi

0 commit comments

Comments
 (0)