ci.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 -Pz 'panicked at example/src/main.rs:36:5:\npanic\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\ndropped: "string"\ncaught\npanicked at example/src/main.rs:46:5:\npanic\npanicked at example/src/main.rs:25:9:\npanic on drop\n( *\d+:.*\n)+thread panicked while processing panic\. aborting\.' run.log