rust.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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]
  11. env:
  12. CARGO_TERM_COLOR: always
  13. jobs:
  14. ### Regular Build #########################
  15. build_msrv:
  16. name: build (msrv)
  17. uses: ./.github/workflows/_build-rust.yml
  18. with:
  19. rust-version: 1.68.0 # MSRV
  20. do-style-check: false
  21. features: builder
  22. build_stable:
  23. name: build (stable)
  24. uses: ./.github/workflows/_build-rust.yml
  25. with:
  26. rust-version: stable
  27. do-style-check: false
  28. features: builder
  29. build_nightly:
  30. name: build (nightly)
  31. uses: ./.github/workflows/_build-rust.yml
  32. with:
  33. rust-version: nightly
  34. do-style-check: false
  35. features: builder,unstable
  36. ### no-std Build #########################
  37. build_nostd_msrv:
  38. name: build no_std (msrv)
  39. needs: build_msrv
  40. uses: ./.github/workflows/_build-rust.yml
  41. with:
  42. rust-version: 1.68.0 # MSRV
  43. do-style-check: false
  44. rust-target: thumbv7em-none-eabihf
  45. features: builder
  46. build_nostd_stable:
  47. name: build no_std (stable)
  48. needs: build_stable
  49. uses: ./.github/workflows/_build-rust.yml
  50. with:
  51. rust-version: stable
  52. do-style-check: false
  53. rust-target: thumbv7em-none-eabihf
  54. features: builder
  55. # Also tests the build one time without the "builder" feature.
  56. build_nostd_stable_no_builder:
  57. name: build no_std (stable) [w/o builder]
  58. needs: build_stable
  59. uses: ./.github/workflows/_build-rust.yml
  60. with:
  61. rust-version: stable
  62. do-style-check: false
  63. rust-target: thumbv7em-none-eabihf
  64. # We perform one single run also in Windows. This should be sufficient to
  65. # check that devs can also use this on Windows.
  66. build_nostd_stable_windows:
  67. name: build no_std (stable) [Windows]
  68. uses: ./.github/workflows/_build-rust.yml
  69. with:
  70. runs-on: windows-latest
  71. # Quirk for the Windows powershell and its handling of empty arguments.
  72. # features: >
  73. # '""'
  74. rust-version: stable
  75. do-style-check: false
  76. rust-target: thumbv7em-none-eabihf
  77. features: builder
  78. build_nostd_nightly:
  79. name: build no_std (nightly)
  80. needs: build_nightly
  81. uses: ./.github/workflows/_build-rust.yml
  82. with:
  83. rust-version: nightly
  84. do-style-check: false
  85. rust-target: thumbv7em-none-eabihf
  86. features: builder,unstable
  87. ### Style Checks + Doc #####################
  88. style_msrv:
  89. name: style (msrv)
  90. needs: build_msrv
  91. uses: ./.github/workflows/_build-rust.yml
  92. with:
  93. rust-version: 1.68.0 # MSRV
  94. do-style-check: true
  95. do-test: false
  96. features: builder
  97. style_stable:
  98. name: style (stable)
  99. needs: build_stable
  100. uses: ./.github/workflows/_build-rust.yml
  101. with:
  102. rust-version: stable
  103. do-style-check: true
  104. do-test: false
  105. features: builder
  106. style_nightly:
  107. name: style (nightly)
  108. needs: build_nightly
  109. uses: ./.github/workflows/_build-rust.yml
  110. with:
  111. rust-version: nightly
  112. do-style-check: true
  113. do-test: false
  114. features: builder,unstable