action.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: "Setup Solana"
  2. description: "Setup Solana"
  3. runs:
  4. using: "composite"
  5. steps:
  6. - uses: actions/cache@v3
  7. name: Cache Solana Tool Suite
  8. id: cache-solana
  9. with:
  10. path: |
  11. ~/.cache/solana/
  12. ~/.local/share/solana/
  13. key: solana-${{ runner.os }}-v0000-${{ env.SOLANA_CLI_VERSION }}-${{ env.SOLANG_VERSION }}
  14. - uses: nick-fields/retry@v2
  15. if: steps.cache-solana.outputs.cache-hit != 'true'
  16. with:
  17. retry_wait_seconds: 300
  18. timeout_minutes: 2
  19. max_attempts: 10
  20. retry_on: error
  21. shell: bash
  22. command: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_CLI_VERSION }}/install)"
  23. - uses: nick-fields/retry@v2
  24. if: steps.cache-solana.outputs.cache-hit != 'true'
  25. with:
  26. retry_wait_seconds: 300
  27. timeout_minutes: 2
  28. max_attempts: 10
  29. retry_on: error
  30. shell: bash
  31. command: |
  32. curl -sSL -o /home/runner/.local/share/solana/install/active_release/bin/solang \
  33. https://github.com/hyperledger/solang/releases/download/v${{ env.SOLANG_VERSION }}/solang-linux-x86-64
  34. chmod 755 /home/runner/.local/share/solana/install/active_release/bin/solang
  35. - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
  36. shell: bash
  37. - run: solana-keygen new --no-bip39-passphrase
  38. shell: bash
  39. - run: solana config set --url localhost
  40. shell: bash