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\""