debug.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. name: Debug build
  2. on:
  3. push:
  4. branches:
  5. - stable-next
  6. - main-next
  7. - dev-next
  8. paths-ignore:
  9. - '**.md'
  10. - '.github/**'
  11. - '!.github/workflows/debug.yml'
  12. pull_request:
  13. branches:
  14. - stable-next
  15. - main-next
  16. - dev-next
  17. jobs:
  18. build:
  19. name: Debug build
  20. runs-on: ubuntu-latest
  21. steps:
  22. - name: Checkout
  23. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  24. with:
  25. fetch-depth: 0
  26. - name: Setup Go
  27. uses: actions/setup-go@v5
  28. with:
  29. go-version: ^1.22
  30. continue-on-error: true
  31. - name: Run Test
  32. run: |
  33. go test -v ./...
  34. build_go118:
  35. name: Debug build (Go 1.18)
  36. runs-on: ubuntu-latest
  37. steps:
  38. - name: Checkout
  39. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  40. with:
  41. fetch-depth: 0
  42. - name: Setup Go
  43. uses: actions/setup-go@v5
  44. with:
  45. go-version: ~1.18
  46. - name: Cache go module
  47. uses: actions/cache@v4
  48. with:
  49. path: |
  50. ~/go/pkg/mod
  51. key: go118-${{ hashFiles('**/go.sum') }}
  52. - name: Run Test
  53. run: make ci_build_go118
  54. build_go120:
  55. name: Debug build (Go 1.20)
  56. runs-on: ubuntu-latest
  57. steps:
  58. - name: Checkout
  59. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  60. with:
  61. fetch-depth: 0
  62. - name: Setup Go
  63. uses: actions/setup-go@v5
  64. with:
  65. go-version: ~1.20
  66. - name: Cache go module
  67. uses: actions/cache@v4
  68. with:
  69. path: |
  70. ~/go/pkg/mod
  71. key: go120-${{ hashFiles('**/go.sum') }}
  72. - name: Run Test
  73. run: make ci_build_go120
  74. build_go121:
  75. name: Debug build (Go 1.21)
  76. runs-on: ubuntu-latest
  77. steps:
  78. - name: Checkout
  79. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  80. with:
  81. fetch-depth: 0
  82. - name: Setup Go
  83. uses: actions/setup-go@v5
  84. with:
  85. go-version: ~1.21
  86. - name: Cache go module
  87. uses: actions/cache@v4
  88. with:
  89. path: |
  90. ~/go/pkg/mod
  91. key: go121-${{ hashFiles('**/go.sum') }}
  92. - name: Run Test
  93. run: make ci_build
  94. cross:
  95. strategy:
  96. matrix:
  97. include:
  98. # windows
  99. - name: windows-amd64
  100. goos: windows
  101. goarch: amd64
  102. goamd64: v1
  103. - name: windows-amd64-v3
  104. goos: windows
  105. goarch: amd64
  106. goamd64: v3
  107. - name: windows-386
  108. goos: windows
  109. goarch: 386
  110. - name: windows-arm64
  111. goos: windows
  112. goarch: arm64
  113. - name: windows-arm32v7
  114. goos: windows
  115. goarch: arm
  116. goarm: 7
  117. # linux
  118. - name: linux-amd64
  119. goos: linux
  120. goarch: amd64
  121. goamd64: v1
  122. - name: linux-amd64-v3
  123. goos: linux
  124. goarch: amd64
  125. goamd64: v3
  126. - name: linux-386
  127. goos: linux
  128. goarch: 386
  129. - name: linux-arm64
  130. goos: linux
  131. goarch: arm64
  132. - name: linux-armv5
  133. goos: linux
  134. goarch: arm
  135. goarm: 5
  136. - name: linux-armv6
  137. goos: linux
  138. goarch: arm
  139. goarm: 6
  140. - name: linux-armv7
  141. goos: linux
  142. goarch: arm
  143. goarm: 7
  144. - name: linux-mips-softfloat
  145. goos: linux
  146. goarch: mips
  147. gomips: softfloat
  148. - name: linux-mips-hardfloat
  149. goos: linux
  150. goarch: mips
  151. gomips: hardfloat
  152. - name: linux-mipsel-softfloat
  153. goos: linux
  154. goarch: mipsle
  155. gomips: softfloat
  156. - name: linux-mipsel-hardfloat
  157. goos: linux
  158. goarch: mipsle
  159. gomips: hardfloat
  160. - name: linux-mips64
  161. goos: linux
  162. goarch: mips64
  163. - name: linux-mips64el
  164. goos: linux
  165. goarch: mips64le
  166. - name: linux-s390x
  167. goos: linux
  168. goarch: s390x
  169. # darwin
  170. - name: darwin-amd64
  171. goos: darwin
  172. goarch: amd64
  173. goamd64: v1
  174. - name: darwin-amd64-v3
  175. goos: darwin
  176. goarch: amd64
  177. goamd64: v3
  178. - name: darwin-arm64
  179. goos: darwin
  180. goarch: arm64
  181. # freebsd
  182. - name: freebsd-amd64
  183. goos: freebsd
  184. goarch: amd64
  185. goamd64: v1
  186. - name: freebsd-amd64-v3
  187. goos: freebsd
  188. goarch: amd64
  189. goamd64: v3
  190. - name: freebsd-386
  191. goos: freebsd
  192. goarch: 386
  193. - name: freebsd-arm64
  194. goos: freebsd
  195. goarch: arm64
  196. fail-fast: true
  197. runs-on: ubuntu-latest
  198. env:
  199. GOOS: ${{ matrix.goos }}
  200. GOARCH: ${{ matrix.goarch }}
  201. GOAMD64: ${{ matrix.goamd64 }}
  202. GOARM: ${{ matrix.goarm }}
  203. GOMIPS: ${{ matrix.gomips }}
  204. CGO_ENABLED: 0
  205. TAGS: with_clash_api,with_quic
  206. steps:
  207. - name: Checkout
  208. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
  209. with:
  210. fetch-depth: 0
  211. - name: Setup Go
  212. uses: actions/setup-go@v5
  213. with:
  214. go-version: ^1.21
  215. - name: Build
  216. id: build
  217. run: make