ci_builds.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 || touch .failed
  33. # Generate the step summary markdown
  34. ./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
  35. # Truncate to a maximum of 1MB to deal with GitHub workflow limit
  36. truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
  37. # Exit with failure if the compilation stage failed
  38. [ ! -f .failed ] || exit 1
  39. - name: 'Upload artifacts'
  40. uses: actions/upload-artifact@v3
  41. if: always()
  42. with:
  43. name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
  44. if-no-files-found: ignore
  45. path: |
  46. *.bin
  47. *.hex
  48. *.uf2
  49. .build/failed.*