makefile.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. name: Build Check
  2. on:
  3. push:
  4. branches: [ "master", "feat-*", "fix-*"]
  5. pull_request:
  6. branches: [ "master", "feat-*", "fix-*"]
  7. jobs:
  8. format-check:
  9. name: Format check ${{ matrix.arch }}
  10. runs-on: ubuntu-latest
  11. continue-on-error: true
  12. container: dragonos/dragonos-dev:v1.4
  13. strategy:
  14. matrix:
  15. arch: [x86_64, riscv64]
  16. steps:
  17. - run: echo "Running in dragonos/dragonos-dev:v1.4"
  18. - uses: actions/checkout@v3
  19. - name: Format check
  20. env:
  21. ARCH: ${{ matrix.arch }}
  22. HOME: /root
  23. shell: bash -ileo pipefail {0}
  24. run: |
  25. printf "\n" >> kernel/src/include/bindings/bindings.rs
  26. FMT_CHECK=1 make fmt
  27. kernel-static-test:
  28. name: Kernel static test ${{ matrix.arch }}
  29. runs-on: ubuntu-latest
  30. continue-on-error: true
  31. container: dragonos/dragonos-dev:v1.4
  32. strategy:
  33. matrix:
  34. arch: [x86_64, riscv64]
  35. steps:
  36. - run: echo "Running in dragonos/dragonos-dev:v1.4"
  37. - uses: actions/checkout@v3
  38. - name: Run kernel static test
  39. shell: bash -ileo pipefail {0}
  40. env:
  41. ARCH: ${{ matrix.arch }}
  42. HOME: /root
  43. run: bash -c "source /root/.cargo/env && cd kernel && make test"
  44. build-x86_64:
  45. runs-on: ubuntu-latest
  46. container: dragonos/dragonos-dev:v1.4
  47. steps:
  48. - run: echo "Running in dragonos/dragonos-dev:v1.4"
  49. - uses: actions/checkout@v3
  50. - name: build the DragonOS
  51. env:
  52. ARCH: x86_64
  53. HOME: /root
  54. shell: bash -ileo pipefail {0}
  55. run: |
  56. source ~/.bashrc
  57. source ~/.cargo/env
  58. export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
  59. make -j $(nproc)
  60. build-riscv64:
  61. runs-on: ubuntu-latest
  62. container: dragonos/dragonos-dev:v1.4
  63. steps:
  64. - run: echo "Running in dragonos/dragonos-dev:v1.4"
  65. - uses: actions/checkout@v3
  66. with:
  67. submodules: 'recursive'
  68. - name: build the DragonOS
  69. shell: bash -ileo pipefail {0}
  70. env:
  71. ARCH: riscv64
  72. HOME: /root
  73. run: source ~/.bashrc && source ~/.cargo/env && make kernel -j $(nproc)