Skip to content

Commit

Permalink
CI: Update repo to run CI on imported packages (#56)
Browse files Browse the repository at this point in the history
#### Problem

The repo has imported many packages from SPL, but they aren't properly
integrated, since they can't be built, CI isn't running, etc.

#### Summary of changes

It's a bit of a suite of changes, but they get the repo up and running
with the program and everything! Here are the changes:

* update to Solana v2.1 crates and rust toolchain
* add new packages to Cargo workspace
* update Rust packages to use crates.io versions where applicable
* move program-2022-tests into clients/rust-legacy/tests
* remove `test-sbf` feature on program-2022-tests
* add `[package.metadata.solana.program-id]` for token-2022 and elgamal
  registry
* update JS legacy tests to use validator started with `start-validator.mjs`
* add concept of "fixture programs" to load programs from the test
  fixtures directory during JS legacy tests
* make scripts language-specific instead of package-specific, to reuse
  the JS and rust scripts
* remove Token-2022 as a downloaded program, opt for the built version
* add package.json entries to run build / test / format / lint for the
  program / cli / rust-legacy / js-legacy / confidential transfer
* execute the new steps in CI
  • Loading branch information
joncinque authored Jan 10, 2025
1 parent 9a07267 commit 7644591
Show file tree
Hide file tree
Showing 94 changed files with 6,149 additions and 2,207 deletions.
30 changes: 30 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ inputs:
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'
Expand All @@ -32,6 +38,25 @@ runs:
node-version: 20
cache: 'pnpm'

- name: Purge unused ubuntu runner directories
if: ${{ inputs.purge == 'true' }}
shell: bash
run: |
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
- name: Install Dependencies
run: pnpm install --frozen-lockfile
shell: bash
Expand Down Expand Up @@ -61,6 +86,11 @@ runs:
version: ${{ env.SOLANA_VERSION }}
cache: true

- name: Install CLI dependencies
if: ${{ inputs.cli == 'true' }}
shell: bash
run: 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
Expand Down
Loading

0 comments on commit 7644591

Please sign in to comment.