Skip to content

Commit fbf0652

Browse files
microbit-carlosdpgeorge
authored andcommitted
ci: Add macOS x86_64 and arm64 build jobs & update codal submodule.
Updating the codal submodule fixes issue #172, building on Apple Silicon.
1 parent c36fd82 commit fbf0652

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,35 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
os: [ubuntu-20.04]
13+
# macos-13 is x86_64, and macos-14 is arm64
14+
os: [ubuntu-22.04, macos-13, macos-14]
1415
fail-fast: false
1516
runs-on: ${{ matrix.os }}
1617
name: build.py ${{ matrix.os }}
1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1920
with:
2021
submodules: true
21-
- name: Install toolchain (Ubuntu)
22-
if: runner.os == 'Linux'
23-
run: |
24-
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi
25-
sudo apt-get install -y cmake
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.11'
25+
- uses: carlosperate/arm-none-eabi-gcc-action@v1
26+
with:
27+
release: 10.3-2021.10
28+
- name: Install CMake v3.22 via PyPI
29+
run: python -m pip install cmake==3.28.3
2630
- name: Check Versions
2731
run: |
2832
arm-none-eabi-gcc --version
2933
cmake --version
30-
- name: Build
31-
run: |
32-
make -C lib/micropython/mpy-cross -j2
33-
cd src
34-
make -j2
34+
python --version
35+
uname -a
36+
- name: Build mpy-cross
37+
run: make -C lib/micropython/mpy-cross -j2
38+
- name: Build MicroPython
39+
run: make -C src -j2
3540
- name: Upload hex file
36-
uses: actions/upload-artifact@v3
41+
uses: actions/upload-artifact@v4
3742
with:
38-
name: MICROBIT-MICROPYTHON-${{ github.sha }}.hex
43+
name: MICROBIT-MICROPYTHON-${{ github.sha }}-${{ matrix.os }}.hex
3944
path: src/MICROBIT.hex

lib/codal

0 commit comments

Comments
 (0)