Sets up a simple lint & build CI with GitHub Actions
This commit is contained in:
parent
e54449bf84
commit
d518945da4
4 changed files with 45 additions and 0 deletions
13
.github/actions/build/Dockerfile
vendored
Normal file
13
.github/actions/build/Dockerfile
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM debian:stable-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install wget tar unzip make clang-format gcc-arm-none-eabi
|
||||
|
||||
RUN cd /opt && \
|
||||
wget https://www.nordicsemi.com/-/media/Software-and-other-downloads/SDKs/nRF5/Binaries/nRF5SDK1702d674dde.zip -O nRF5_SDK.zip && \
|
||||
unzip nRF5_SDK.zip && \
|
||||
mv nRF5_SDK_17.0.2_d674dde nRF5_SDK
|
||||
|
||||
COPY build.sh /build.sh
|
||||
|
||||
ENTRYPOINT ["/build.sh"]
|
||||
5
.github/actions/build/action.yml
vendored
Normal file
5
.github/actions/build/action.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
name: 'Build'
|
||||
description: 'Builds b-parasite firmware'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
10
.github/actions/build/build.sh
vendored
Executable file
10
.github/actions/build/build.sh
vendored
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
|
||||
export SDK_ROOT=/opt/nRF5_SDK
|
||||
export GNU_INSTALL_ROOT=/usr/bin/
|
||||
|
||||
cd "$GITHUB_WORKSPACE/code/b-parasite"
|
||||
make clean
|
||||
make lint
|
||||
make
|
||||
17
.github/workflows/b-parasite.yml
vendored
Normal file
17
.github/workflows/b-parasite.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
name: b-parasite firmware build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Checks format & builds b-parasite's firmware
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
uses: ./.github/actions/build
|
||||
Loading…
Add table
Reference in a new issue