ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: CI
  2. on: [push, pull_request]
  3. env:
  4. CARGO_TERM_COLOR: always
  5. jobs:
  6. test:
  7. strategy:
  8. matrix:
  9. target:
  10. - x86_64-unknown-linux-gnu
  11. - i686-unknown-linux-gnu
  12. - aarch64-unknown-linux-gnu
  13. - riscv64gc-unknown-linux-gnu
  14. - riscv32gc-unknown-linux-gnu
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. - name: Install Rust
  19. run: |
  20. rustup update nightly
  21. rustup default nightly
  22. - name: Install cross-compilation tools
  23. uses: taiki-e/setup-cross-toolchain-action@v1
  24. with:
  25. target: ${{ matrix.target }}
  26. - name: Build example binary
  27. run: cargo build --release $BUILD_STD
  28. - name: Run example binary
  29. run: (cargo run --release $BUILD_STD 2>&1 | tee ../run.log) || true
  30. working-directory: example
  31. - name: Check log
  32. run: |
  33. grep "panicked at 'panic', example/src/main.rs:36:5" run.log
  34. grep 'note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace' run.log
  35. grep 'dropped: "string"' run.log
  36. grep 'caught' run.log
  37. grep "panicked at 'panic', example/src/main.rs:46:5" run.log
  38. grep "panicked at 'panic on drop', example/src/main.rs:25:9" run.log
  39. grep "thread panicked while processing panic. aborting." run.log