Skip to content

firmware: Fix C&PI's configuration so that it properly inverts the pu… #185

firmware: Fix C&PI's configuration so that it properly inverts the pu…

firmware: Fix C&PI's configuration so that it properly inverts the pu… #185

Workflow file for this run

name: Firmware
on:
pull_request:
push:
branches:
- main
- v2
jobs:
lint:
name: Lint firmware code
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq eatmydata
sudo eatmydata apt-get install -qq ninja-build clang-tidy clang-format libasound2-dev
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Versions
run: |
ninja --version
python3 --version
clang-format --version
clang-tidy --version
- name: Checkout code
uses: actions/checkout@v2
- name: Install firmware/requirements.txt
run: |
python3 -m pip install wheel
python3 -m pip install -r firmware/requirements.txt
- name: Run format and error if anything changes
run: |
cd firmware
python3 configure.py --skip-checks --no-generators --enable-tidy
ninja format
git diff --color --exit-code src
- name: Run tidy
run: |
cd firmware
clang-tidy -dump-config
ninja tidy
build:
name: Build firmware code
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq eatmydata
sudo eatmydata apt-get install -qq ninja-build wget libasound2-dev
- name: Install ARM embedded toolchain
# TODO: Put this file on static.winterbloom.com
run: |
wget --no-verbose https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Versions
run: |
ninja --version
python3 --version
arm-none-eabi-gcc --version
- name: Checkout code
uses: actions/checkout@v2
# Required so that build_info.mk can properly construct a buildinfo
# string.
with:
fetch-depth: 0
- name: Install firmware/requirements.txt
run: |
python3 -m pip install wheel
python3 -m pip install -r firmware/requirements.txt
- name: Run build
run: |
cd firmware
python3 configure.py --no-format
ninja
- uses: actions/upload-artifact@v2
with:
name: gemini-firmware.elf
path: firmware/build/gemini-firmware.elf
if-no-files-found: error
test:
name: Run tests
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq eatmydata
sudo eatmydata apt-get install -qq ninja-build wget clang clang-tools libasound2-dev
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Versions
run: |
ninja --version
python3 --version
gcc --version
- name: Checkout code
uses: actions/checkout@v2
- name: Install firmware/requirements.txt
run: |
python3 -m pip install wheel
python3 -m pip install -r firmware/requirements.txt
- name: Build test runner
run: |
cd firmware/tests
python3 configure.py
ninja
- name: Run tests
run: |
cd firmware/tests
build/gemini-firmware-test