-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add GH Actions workflow to build on each commit.
- Loading branch information
1 parent
98d7b55
commit eb25d56
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build MicroPython + module | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
# macos-13 is x86_64, and macos-14 is arm64 | ||
os: [ubuntu-22.04, macos-13, macos-14] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
name: build.py ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- uses: carlosperate/arm-none-eabi-gcc-action@v1 | ||
with: | ||
release: 10.3-2021.10 | ||
- name: Install CMake v3.22 via PyPI | ||
run: python -m pip install cmake==3.28.3 | ||
- name: Check Versions | ||
run: | | ||
arm-none-eabi-gcc --version | ||
cmake --version | ||
python --version | ||
uname -a | ||
- name: Initialise micro:bit MicroPython submodules | ||
run: git -C micropython-microbit-v2 submodule update --init | ||
- name: Build mpy-cross | ||
run: make -C micropython-microbit-v2/lib/micropython/mpy-cross -j2 | ||
- name: Build MicroPython with C++ module | ||
run: make -C micropython-microbit-v2/src USER_C_MODULES=../../.. -j2 | ||
- name: Upload hex file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: MICROBIT-MICROPYTHON-${{ github.sha }}-${{ matrix.os }}.hex | ||
path: src/MICROBIT.hex |