You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.5 KiB

  1. name: CI Builds
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. schedule:
  7. - cron: '0 0,12 * * *'
  8. jobs:
  9. ci_builds:
  10. name: "CI Build"
  11. runs-on: self-hosted
  12. timeout-minutes: 1380
  13. if: github.repository == 'qmk/qmk_firmware'
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. branch: [master, develop]
  18. keymap: [default, via]
  19. container: qmkfm/qmk_cli
  20. steps:
  21. - name: Disable safe.directory check
  22. run : git config --global --add safe.directory '*'
  23. - uses: actions/checkout@v3
  24. with:
  25. submodules: recursive
  26. ref: ${{ matrix.branch }}
  27. - name: Install dependencies
  28. run: pip3 install -r requirements.txt
  29. - name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
  30. run: |
  31. export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
  32. qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes
  33. # Generate the step summary markdown
  34. ./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY
  35. # Truncate to a maximum of 1MB to deal with GitHub workflow limit
  36. truncate --size='<960K' $GITHUB_STEP_SUMMARY
  37. - name: 'Upload artifacts'
  38. uses: actions/upload-artifact@v3
  39. if: always()
  40. with:
  41. name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
  42. if-no-files-found: ignore
  43. path: |
  44. *.bin
  45. *.hex
  46. *.uf2
  47. .build/failed.*