diff options
| author | Panagiotis Vasilopoulos <hello@alwayslivid.com> | 2020-08-05 13:20:06 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel.thompson@linaro.org> | 2020-11-06 21:38:58 (GMT) |
| commit | 5bb833aa28f0445413cd8f240e832cfb17f29754 (patch) | |
| tree | 6d41cc5c88b69632c119c23321a8a78e4f750108 /.github | |
| parent | 37f8a47220337d8f9cd1230703200c6e6ea7a515 (diff) | |
Added GitHub Actions support
- This workflow caches both the Python modules, as well as the arm-none-eabi toolchain itself, in order to save resources and time.
- This workflow is meant to imitate the building instructions as closely as possible for every board.
After the workflow compiles wasp-os for a specific board, it will package the following in separate archives (per board):
- the reloader
- the bootloader (both the standalone and the DaFlasher variations)
- a copy of MicroPython
- a copy of the documentation
- the additional tools that are necessary for interacting with devices running on wasp-os
Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/main.yml | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6a1b962 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,86 @@ +name: CI for wasp-os + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + board: [pinetime, p8] + + runs-on: ubuntu-latest + + steps: + - name: Checkout files + id: checkout-files + uses: actions/checkout@v2 + + - name: Check cached Python modules + id: cache-pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Check the cached arm-none-eabi-gcc compiler + id: cache-toolchain + uses: actions/cache@v2 + env: + cache-name: cache-toolchain + with: + path: ${{ runner.temp }}/arm-none-eabi + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: ${{ runner.os }}-build-${{ env.cache-name }} + + - name: Install arm-none-eabi-gcc + id: install-toolchain + # installs arm-none-eabi if the CI environment can't find it in the cache + if: steps.cache-toolchain.outputs.cache-hit != 'true' + uses: fiam/arm-none-eabi-gcc@v1.0.2 + with: + release: 9-2019-q4 + directory: ${{ runner.temp }}/arm-none-eabi + + - name: Make submodules + id: make-submodules + run: | + export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin + make -j BOARD=${{ matrix.board }} submodules + + - name: Make softdevice + id: make-softdevice + run: | + export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin + make -j BOARD=${{ matrix.board }} softdevice + + - name: Build firmware + id: make-firmware + run: | + export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin + make -j BOARD=${{ matrix.board }} all + + - name: Create archive + id: create-archive + run: | + tar -cJf wasp-os-${{ github.sha }}-${{ matrix.board }}.tar.gz \ + build-${{ matrix.board }} \ + COPYING \ + COPYING.LGPL \ + README.rst \ + TODO.rst \ + tools \ + docs + + - name: Upload build + id: upload-firmware + uses: actions/upload-artifact@v2 + with: + name: wasp-os-${{ github.sha }}-${{ matrix.board }}.tar.gz + path: wasp-os-${{ github.sha }}-${{ matrix.board }}.tar.gz + |
