build.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. on:
  2. push:
  3. branches: [ master, ghmq ]
  4. pull_request:
  5. merge_group:
  6. name: Build check
  7. jobs:
  8. build-riscv:
  9. strategy:
  10. matrix:
  11. # All generated code should be running on stable now, MRSV is 1.59.0
  12. toolchain: [ stable, nightly, 1.59.0 ]
  13. target:
  14. - riscv32i-unknown-none-elf
  15. - riscv32imc-unknown-none-elf
  16. - riscv32imac-unknown-none-elf
  17. - riscv64imac-unknown-none-elf
  18. - riscv64gc-unknown-none-elf
  19. cargo_flags: [ "--no-default-features", "--all-features" ]
  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@v3
  28. - uses: dtolnay/rust-toolchain@master
  29. with:
  30. toolchain: ${{ matrix.toolchain }}
  31. targets: ${{ matrix.target }}
  32. - name: Build library
  33. run: cargo build --target ${{ matrix.target }} ${{ matrix.cargo_flags }}
  34. # Job to check that all the builds succeeded
  35. build-check:
  36. needs:
  37. - build-riscv
  38. runs-on: ubuntu-latest
  39. if: always()
  40. steps:
  41. - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'