diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eef8216f..d0fc3335 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Natively on Ubuntu +name: Build Natively on: push: @@ -10,16 +10,16 @@ jobs: build-py-script: strategy: matrix: - os: [ubuntu-20.04] #, macos-11, windows-2019] - gcc: ['latest'] # '7-2017-q4' + os: [ubuntu-20.04] + gcc: ['7-2017-q4', 'latest'] cmake: ['3.6.0', ''] # Empty string installs the latest CMake release fail-fast: false runs-on: ${{ matrix.os }} name: ${{ matrix.os }}, gcc ${{ matrix.gcc }}, cmake ${{ matrix.cmake || 'latest'}} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' - name: Setup arm-none-eabi-gcc ${{ matrix.gcc }} @@ -27,7 +27,7 @@ jobs: with: release: ${{ matrix.gcc }} - name: Setup CMake ${{ matrix.cmake }} - uses: jwlawson/actions-setup-cmake@v1 + uses: jwlawson/actions-setup-cmake@v2 with: cmake-version: ${{ matrix.cmake }} - name: Install Ninja via PyPI @@ -41,34 +41,22 @@ jobs: - name: Build default project using build.py run: python build.py - name: Upload hex file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: - name: build-py-NO_BLE-${{ matrix.os }} + name: MICROBIT-${{ matrix.os }}-gcc-${{ matrix.gcc }}-cmake-${{ matrix.cmake || 'latest' }} path: MICROBIT.hex - - name: Prepare production example (BLE) + - name: Prepare BLE example run: | rm codal.json mv codal.ble.json codal.json - # python -c "import pathlib; \ - # f=pathlib.Path('source/main.cpp'); \ - # f.write_text(f.read_text().replace('out_of_box_experience()', 'ble_test()'))" - cat codal.json - - name: Build BLE project using build.py - run: python build.py --clean - - name: Upload BLE hex file - uses: actions/upload-artifact@v1 - with: - name: build-py-production-${{ matrix.os }} - path: MICROBIT.hex - - name: Prepare user example (BLE) (skip test) - run: | - python -c "import pathlib; \ + python -c "import pathlib; \ f=pathlib.Path('source/main.cpp'); \ - f.write_text(f.read_text().replace('int productiontest=1;', 'int productiontest=0;'))" + f.write_text(f.read_text().replace('out_of_box_experience()', 'ble_test()'))" + cat codal.json - name: Build BLE project using build.py run: python build.py --clean - name: Upload BLE hex file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: - name: build-py-user-${{ matrix.os }} + name: MICROBIT-BLE-${{ matrix.os }}-gcc-${{ matrix.gcc }}-cmake-${{ matrix.cmake || 'latest' }} path: MICROBIT.hex