2023-02-02 15:27:21 -05:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2023-02-13 10:57:34 -05:00
|
|
|
- name: compile ch552 firmware
|
|
|
|
working-directory: hw/boards/mta1-usb-v1/ch552_fw
|
|
|
|
run: make
|
2023-02-02 15:27:21 -05:00
|
|
|
|
2023-02-13 10:57:34 -05:00
|
|
|
- name: make production test gateware
|
|
|
|
working-directory: hw/production_test/application_fpga_test_gateware
|
|
|
|
run: make
|
|
|
|
|
|
|
|
- name: compile firmware and testfw
|
2023-02-06 03:09:37 -05:00
|
|
|
working-directory: hw/application_fpga
|
2023-02-13 10:57:34 -05:00
|
|
|
run: make firmware.bin testfw.bin
|
2023-02-06 03:09:37 -05:00
|
|
|
|
2023-02-13 10:57:34 -05:00
|
|
|
- name: check fmt of our firmware C code
|
2023-02-02 15:27:21 -05:00
|
|
|
working-directory: hw/application_fpga
|
|
|
|
run: |
|
|
|
|
make -C fw/tk1 checkfmt
|
|
|
|
make -C fw/testfw checkfmt
|
|
|
|
|
2023-02-13 10:57:34 -05:00
|
|
|
- name: lint verilog using verilator
|
|
|
|
working-directory: hw/application_fpga
|
|
|
|
run: make lint
|
|
|
|
|
|
|
|
# doing this last as it takes long time
|
|
|
|
- name: make application FPGA gateware
|
|
|
|
working-directory: hw/application_fpga
|
|
|
|
run: make all
|
|
|
|
|
2023-02-02 15:27:21 -05:00
|
|
|
# TODO? first deal with hw/boards/ and hw/production_test/
|
|
|
|
# - name: check for SPDX tags
|
|
|
|
# run: ./LICENSES/spdx-ensure
|