ci-lazer-rust.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: "Lazer Rust Test Suite"
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. paths:
  8. - .github/workflows/ci-lazer-rust.yml
  9. - lazer/**
  10. jobs:
  11. lazer-rust-test-suite:
  12. name: Lazer Rust Test Suite
  13. runs-on: ubuntu-22.04
  14. defaults:
  15. run:
  16. working-directory: lazer
  17. steps:
  18. - uses: actions/checkout@v4
  19. with:
  20. submodules: recursive
  21. - uses: actions-rust-lang/setup-rust-toolchain@v1
  22. with:
  23. toolchain: 1.82.0
  24. components: clippy,rustfmt
  25. - uses: Swatinem/rust-cache@v2
  26. with:
  27. workspaces: "lazer -> target"
  28. - name: Install Protoc
  29. uses: arduino/setup-protoc@v3
  30. with:
  31. version: "30.2"
  32. - name: Install Foundry
  33. uses: foundry-rs/foundry-toolchain@v1
  34. - name: install taplo
  35. run: cargo install --locked taplo-cli@0.9.3
  36. - name: Install Solana Cli
  37. run: |
  38. sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
  39. echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
  40. - name: check Cargo.toml formatting
  41. run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \;
  42. - name: Format check
  43. run: cargo fmt --all -- --check
  44. if: success() || failure()
  45. - name: Clippy check
  46. run: cargo clippy --all-targets -- --deny warnings
  47. if: success() || failure()
  48. - name: Build Solana programs
  49. run: cargo build-sbf
  50. if: success() || failure()
  51. - name: test
  52. run: cargo test
  53. if: success() || failure()