From 1d9e41507ca45a127adfd9b5d3d57066aeef96b0 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 11 Aug 2023 23:21:48 +0100 Subject: [PATCH] workflow: add build workflow --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ca71264 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Firmware build + +on: + push: + schedule: + - cron: '0 4 * * *' + workflow_dispatch: + +defaults: + run: + shell: bash + + +jobs: + build: + runs-on: ubuntu-latest + + env: + ZEPHYR_SDK_VERSION: 0.16.1 + ZEPHYR_SDK_BASE: https://github.com/zephyrproject-rtos/sdk-ng/releases/download + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Zephyr SDK + run: | + wget --progress=dot:giga ${ZEPHYR_SDK_BASE}/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz + tar xvf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz + cd zephyr-sdk-${ZEPHYR_SDK_VERSION} + ./setup.sh -t arm-zephyr-eabi -c + + - name: Install dependencies + run: | + pip3 install west + sudo apt-get install ninja-build + + - name: Initialize + run: | + west init -l firmware + west update -o=--depth=1 -n + pip3 install -r zephyr/scripts/requirements.txt + + - name: Build + run: | + west build firmware -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"bootloader/mcuboot/root-rsa-2048.pem\""