From 5a22c62df44dde9d34118b11c8afc660438ec478 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Fri, 22 Mar 2024 11:51:44 +0000 Subject: [PATCH] ci: Add macOS x86_64 and arm64 build jobs & update codal submodule. --- .github/workflows/build.yml | 33 +++++++++++++++++++-------------- lib/codal | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10bba8c..1718944 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,30 +10,35 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04] + # 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@v3 + - uses: actions/checkout@v4 with: submodules: true - - name: Install toolchain (Ubuntu) - if: runner.os == 'Linux' - run: | - sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi - sudo apt-get install -y cmake + - 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 - - name: Build - run: | - make -C lib/micropython/mpy-cross -j2 - cd src - make -j2 + python --version + uname -a + - name: Build mpy-cross + run: make -C lib/micropython/mpy-cross -j2 + - name: Build MicroPython + run: make -C src -j2 - name: Upload hex file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: MICROBIT-MICROPYTHON-${{ github.sha }}.hex + name: MICROBIT-MICROPYTHON-${{ github.sha }}-${{ matrix.os }}.hex path: src/MICROBIT.hex diff --git a/lib/codal b/lib/codal index 3864ea2..871d0fc 160000 --- a/lib/codal +++ b/lib/codal @@ -1 +1 @@ -Subproject commit 3864ea2e452f710ac3e09598996edee4df72a5bf +Subproject commit 871d0fccaf385a57f7cd2c2d61c644ec04107914