riscv-semihosting.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. on:
  2. push:
  3. branches: [ master, semihosting ]
  4. pull_request:
  5. merge_group:
  6. name: Build check (riscv-semihosting)
  7. jobs:
  8. # We check that the crate builds and links for all the toolchains and targets.
  9. build-riscv:
  10. strategy:
  11. matrix:
  12. # All generated code should be running on stable now, MRSV is 1.60.0
  13. toolchain: [ stable, nightly, 1.60.0 ]
  14. target:
  15. - riscv32i-unknown-none-elf
  16. - riscv32imc-unknown-none-elf
  17. - riscv32imac-unknown-none-elf
  18. - riscv64imac-unknown-none-elf
  19. - riscv64gc-unknown-none-elf
  20. include:
  21. # Nightly is only for reference and allowed to fail
  22. - toolchain: nightly
  23. experimental: true
  24. runs-on: ubuntu-latest
  25. continue-on-error: ${{ matrix.experimental || false }}
  26. steps:
  27. - uses: actions/checkout@v4
  28. - uses: dtolnay/rust-toolchain@master
  29. with:
  30. toolchain: ${{ matrix.toolchain }}
  31. targets: ${{ matrix.target }}
  32. - name: Build (M-mode)
  33. run: cargo build --package riscv-semihosting --target ${{ matrix.target }} --features machine-mode
  34. - name: Build (U-mode)
  35. run: cargo build --package riscv-semihosting --target ${{ matrix.target }} --features=user-mode
  36. # Job to check that all the builds succeeded
  37. build-check:
  38. needs:
  39. - build-riscv
  40. runs-on: ubuntu-latest
  41. if: always()
  42. steps:
  43. - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'