pre-commit.yml 984 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: pre-commit
  2. on:
  3. push:
  4. pull_request:
  5. branches: [ master ]
  6. concurrency:
  7. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. pre-commit:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Setup Python
  14. uses: actions/setup-python@v4
  15. with:
  16. python-version: '3.x'
  17. - name: Setup Ruby
  18. uses: ruby/setup-ruby@v1
  19. with:
  20. ruby-version: '3.0'
  21. - name: Checkout TinyUSB
  22. uses: actions/checkout@v3
  23. - name: Run codespell
  24. uses: codespell-project/actions-codespell@master
  25. - name: Run Unit Tests
  26. run: |
  27. # Install Ceedling
  28. gem install ceedling
  29. cd test/unit-test
  30. ceedling test:all
  31. - name: Build Fuzzer
  32. run: |
  33. export CC=clang
  34. export CXX=clang++
  35. fuzz_harness=$(ls -d test/fuzz/device/*/)
  36. for h in $fuzz_harness
  37. do
  38. make -C $h get-deps
  39. make -C $h all
  40. done