-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add GitHub Actions workflow to build and upload hex file. (#737)
* CI: Add GitHub Actions workflow to build and upload hex file. * ci: Add date to the uploaded artifact.
- Loading branch information
1 parent
44293a6
commit 42bb525
Showing
1 changed file
with
47 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,47 @@ | ||
name: Build MicroPython | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
name: Build MicroPython | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Yotta has some issues with Python 3.7+ | ||
- name: Install Python 3.6 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.6 | ||
- name: Install GNU Arm Embedded Toolchain (arm-none-eabi-gcc) | ||
uses: carlosperate/arm-none-eabi-gcc-action@v1 | ||
with: | ||
release: "10.3-2021.10" | ||
- name: Install CMake, Ninja & Yotta | ||
run: pip install cmake==3.22.3 ninja==1.10.2.3 yotta==0.20.5 | ||
- name: Install srecord | ||
run: sudo apt-get install -y srecord | ||
- name: Check Versions | ||
run: | | ||
arm-none-eabi-gcc --version | ||
cmake --version | ||
ninja --version | ||
python --version | ||
yotta --version | ||
- name: Set up the Yotta target from GitHub | ||
run: | | ||
yotta target bbc-microbit-classic-gcc-nosd@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc-nosd | ||
yotta up | ||
- run: make all | ||
- name: Process date for artifact filename | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | ||
- name: Upload hex file | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: microbitv1-micropython-${{ steps.date.outputs.date }}-${{ github.sha }}.hex | ||
path: build/firmware.hex |