Release 0.2.2 #91
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: Zap-Program | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release_* | |
| env: | |
| SOLANA_CLI_VERSION: 2.1.0 | |
| NODE_VERSION: 22.15.0 | |
| ANCHOR_CLI_VERSION: 0.31.1 | |
| TOOLCHAIN: 1.85.0 | |
| jobs: | |
| program_changed_files: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| program: ${{steps.changed-files-specific.outputs.any_changed}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get specific changed files | |
| id: changed-files-specific | |
| uses: tj-actions/changed-files@v18.6 | |
| with: | |
| files: | | |
| programs/zap | |
| protocol-zap | |
| zap-sdk | |
| anchor_build: | |
| runs-on: ubuntu-latest | |
| needs: program_changed_files | |
| if: needs.program_changed_files.outputs.program == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-solana | |
| - uses: ./.github/actions/setup-dep | |
| - uses: ./.github/actions/setup-anchor | |
| # Cache rust, cargo | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-targets: "true" | |
| cache-on-failure: true | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.anchor | |
| key: anchor-${{ runner.os }}-${{ hashFiles('Anchor.toml') }} | |
| - run: anchor build | |
| shell: bash | |
| unit_test: | |
| runs-on: ubuntu-latest | |
| needs: program_changed_files | |
| if: needs.program_changed_files.outputs.program == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN }} | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --package zap | |
| shell: bash | |
| - run: cargo test --package protocol-zap | |
| shell: bash | |
| integration_test: | |
| runs-on: ubuntu-latest | |
| needs: program_changed_files | |
| if: needs.program_changed_files.outputs.program == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-solana | |
| - uses: ./.github/actions/setup-dep | |
| - uses: ./.github/actions/setup-anchor | |
| # Install pnpm | |
| - uses: pnpm/action-setup@v4 # docs https://pnpm.io/continuous-integration#github-actions | |
| # Install rust + toolchain | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN }} | |
| components: clippy | |
| # Cache rust, cargo | |
| - uses: Swatinem/rust-cache@v2 | |
| # Cache node_modules | |
| - uses: actions/cache@v4 | |
| id: cache-node-modules | |
| with: | |
| path: ./node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }} | |
| # Testing | |
| - run: pnpm install | |
| shell: bash | |
| - run: pnpm test | |
| shell: bash |