forked from arduino/ArduinoCore-mbed
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.44 KB
/
build-cores.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build Mbed CE Arduino Cores
on:
pull_request:
push:
branches:
- main
jobs:
build_cores:
strategy:
matrix:
mbed_target:
- ARDUINO_NANO33BLE
- RASPBERRY_PI_PICO
cmake_build_type:
- Debug
- Release
runs-on: ubuntu-latest
container: ghcr.io/armmbed/mbed-os-env:master-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Python Dependencies
run: |
# Note: The Mbed container is too old to have python3-json5, but it's old enough that we can
# still install python packages globally.
# On newer Ubuntu versions, you would instead use:
# apt-get update
# xargs apt-get install -y < mbed-os/tools/requirements.apt.txt
python3 -m pip install -r mbed-os/tools/requirements.txt
- name: Build
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DMBED_TARGET=${{ matrix.mbed_target }} -DUPLOAD_METHOD=NONE -DCMAKE_INSTALL_PREFIX=$(pwd)/../install
ninja
ninja package
- name: Archive Core Artifact
uses: actions/upload-artifact@v4
with:
name: Arduino Core ${{ matrix.mbed_target }} ${{ matrix.cmake_build_type }} (Zip)
path: build/ArduinoCore-mbed-ce-*.zip