mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-12-20 13:24:24 -05:00
b0efcf019e
- Exclude splint from CI, so we make another target for it "splint", which we might include in the "check" target later. - Move the analysis runs earlier in CI so they, including indentation checks, fail first. - Include printouts of hashen in check-binary-hashes to easier see what the digest are if it fails in CI.
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
|
|
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:4
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
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"
|
|
|
|
- name: check indentation of our firmware C code
|
|
working-directory: hw/application_fpga
|
|
run: |
|
|
make -C fw/tk1 checkfmt
|
|
make -C fw/testfw checkfmt
|
|
|
|
- name: run static analysis on firmware C code
|
|
working-directory: hw/application_fpga
|
|
run: |
|
|
make check
|
|
|
|
- name: lint verilog using verilator
|
|
working-directory: hw/application_fpga
|
|
run: make lint
|
|
|
|
- name: compile ch552 firmware
|
|
working-directory: hw/boards/mta1-usb-v1/ch552_fw
|
|
run: make
|
|
|
|
- name: make production test gateware
|
|
working-directory: hw/production_test/application_fpga_test_gateware
|
|
run: make
|
|
|
|
- name: compile firmware and testfw
|
|
working-directory: hw/application_fpga
|
|
run: make firmware.bin testfw.bin
|
|
|
|
# doing this last as it takes long time
|
|
- name: make application FPGA gateware
|
|
working-directory: hw/application_fpga
|
|
run: make all
|
|
|
|
- name: check matching hashes for firmware.bin & application_fpga.bin
|
|
working-directory: hw/application_fpga
|
|
run: make check-binary-hashes
|
|
|
|
# TODO? first deal with hw/boards/ and hw/production_test/
|
|
# - name: check for SPDX tags
|
|
# run: ./LICENSES/spdx-ensure
|