downstream-project-spl.yml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. name: Downstream Project - SPL
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - v[0-9]+.[0-9]+
  7. pull_request:
  8. branches:
  9. - master
  10. - v[0-9]+.[0-9]+
  11. paths:
  12. - "**.rs"
  13. - "rust-toolchain.toml"
  14. - "Cargo.toml"
  15. - "Cargo.lock"
  16. - "platform-tools-sdk/cargo-build-sbf"
  17. - "platform-tools-sdk/cargo-test-sbf"
  18. - "ci/downstream-projects/run-spl.sh"
  19. - ".github/workflows/downstream-project-spl.yml"
  20. - ".github/scripts/downstream-project-spl-common.sh"
  21. - ".github/scripts/downstream-project-spl-install-deps.sh"
  22. workflow_call:
  23. inputs:
  24. branch:
  25. required: false
  26. type: string
  27. default: "master"
  28. concurrency:
  29. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  30. cancel-in-progress: true
  31. env:
  32. SHELL: /bin/bash
  33. SCCACHE_GHA_ENABLED: "true"
  34. RUSTC_WRAPPER: "sccache"
  35. jobs:
  36. check:
  37. #if: github.repository == 'anza-xyz/agave'
  38. if: false
  39. runs-on: ubuntu-latest
  40. timeout-minutes: 60
  41. strategy:
  42. matrix:
  43. programs:
  44. - associated-token-account
  45. - feature-proposal
  46. - instruction-padding
  47. - memo
  48. - record
  49. - single-pool
  50. - slashing
  51. - stake-pool
  52. - token-2022
  53. # re-enable with https://github.com/buffalojoec/mollusk/pull/74
  54. # - token
  55. steps:
  56. - uses: actions/checkout@v6
  57. - shell: bash
  58. run: |
  59. .github/scripts/purge-ubuntu-runner.sh
  60. - uses: mozilla-actions/sccache-action@v0.0.9
  61. with:
  62. version: "v0.10.0"
  63. - shell: bash
  64. run: |
  65. source .github/scripts/downstream-project-spl-install-deps.sh
  66. source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
  67. if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
  68. exit 0
  69. fi
  70. cargo check
  71. test_cli:
  72. #if: github.repository == 'anza-xyz/agave'
  73. if: false
  74. runs-on: ubuntu-latest
  75. timeout-minutes: 60
  76. strategy:
  77. matrix:
  78. programs:
  79. - single-pool
  80. - token-2022
  81. steps:
  82. - uses: actions/checkout@v6
  83. - shell: bash
  84. run: |
  85. .github/scripts/purge-ubuntu-runner.sh
  86. - uses: mozilla-actions/sccache-action@v0.0.9
  87. with:
  88. version: "v0.10.0"
  89. - shell: bash
  90. run: |
  91. source .github/scripts/downstream-project-spl-install-deps.sh
  92. source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
  93. if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
  94. exit 0
  95. fi
  96. $CARGO_BUILD_SBF --manifest-path program/Cargo.toml
  97. cargo test --manifest-path clients/cli/Cargo.toml
  98. cargo-test-sbf:
  99. #if: github.repository == 'anza-xyz/agave'
  100. if: false
  101. runs-on: ubuntu-latest
  102. timeout-minutes: 60
  103. strategy:
  104. matrix:
  105. programs:
  106. - associated-token-account
  107. - feature-proposal
  108. - instruction-padding
  109. - memo
  110. - record
  111. - single-pool
  112. - slashing
  113. - stake-pool
  114. - token-2022
  115. # re-enable with https://github.com/buffalojoec/mollusk/pull/74
  116. # - token
  117. steps:
  118. - uses: actions/checkout@v6
  119. - shell: bash
  120. run: |
  121. .github/scripts/purge-ubuntu-runner.sh
  122. - uses: mozilla-actions/sccache-action@v0.0.9
  123. with:
  124. version: "v0.10.0"
  125. - name: Install dependencies
  126. shell: bash
  127. run: |
  128. source .github/scripts/downstream-project-spl-install-deps.sh
  129. source .github/scripts/downstream-project-spl-common.sh "${{ matrix.programs }}"
  130. if [ -n "$SKIP_SPL_DOWNSTREAM_PROJECT_TEST" ]; then
  131. exit 0
  132. fi
  133. - name: Test SBPFv0
  134. shell: bash
  135. run: |
  136. source ci/downstream-projects/common.sh
  137. cd "${{ matrix.programs }}"
  138. $CARGO_BUILD_SBF --arch v0 --manifest-path program/Cargo.toml
  139. RUSTFLAGS="-Awarnings" SBF_OUT_DIR="../target/deploy" cargo test --features test-sbf --manifest-path program/Cargo.toml
  140. - name: Test SBPFv1
  141. shell: bash
  142. run: |
  143. source ci/downstream-projects/common.sh
  144. cd "${{ matrix.programs }}"
  145. rm -rf target/deploy target/sbpf*
  146. $CARGO_BUILD_SBF --arch v1 --manifest-path program/Cargo.toml
  147. RUSTFLAGS="-Awarnings" SBF_OUT_DIR="../target/deploy" cargo test --features test-sbf --manifest-path program/Cargo.toml
  148. - name: Test SBPFv2
  149. shell: bash
  150. run: |
  151. source ci/downstream-projects/common.sh
  152. cd "${{ matrix.programs }}"
  153. rm -rf target/deploy target/sbpf*
  154. $CARGO_BUILD_SBF --arch v2 --manifest-path program/Cargo.toml
  155. RUSTFLAGS="-Awarnings" SBF_OUT_DIR="../target/deploy" cargo test --features test-sbf --manifest-path program/Cargo.toml