rust.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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.56.1
  20. do-style-check: false
  21. build_stable:
  22. name: build (stable)
  23. uses: ./.github/workflows/_build-rust.yml
  24. with:
  25. rust-version: stable
  26. do-style-check: false
  27. build_nightly:
  28. name: build (nightly)
  29. uses: ./.github/workflows/_build-rust.yml
  30. with:
  31. rust-version: nightly
  32. do-style-check: false
  33. features: unstable
  34. ### no-std Build #########################
  35. build_nostd_msrv:
  36. name: build no_std (msrv)
  37. needs: build_msrv
  38. uses: ./.github/workflows/_build-rust.yml
  39. with:
  40. rust-version: 1.56.1
  41. do-style-check: false
  42. rust-target: thumbv7em-none-eabihf
  43. build_nostd_stable:
  44. name: build no_std (stable)
  45. needs: build_stable
  46. uses: ./.github/workflows/_build-rust.yml
  47. with:
  48. rust-version: stable
  49. do-style-check: false
  50. rust-target: thumbv7em-none-eabihf
  51. # We perform one single run also in Windows. This should be sufficient to
  52. # check that devs can also use this on Windows.
  53. build_nostd_stable_windows:
  54. name: build no_std (stable) [Windows]
  55. uses: ./.github/workflows/_build-rust.yml
  56. with:
  57. runs-on: windows-latest
  58. # Quirk for the Windows powershell and its handling of empty arguments.
  59. features: >
  60. '""'
  61. rust-version: stable
  62. do-style-check: false
  63. rust-target: thumbv7em-none-eabihf
  64. build_nostd_nightly:
  65. name: build no_std (nightly)
  66. needs: build_nightly
  67. uses: ./.github/workflows/_build-rust.yml
  68. with:
  69. rust-version: nightly
  70. do-style-check: false
  71. rust-target: thumbv7em-none-eabihf
  72. features: unstable
  73. ### Style Checks + Doc #####################
  74. style_msrv:
  75. name: style (msrv)
  76. needs: build_msrv
  77. uses: ./.github/workflows/_build-rust.yml
  78. with:
  79. rust-version: 1.56.1
  80. do-style-check: true
  81. do-test: false
  82. style_stable:
  83. name: style (stable)
  84. needs: build_stable
  85. uses: ./.github/workflows/_build-rust.yml
  86. with:
  87. rust-version: stable
  88. do-style-check: true
  89. do-test: false
  90. style_nightly:
  91. name: style (nightly)
  92. needs: build_nightly
  93. uses: ./.github/workflows/_build-rust.yml
  94. with:
  95. rust-version: nightly
  96. do-style-check: true
  97. do-test: false
  98. features: unstable