summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-07 09:30:20 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-07 09:30:20 (GMT)
commit12ba849b1527fc29def977098ab5c18cb40a140d (patch)
tree1f70d14d28b1ebfa963651a94eb9bbe181c678bb
parenta4e0fdf24ef696914ad588f5a1d4a69962f4c1ef (diff)
parent3423039d35ec38010668132ae11b24b94f8c070a (diff)
Merge branch 'master' of https://github.com/daniel-thompson/wasp-os
-rw-r--r--.github/workflows/main.yml69
-rw-r--r--Makefile7
-rw-r--r--docs/install.rst2
3 files changed, 76 insertions, 2 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..5177329
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,69 @@
+name: wasp-os binary distribution
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout files
+ id: checkout-files
+ uses: actions/checkout@v2
+
+ - 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: Install packages
+ id: install-packages
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3-sphinx python3-recommonmark
+
+ - name: Update submodules
+ id: update-submodules
+ run: |
+ export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin
+ make -j `nproc` submodules
+
+ - name: Download softdevice
+ id: download-softdevice
+ run: |
+ export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin
+ make -j `nproc` softdevice
+
+ - name: Build wasp-os binary distribution
+ id: binary-distribution
+ run: |
+ export PATH=$PATH:${{ runner.temp }}/arm-none-eabi/bin
+ make -j `nproc` VERSION=${{ github.sha }} dist
+ mv ../wasp-os-${{ github.sha }}.tar.gz .
+
+ - name: Upload binaries
+ id: upload-binaries
+ uses: actions/upload-artifact@v2
+ with:
+ name: wasp-os-${{ github.sha }}
+ path: |
+ build-*
+ wasp-os-${{ github.sha }}.tar.gz
diff --git a/Makefile b/Makefile
index 984280e..470de25 100644
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,13 @@ clean :
micropython/ports/nrf/build-$(BOARD)-s132 \
wasp/boards/$(BOARD)/watch.py
+# Avoid a recursive update... it grabs far too much
submodules :
- git submodule update --init --recursive
+ git submodule update --init
+ (cd bootloader; git submodule update --init)
+ (cd micropython/ports/nrf; $(MAKE) submodules)
+ (cd reloader; git submodule update --init)
+ (cd wasp/modules/bma42x-upy; git submodule update --init)
bootloader: build-$(BOARD_SAFE)
$(RM) bootloader/_build-$(BOARD)_nrf52832//$(BOARD)_nrf52832_bootloader-*-nosd.hex
diff --git a/docs/install.rst b/docs/install.rst
index a11b654..b003141 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -20,7 +20,7 @@ following commands:
sudo apt install \
git build-essential libsdl2-2.0.0 python3-click python3-numpy \
- python3-pexpect python3-pil python3-pip python3-serial
+ python3-pexpect python3-pil python3-pip python3-serial unzip
pip3 install --user pysdl2
Additionally if you wish to regenerate the documentation you will require