chore: use published light-sdks crates instead of git deps (#35) #229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| SOLANA_CLI_VERSION: "4.0.0-rc.0" | |
| RUST_TOOLCHAIN: "1.91.0" | |
| jobs: | |
| test-rust: | |
| name: ${{ matrix.package && format('{0}/{1}', matrix.example, matrix.package) || matrix.example }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: | |
| - create-and-update | |
| - counter/native | |
| - counter/pinocchio | |
| - account-comparison | |
| - airdrop-implementations/simple-claim/program | |
| include: | |
| - example: basic-operations/native | |
| package: native-program-burn | |
| - example: basic-operations/native | |
| package: native-program-create | |
| - example: basic-operations/native | |
| package: native-program-update | |
| - example: basic-operations/native | |
| package: native-program-close | |
| - example: basic-operations/native | |
| package: native-program-reinit | |
| # litesvm-based tests load program .so files from the Light CLI's bin | |
| # dir; the 0.28.x CLI relocated them, so pin these to the 0.27.x CLI. | |
| - example: counter/pinocchio | |
| light-cli-version: "0.27.1-alpha.2" | |
| - example: airdrop-implementations/simple-claim/program | |
| light-cli-version: "0.27.1-alpha.2" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup environment | |
| uses: ./.github/actions/setup | |
| with: | |
| example: ${{ matrix.example }} | |
| solana-cli-version: ${{ env.SOLANA_CLI_VERSION }} | |
| rust-toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| photon-indexer: "true" | |
| light-cli-version: ${{ matrix.light-cli-version || '0.28.4' }} | |
| - name: Build and test | |
| working-directory: ${{ matrix.example }} | |
| run: | | |
| # --test-threads=1: each test spawns its own `light test-validator`; | |
| # running them in parallel collides on validator/indexer/prover ports. | |
| if [ -n "${{ matrix.package }}" ]; then | |
| cargo test-sbf -p ${{ matrix.package }} -- --test-threads=1 | |
| else | |
| cargo test-sbf -- --test-threads=1 | |
| fi |