makefile.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: CI for DragonOS
  2. on:
  3. push:
  4. branches: ["master", "feat-*", "fix-*"]
  5. pull_request:
  6. branches: ["master", "feat-*", "fix-*"]
  7. jobs:
  8. ci:
  9. strategy:
  10. matrix:
  11. arch: [riscv64, x86_64]
  12. runs-on: ubuntu-latest
  13. env:
  14. ARCH: ${{ matrix.arch }}
  15. HOME: /root
  16. container:
  17. image: ghcr.io/samuka007/dragonos-oscomp-ci-docker:pre-2025-03-21
  18. options: --privileged
  19. defaults:
  20. run:
  21. shell: bash -ileo pipefail {0}
  22. steps:
  23. - uses: actions/checkout@v3
  24. with:
  25. submodules: "recursive"
  26. - name: Change source
  27. run: |
  28. find . -type f \( -name "*.toml" -o -name "Makefile" \) -exec sed -i 's/git\.mirrors\.dragonos\.org\.cn/github\.com/g' {} +
  29. - name: build kernel
  30. run: |
  31. make ci-kernel
  32. - name: build userland
  33. if: matrix.arch != 'x86_64'
  34. run: |
  35. make ci-user
  36. - name: generate the disk image
  37. if: matrix.arch != 'x86_64'
  38. run: |
  39. make ci-gendisk
  40. - name: boot test
  41. if: matrix.arch != 'x86_64'
  42. timeout-minutes: 3
  43. run: |
  44. cd oscomp && bash ci-boot-test.sh
  45. - name: Format check
  46. run: |
  47. FMT_CHECK=1 make fmt