rust.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # CI for the whole Cargo workspace. Although having two relatively independent
  2. # crates in this workspace (as they do not get released together, as for example
  3. # tokio with its sub crates), a PR for a certain CI may report errors in the
  4. # other workspace members. I think this is unfortunate. I've experimented with
  5. # CI runs per workspace member but the complexity in the end was not worth it.
  6. # Instead, it is the right thing that the CI always covers the whole repository
  7. # and that it is as stable as possible.
  8. name: "Cargo workspace"
  9. # Run on every push (tag, branch) and pull_request
  10. on: [ pull_request, push, workflow_dispatch, merge_group ]
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  13. cancel-in-progress: true
  14. env:
  15. CARGO_TERM_COLOR: always
  16. jobs:
  17. ### Regular Build #########################
  18. build_msrv:
  19. name: build (msrv)
  20. uses: ./.github/workflows/_build-rust.yml
  21. with:
  22. rust-version: 1.70.0 # MSRV
  23. do-style-check: false
  24. features: builder
  25. build_stable:
  26. name: build (stable)
  27. uses: ./.github/workflows/_build-rust.yml
  28. with:
  29. rust-version: stable
  30. do-style-check: false
  31. features: builder
  32. build_nightly:
  33. name: build (nightly)
  34. uses: ./.github/workflows/_build-rust.yml
  35. with:
  36. rust-version: nightly
  37. do-style-check: false
  38. features: builder,unstable
  39. ### no-std Build #########################
  40. build_nostd_msrv:
  41. name: build no_std (msrv)
  42. needs: build_msrv
  43. uses: ./.github/workflows/_build-rust.yml
  44. with:
  45. rust-version: 1.70.0 # MSRV
  46. do-style-check: false
  47. rust-target: thumbv7em-none-eabihf
  48. features: builder
  49. build_nostd_stable:
  50. name: build no_std (stable)
  51. needs: build_stable
  52. uses: ./.github/workflows/_build-rust.yml
  53. with:
  54. rust-version: stable
  55. do-style-check: false
  56. rust-target: thumbv7em-none-eabihf
  57. features: builder
  58. # Also tests the build one time without the "builder" feature.
  59. build_nostd_stable_no_builder:
  60. name: build no_std (stable) [w/o builder]
  61. needs: build_stable
  62. uses: ./.github/workflows/_build-rust.yml
  63. with:
  64. rust-version: stable
  65. do-style-check: false
  66. rust-target: thumbv7em-none-eabihf
  67. # We perform one single run also in Windows. This should be sufficient to
  68. # check that devs can also use this on Windows.
  69. build_nostd_stable_windows:
  70. name: build no_std (stable) [Windows]
  71. needs: build_stable
  72. uses: ./.github/workflows/_build-rust.yml
  73. with:
  74. runs-on: windows-latest
  75. # Quirk for the Windows powershell and its handling of empty arguments.
  76. # features: >
  77. # '""'
  78. rust-version: stable
  79. do-style-check: false
  80. rust-target: thumbv7em-none-eabihf
  81. features: builder
  82. build_nostd_nightly:
  83. name: build no_std (nightly)
  84. needs: build_nightly
  85. uses: ./.github/workflows/_build-rust.yml
  86. with:
  87. rust-version: nightly
  88. do-style-check: false
  89. rust-target: thumbv7em-none-eabihf
  90. features: builder,unstable
  91. ### Style Checks + Doc #####################
  92. style_msrv:
  93. name: style (msrv)
  94. needs: build_msrv
  95. uses: ./.github/workflows/_build-rust.yml
  96. with:
  97. rust-version: 1.70.0 # MSRV
  98. do-style-check: true
  99. do-test: false
  100. features: builder
  101. style_stable:
  102. name: style (stable)
  103. needs: build_stable
  104. uses: ./.github/workflows/_build-rust.yml
  105. with:
  106. rust-version: stable
  107. do-style-check: true
  108. do-test: false
  109. features: builder
  110. style_nightly:
  111. name: style (nightly)
  112. needs: build_nightly
  113. uses: ./.github/workflows/_build-rust.yml
  114. with:
  115. rust-version: nightly
  116. do-style-check: true
  117. do-test: false
  118. features: builder,unstable
  119. miri:
  120. name: tests with miri (nightly)
  121. needs: build_nightly
  122. uses: ./.github/workflows/_build-rust.yml
  123. with:
  124. rust-version: nightly
  125. do-style-check: false
  126. do-test: false
  127. do-miri: true
  128. features: builder,unstable