Skip to content

build: use working-directory #15

build: use working-directory

build: use working-directory #15

Workflow file for this run

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: Cache Zephyr SDK
id: cache-toolchain
uses: actions/cache@v3
with:
path: zephyr-sdk
key: zephyr-sdk-v${{ env.ZEPHYR_SDK_VERSION }}
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
name: Download 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
mkdir zephyr-sdk
tar xvf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz -C zephyr-sdk --strip-components=1
- name: Setup Zephyr SDK
working-directory: zephyr-sdk
run: |
./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
- name: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('zephyr/scripts/requirements*.txt') }}
- name: Install Python packages
run: |
pip3 install -r zephyr/scripts/requirements.txt
- name: Build
run: |
west build firmware -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"bootloader/mcuboot/root-rsa-2048.pem\""