|
|
@@ -6,13 +6,6 @@ on:
|
|
|
pull_request:
|
|
|
branches: [main]
|
|
|
|
|
|
-env:
|
|
|
- NODE_VERSION: 18
|
|
|
- SOLANA_VERSION: {{ solanaVersion.full }}
|
|
|
-{% if programFramework === 'anchor' %}
|
|
|
- ANCHOR_VERSION: {{ anchorVersion.full }}
|
|
|
-{% endif %}
|
|
|
-
|
|
|
jobs:
|
|
|
format_and_lint_programs:
|
|
|
name: Format & Lint Programs
|
|
|
@@ -25,7 +18,6 @@ jobs:
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
clippy: true
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
rustfmt: true
|
|
|
|
|
|
- name: Format Programs
|
|
|
@@ -44,8 +36,6 @@ jobs:
|
|
|
|
|
|
- name: Setup Environment
|
|
|
uses: ./.github/actions/setup
|
|
|
- with:
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
|
|
|
- name: Format Client JS
|
|
|
run: pnpm clients:js:format
|
|
|
@@ -66,7 +56,6 @@ jobs:
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
clippy: true
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
rustfmt: true
|
|
|
|
|
|
- name: Format Client Rust
|
|
|
@@ -88,10 +77,9 @@ jobs:
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
cargo-cache-key: cargo-programs
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
- solana: {% raw %}${{ env.SOLANA_VERSION }}{% endraw %}
|
|
|
+ solana: true
|
|
|
{% if programFramework === 'anchor' %}
|
|
|
- anchor: {% raw %}${{ env.ANCHOR_VERSION }}{% endraw %}
|
|
|
+ anchor: true
|
|
|
{% endif %}
|
|
|
|
|
|
- name: Build Programs
|
|
|
@@ -123,10 +111,9 @@ jobs:
|
|
|
with:
|
|
|
cargo-cache-key: cargo-program-tests
|
|
|
cargo-cache-fallback-key: cargo-programs
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
- solana: {% raw %}${{ env.SOLANA_VERSION }}{% endraw %}
|
|
|
+ solana: true
|
|
|
{% if programFramework === 'anchor' %}
|
|
|
- anchor: {% raw %}${{ env.ANCHOR_VERSION }}{% endraw %}
|
|
|
+ anchor: true
|
|
|
{% endif %}
|
|
|
|
|
|
- name: Test Programs
|
|
|
@@ -145,10 +132,9 @@ jobs:
|
|
|
with:
|
|
|
cargo-cache-key: cargo-programs
|
|
|
cargo-cache-local-key: cargo-local
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
{% if programFramework === 'anchor' %}
|
|
|
- solana: {% raw %}${{ env.SOLANA_VERSION }}{% endraw %}
|
|
|
- anchor: {% raw %}${{ env.ANCHOR_VERSION }}{% endraw %}
|
|
|
+ solana: true
|
|
|
+ anchor: true
|
|
|
{% endif %}
|
|
|
|
|
|
- name: Generate IDLs
|
|
|
@@ -171,7 +157,6 @@ jobs:
|
|
|
- name: Setup Environment
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
rustfmt: true
|
|
|
|
|
|
- name: Generate Clients
|
|
|
@@ -195,8 +180,7 @@ jobs:
|
|
|
- name: Setup Environment
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
- solana: {% raw %}${{ env.SOLANA_VERSION }}{% endraw %}
|
|
|
+ solana: true
|
|
|
|
|
|
- name: Restore Program Builds
|
|
|
uses: actions/cache/restore@v4
|
|
|
@@ -221,8 +205,7 @@ jobs:
|
|
|
uses: ./.github/actions/setup
|
|
|
with:
|
|
|
cargo-cache-key: cargo-rust-client
|
|
|
- node: {% raw %}${{ env.NODE_VERSION }}{% endraw %}
|
|
|
- solana: {% raw %}${{ env.SOLANA_VERSION }}{% endraw %}
|
|
|
+ solana: true
|
|
|
|
|
|
- name: Restore Program Builds
|
|
|
uses: actions/cache/restore@v4
|