Add github action with basic CI that builds

Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
Daniel Lublin 2023-02-02 21:27:21 +01:00
parent b7d0698e1b
commit 9a6a790715
No known key found for this signature in database
GPG key ID: 75BD0FEB8D3E7830
6 changed files with 152 additions and 5 deletions

42
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,42 @@
name: ci
on:
push:
branches:
- 'main'
pull_request: {}
# allow manual runs:
workflow_dispatch: {}
jobs:
ci:
runs-on: ubuntu-latest
container:
image: ghcr.io/tillitis/tkey-builder:1
steps:
- name: checkout
uses: actions/checkout@v3
with:
# fetch-depth: 0
persist-credentials: false
- name: fix
# https://github.com/actions/runner-images/issues/6775
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
# make firmwares first to fail sooner
- name: make
working-directory: hw/application_fpga
run: make firmware.bin testfw.bin all
- name: check fmt of c code
working-directory: hw/application_fpga
run: |
make -C fw/tk1 checkfmt
make -C fw/testfw checkfmt
# TODO? first deal with hw/boards/ and hw/production_test/
# - name: check for SPDX tags
# run: ./LICENSES/spdx-ensure