ci.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. on: [push, pull_request]
  2. name: Continuous integration
  3. jobs:
  4. build:
  5. name: Check
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v2
  9. - uses: actions-rs/toolchain@v1
  10. with:
  11. profile: minimal
  12. toolchain: nightly
  13. override: true
  14. - uses: actions-rs/cargo@v1
  15. with:
  16. command: check
  17. test:
  18. name: Test
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v2
  22. - uses: actions-rs/toolchain@v1
  23. with:
  24. profile: minimal
  25. toolchain: nightly
  26. override: true
  27. - uses: actions-rs/cargo@v1
  28. env:
  29. RUSTFLAGS: -Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld
  30. RUSTDOCFLAGS: -Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld
  31. with:
  32. command: test
  33. args: --target x86_64-unknown-linux-gnu
  34. - uses: actions-rs/cargo@v1
  35. env:
  36. RUSTFLAGS: -Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld
  37. with:
  38. command: run
  39. args: --target x86_64-unknown-linux-gnu --example backtrace
  40. fmt:
  41. name: Rustfmt
  42. runs-on: ubuntu-latest
  43. steps:
  44. - uses: actions/checkout@v2
  45. - uses: actions-rs/toolchain@v1
  46. with:
  47. profile: minimal
  48. toolchain: stable
  49. override: true
  50. - run: rustup component add rustfmt
  51. - uses: actions-rs/cargo@v1
  52. with:
  53. command: fmt
  54. args: -- --check
  55. clippy:
  56. name: Clippy
  57. runs-on: ubuntu-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - uses: actions-rs/toolchain@v1
  61. with:
  62. profile: minimal
  63. toolchain: nightly
  64. override: true
  65. - run: rustup component add clippy
  66. - uses: actions-rs/cargo@v1
  67. with:
  68. command: clippy
  69. args: -- -D warnings