pre-commit.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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: Fetch deps
  32. run: |
  33. sudo apt update && sudo apt install libc++abi-dev libc++-dev
  34. fuzz_harness=$(ls -d test/fuzz/device/*/ test/fuzz/host/*/)
  35. for h in $fuzz_harness
  36. do
  37. make $h get-deps
  38. done
  39. - name: Build Fuzzer
  40. run: |
  41. fuzz_harness=$(ls -d test/fuzz/device/*/ test/fuzz/host/*/)
  42. for h in $fuzz_harness
  43. do
  44. make $h all
  45. done