diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/main.yml | 69 |
1 files changed, 69 insertions, 0 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 |
