makefile.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.7
  13. strategy:
  14. matrix:
  15. arch: [x86_64, riscv64]
  16. steps:
  17. - run: echo "Running in dragonos/dragonos-dev:v1.7"
  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. sed -i 's/arch = ".*"/arch = "${{ matrix.arch }}"/' dadk-manifest.toml
  27. FMT_CHECK=1 make fmt
  28. kernel-static-test:
  29. name: Kernel static test ${{ matrix.arch }}
  30. runs-on: ubuntu-latest
  31. continue-on-error: true
  32. container: dragonos/dragonos-dev:v1.7
  33. strategy:
  34. matrix:
  35. arch: [x86_64, riscv64]
  36. steps:
  37. - run: echo "Running in dragonos/dragonos-dev:v1.7"
  38. - uses: actions/checkout@v3
  39. - name: Run kernel static test
  40. shell: bash -ileo pipefail {0}
  41. env:
  42. ARCH: ${{ matrix.arch }}
  43. HOME: /root
  44. run: bash -c "source /root/.cargo/env && cd kernel && make test && make test-rbpf"
  45. build-x86_64:
  46. runs-on: ubuntu-latest
  47. container: dragonos/dragonos-dev:v1.7
  48. steps:
  49. - run: echo "Running in dragonos/dragonos-dev:v1.7"
  50. - uses: actions/checkout@v3
  51. - name: build the DragonOS
  52. env:
  53. ARCH: x86_64
  54. HOME: /root
  55. shell: bash -ileo pipefail {0}
  56. run: |
  57. source ~/.bashrc
  58. source ~/.cargo/env
  59. export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
  60. sed -i 's/arch = ".*"/arch = "${{ env.ARCH }}"/' dadk-manifest.toml
  61. make all -j $(nproc)
  62. build-riscv64:
  63. runs-on: ubuntu-latest
  64. container: dragonos/dragonos-dev:v1.7
  65. steps:
  66. - run: echo "Running in dragonos/dragonos-dev:v1.7"
  67. - uses: actions/checkout@v3
  68. with:
  69. submodules: "recursive"
  70. - name: build the DragonOS
  71. shell: bash -ileo pipefail {0}
  72. env:
  73. ARCH: riscv64
  74. HOME: /root
  75. run: |
  76. source ~/.bashrc && source ~/.cargo/env
  77. sed -i 's/arch = ".*"/arch = "${{ env.ARCH }}"/' dadk-manifest.toml
  78. make kernel -j $(nproc)