|
1 |
| -name: Native Programs |
| 1 | +name: Native Build |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: ["main"] |
6 |
| - pull_request: |
7 |
| - branches: ["main"] |
8 |
| - |
9 |
| -env: |
10 |
| - CARGO_TERM_COLOR: always |
| 4 | + schedule: |
| 5 | + - cron: '0 0 1 * *' |
11 | 6 |
|
12 | 7 | jobs:
|
13 | 8 | build:
|
14 |
| - name: Build |
15 | 9 | runs-on: ubuntu-latest
|
16 |
| - container: |
17 |
| - image: docker.io/solanadevelopers/solana-workshop-image:0.0.2 |
18 |
| - credentials: |
19 |
| - username: solanadevelopers |
20 |
| - password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} |
21 |
| - strategy: |
22 |
| - matrix: |
23 |
| - { |
24 |
| - dir: |
25 |
| - [ |
26 |
| - "basics/account-data/native/program", |
27 |
| - "basics/checking-accounts/native/program", |
28 |
| - "basics/close-account/native/program", |
29 |
| - "basics/counter/native", |
30 |
| - "basics/create-account/native/program", |
31 |
| - "basics/cross-program-invocation/native/program", |
32 |
| - "basics/hello-solana/native/program", |
33 |
| - "basics/pda-rent-payer/native/program", |
34 |
| - "basics/processing-instructions/native/program", |
35 |
| - "basics/program-derived-addresses/native/program", |
36 |
| - "basics/realloc/native/program", |
37 |
| - "basics/rent/native/program", |
38 |
| - "basics/repository-layout/native/program", |
39 |
| - "basics/transfer-sol/native/program", |
40 |
| - "tokens/create-token/native/program", |
41 |
| - "tokens/nft-minter/native/program", |
42 |
| - "tokens/pda-mint-authority/native/program", |
43 |
| - "tokens/spl-token-minter/native/program", |
44 |
| - "tokens/token-2022/default-account-state/native/program", |
45 |
| - "tokens/token-2022/mint-close-authority/native/program", |
46 |
| - "tokens/token-2022/multiple-extensions/native/program", |
47 |
| - "tokens/token-2022/non-transferable/native/program", |
48 |
| - "tokens/token-2022/transfer-fees/native/program", |
49 |
| - "tokens/transfer-tokens/native/program", |
50 |
| - "tools/shank-and-solita/native/program", |
51 |
| - ], |
52 |
| - } |
53 | 10 |
|
54 | 11 | steps:
|
55 |
| - - name: Checkout code |
56 |
| - uses: actions/checkout@v3 |
57 |
| - |
58 |
| - - name: Build program |
59 |
| - working-directory: ${{ matrix.dir }} |
60 |
| - run: cargo build-sbf --verbose |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + |
| 14 | + - name: Install dependencies |
| 15 | + run: | |
| 16 | + sh -c "$(curl -sSfL https://release.solana.com/beta/install)" |
| 17 | + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" |
| 18 | + solana -V |
| 19 | + rustc -V |
| 20 | + declare -a StringArray=( |
| 21 | + "basics/account-data/native/program" |
| 22 | + "basics/checking-accounts/native/program" |
| 23 | + "basics/close-account/native/program" |
| 24 | + "basics/counter/native" |
| 25 | + "basics/create-account/native/program" |
| 26 | + "basics/hello-solana/native/program" |
| 27 | + "basics/pda-rent-payer/native/program" |
| 28 | + "basics/processing-instructions/native/program" |
| 29 | + "basics/program-derived-addresses/native/program" |
| 30 | + "basics/realloc/native/program" |
| 31 | + "basics/rent/native/program" |
| 32 | + "basics/repository-layout/native/program" |
| 33 | + "basics/transfer-sol/native/program" |
| 34 | + "tokens/nft-minter/native/program" |
| 35 | + "tokens/pda-mint-authority/native/program" |
| 36 | + "tokens/spl-token-minter/native/program" |
| 37 | + "tokens/token-2022/default-account-state/native/program" |
| 38 | + "tokens/token-2022/mint-close-authority/native/program" |
| 39 | + "tokens/token-2022/multiple-extensions/native/program" |
| 40 | + "tokens/token-2022/non-transferable/native/program" |
| 41 | + "tokens/token-2022/transfer-fees/native/program" |
| 42 | + "tokens/transfer-tokens/native/program" |
| 43 | + "tools/shank-and-solita/native/program" |
| 44 | + "tokens/create-token/native/program" |
| 45 | + ) |
| 46 | + for val in "${StringArray[@]}"; do |
| 47 | + echo "Building $val..." |
| 48 | + cd $val |
| 49 | + cargo-build-sbf --verbose |
| 50 | + cd - > /dev/null |
| 51 | + done |
| 52 | + shell: bash |
0 commit comments