ci.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. on:
  2. push:
  3. branches: [ staging, trying, master ]
  4. pull_request:
  5. name: Continuous integration
  6. jobs:
  7. ci-linux:
  8. runs-on: ubuntu-20.04
  9. continue-on-error: ${{ matrix.experimental || false }}
  10. strategy:
  11. matrix:
  12. # All generated code should be running on stable now, MRSV is 1.59.0
  13. rust: [nightly, stable, 1.59.0]
  14. include:
  15. # Nightly is only for reference and allowed to fail
  16. - rust: nightly
  17. experimental: true
  18. steps:
  19. - uses: actions/checkout@v2
  20. - uses: actions-rs/toolchain@v1
  21. with:
  22. profile: minimal
  23. toolchain: ${{ matrix.rust }}
  24. override: true
  25. - name: Install all Rust targets for ${{ matrix.rust }}
  26. run: rustup target install --toolchain=${{ matrix.rust }} x86_64-unknown-linux-gnu riscv32imac-unknown-none-elf riscv64imac-unknown-none-elf riscv64gc-unknown-none-elf
  27. - name: Install riscv gcc
  28. run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf
  29. - name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
  30. run: cargo check --target x86_64-unknown-linux-gnu
  31. - name: Run CI script for riscv32imac-unknown-none-elf under ${{ matrix.rust }}
  32. run: cargo check --target riscv32imac-unknown-none-elf
  33. - name: Run CI script for riscv64imac-unknown-none-elf under ${{ matrix.rust }}
  34. run: cargo check --target riscv64imac-unknown-none-elf
  35. - name: Run CI script for riscv64gc-unknown-none-elf under ${{ matrix.rust }}
  36. run: cargo check --target riscv64gc-unknown-none-elf
  37. - name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }} with critical-section-single-hart
  38. run: cargo check --target x86_64-unknown-linux-gnu --features critical-section-single-hart
  39. - name: Run CI script for riscv32imac-unknown-none-elf under ${{ matrix.rust }} with critical-section-single-hart
  40. run: cargo check --target riscv32imac-unknown-none-elf --features critical-section-single-hart
  41. - name: Run CI script for riscv64imac-unknown-none-elf under ${{ matrix.rust }} with critical-section-single-hart
  42. run: cargo check --target riscv64imac-unknown-none-elf --features critical-section-single-hart
  43. - name: Run CI script for riscv64gc-unknown-none-elf under ${{ matrix.rust }} with critical-section-single-hart
  44. run: cargo check --target riscv64gc-unknown-none-elf --features critical-section-single-hart
  45. # On macOS and Windows, we at least make sure that the crate builds and links.
  46. build-other:
  47. strategy:
  48. matrix:
  49. os:
  50. - macOS-latest
  51. - windows-latest
  52. runs-on: ${{ matrix.os }}
  53. steps:
  54. - uses: actions/checkout@v2
  55. - uses: actions-rs/toolchain@v1
  56. with:
  57. profile: minimal
  58. toolchain: stable
  59. override: true
  60. - name: Build crate for host OS
  61. run: cargo build --features critical-section-single-hart