-
Notifications
You must be signed in to change notification settings - Fork 36
55 lines (50 loc) · 2.29 KB
/
main.yml
File metadata and controls
55 lines (50 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Main
on:
push:
branches: [main]
pull_request:
env:
JS_PACKAGES: "['clients-js']"
RUST_PACKAGES: "['clients-rust', 'interface', 'program']"
SBPF_PROGRAM_PACKAGES: "['program']"
WASM_PACKAGES: "['interface', 'program']"
IDL_PACKAGES: "['interface']"
jobs:
set_env:
name: Set variables to be used in strategy definitions in reusable workflow
runs-on: ubuntu-latest
outputs:
JS_PACKAGES: ${{ steps.compute.outputs.JS_PACKAGES }}
SBPF_PROGRAM_PACKAGES: ${{ steps.compute.outputs.SBPF_PROGRAM_PACKAGES }}
RUST_PACKAGES: ${{ steps.compute.outputs.RUST_PACKAGES }}
WASM_PACKAGES: ${{ steps.compute.outputs.WASM_PACKAGES }}
IDL_PACKAGES: ${{ steps.compute.outputs.IDL_PACKAGES }}
RUST_TOOLCHAIN_NIGHTLY: ${{ steps.compute.outputs.RUST_TOOLCHAIN_NIGHTLY }}
SOLANA_CLI_VERSION: ${{ steps.compute.outputs.SOLANA_CLI_VERSION }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Compute variables
id: compute
shell: bash
run: |
echo "JS_PACKAGES=${{ env.JS_PACKAGES }}" >> $GITHUB_OUTPUT
echo "SBPF_PROGRAM_PACKAGES=${{ env.SBPF_PROGRAM_PACKAGES }}" >> $GITHUB_OUTPUT
echo "RUST_PACKAGES=${{ env.RUST_PACKAGES }}" >> $GITHUB_OUTPUT
echo "WASM_PACKAGES=${{ env.WASM_PACKAGES }}" >> $GITHUB_OUTPUT
echo "IDL_PACKAGES=${{ env.IDL_PACKAGES }}" >> $GITHUB_OUTPUT
echo "RUST_TOOLCHAIN_NIGHTLY=$(make rust-toolchain-nightly)" >> "$GITHUB_OUTPUT"
echo "SOLANA_CLI_VERSION=$(make solana-cli-version)" >> "$GITHUB_OUTPUT"
main:
needs: set_env
uses: solana-program/actions/.github/workflows/main.yml@main
with:
js-packages: ${{ needs.set_env.outputs.JS_PACKAGES }}
sbpf-program-packages: ${{ needs.set_env.outputs.SBPF_PROGRAM_PACKAGES }}
rust-packages: ${{ needs.set_env.outputs.RUST_PACKAGES }}
wasm-packages: ${{ needs.set_env.outputs.WASM_PACKAGES }}
idl-packages: ${{ needs.set_env.outputs.IDL_PACKAGES }}
wasm-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
rustfmt-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
clippy-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
solana-cli-version: ${{ needs.set_env.outputs.SOLANA_CLI_VERSION }}