1
1

ci.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: CI
  2. on:
  3. push:
  4. branches: ["master"]
  5. pull_request:
  6. branches: ["master"]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Install nasm and qemu-utils
  15. run: sudo apt-get install nasm qemu-utils
  16. - name: Cache LLVM
  17. id: cache-llvm
  18. uses: actions/cache@v3
  19. with:
  20. path: llvm
  21. key: llvm-14.0
  22. - name: Install LLVM
  23. uses: KyleMayes/install-llvm-action@v1
  24. with:
  25. version: "14.0"
  26. directory: llvm
  27. cached: ${{ steps.cache-llvm.output.cache-hit }}
  28. - name: Cache cargo crates
  29. id: cache-cargo
  30. uses: actions/cache@v3
  31. with:
  32. path: |
  33. ~/.cargo/.crates.toml
  34. ~/.cargo/.crates2.json
  35. ~/.cargo/bin/
  36. ~/.cargo/registry/index/
  37. ~/.cargo/registry/cache/
  38. ~/.cargo/git/db/
  39. key: cargo-crates
  40. - name: Configure sccache
  41. uses: visvirial/sccache-action@v1
  42. - name: Build
  43. run: cargo xtask dist --release img
  44. fmt:
  45. runs-on: ubuntu-latest
  46. steps:
  47. - uses: actions/checkout@v3
  48. - name: Check format
  49. run: cargo fmt --all --check