-
Notifications
You must be signed in to change notification settings - Fork 11
CI: Bring repo up to date #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| name: Setup environment | ||
|
|
||
| inputs: | ||
| cargo-cache-key: | ||
| description: The key to cache cargo dependencies. Skips cargo caching if not provided. | ||
| required: false | ||
| cargo-cache-fallback-key: | ||
| description: The fallback key to use when caching cargo dependencies. Default to not using a fallback key. | ||
| required: false | ||
| cargo-cache-local-key: | ||
| description: The key to cache local cargo dependencies. Skips local cargo caching if not provided. | ||
| required: false | ||
| clippy: | ||
| description: Install Clippy if `true`. Defaults to `false`. | ||
| required: false | ||
| rustfmt: | ||
| description: Install Rustfmt if `true`. Defaults to `false`. | ||
| required: false | ||
| solana: | ||
| description: Install Solana if `true`. Defaults to `false`. | ||
| required: false | ||
| cli: | ||
| description: Install CLI dependencies if `true`. Defaults to `false`. | ||
| required: false | ||
| purge: | ||
| description: Purge unused directories if `true`. Defaults to `false`. | ||
| required: false | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Purge unused ubuntu runner directories | ||
| if: ${{ inputs.purge == 'true' }} | ||
| shell: bash | ||
| run: | | ||
| # If there are still disk space issues, try to add more packages from | ||
| # https://github.com/jlumbroso/free-disk-space | ||
| sudo rm -rf /usr/share/dotnet | ||
| sudo rm -rf /usr/share/swift | ||
| sudo rm -rf /usr/share/mysql | ||
| sudo rm -rf /usr/share/az_* | ||
| sudo rm -rf /usr/share/postgresql-common | ||
| sudo rm -rf /opt/ghc | ||
| sudo rm -rf /opt/az | ||
| sudo rm -rf /opt/pipx | ||
| sudo rm -rf /opt/microsoft | ||
| sudo rm -rf /opt/google | ||
| sudo rm -rf /opt/hostedtoolcache | ||
| sudo rm -rf /usr/local/lib/android | ||
| sudo rm -rf /usr/local/lib/heroku | ||
| sudo rm -rf /imagegeneration | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| sudo docker image prune --all --force | ||
|
|
||
| - name: Install Dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| shell: bash | ||
|
|
||
| - name: Set Environment Variables | ||
| shell: bash | ||
| run: pnpm zx ./scripts/ci/set-env.mjs | ||
|
|
||
| - name: Install Rustfmt | ||
| if: ${{ inputs.rustfmt == 'true' }} | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ env.TOOLCHAIN_FORMAT }} | ||
| components: rustfmt | ||
|
|
||
| - name: Install Clippy | ||
| if: ${{ inputs.clippy == 'true' }} | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ env.TOOLCHAIN_LINT }} | ||
| components: clippy | ||
|
|
||
| - name: Install Solana | ||
| if: ${{ inputs.solana == 'true' }} | ||
| uses: solana-program/actions/install-solana@v1 | ||
| with: | ||
| version: ${{ env.SOLANA_VERSION }} | ||
| cache: true | ||
|
|
||
| - name: Install CLI dependencies | ||
| if: ${{ inputs.cli == 'true' }} | ||
| shell: bash | ||
| run: sudo apt update && sudo apt install libudev-dev protobuf-compiler -y | ||
|
|
||
| - name: Cache Cargo Dependencies | ||
| if: ${{ inputs.cargo-cache-key && !inputs.cargo-cache-fallback-key }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| target/ | ||
| key: ${{ runner.os }}-${{ inputs.cargo-cache-key }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: ${{ runner.os }}-${{ inputs.cargo-cache-key }} | ||
|
|
||
| - name: Cache Cargo Dependencies With Fallback | ||
| if: ${{ inputs.cargo-cache-key && inputs.cargo-cache-fallback-key }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| target/ | ||
| key: ${{ runner.os }}-${{ inputs.cargo-cache-key }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ inputs.cargo-cache-key }} | ||
| ${{ runner.os }}-${{ inputs.cargo-cache-fallback-key }}-${{ hashFiles('**/Cargo.lock') }} | ||
| ${{ runner.os }}-${{ inputs.cargo-cache-fallback-key }} | ||
|
|
||
| - name: Cache Local Cargo Dependencies | ||
| if: ${{ inputs.cargo-cache-local-key }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| .cargo/bin/ | ||
| .cargo/registry/index/ | ||
| .cargo/registry/cache/ | ||
| .cargo/git/db/ | ||
| key: ${{ runner.os }}-${{ inputs.cargo-cache-local-key }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: ${{ runner.os }}-${{ inputs.cargo-cache-local-key }} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: cargo | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: "08:00" | ||
| timezone: UTC | ||
| open-pull-requests-limit: 6 | ||
| - package-ecosystem: npm | ||
| directories: | ||
| - "/" | ||
| - "/clients/js" | ||
| - "/clients/js-legacy" | ||
| schedule: | ||
| interval: daily | ||
| time: "09:00" | ||
| timezone: UTC | ||
| open-pull-requests-limit: 6 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: Dependabot auto-merge | ||
| on: pull_request | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| dependabot: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository_owner == 'solana-program' | ||
| steps: | ||
| - name: Enable auto-merge | ||
| run: gh pr merge --auto --squash "$PR_URL" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.