Skip to content

Commit 7644591

Browse files
authored
CI: Update repo to run CI on imported packages (#56)
#### 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
1 parent 9a07267 commit 7644591

File tree

94 files changed

+6149
-2207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+6149
-2207
lines changed

.github/actions/setup/action.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ inputs:
1919
solana:
2020
description: Install Solana if `true`. Defaults to `false`.
2121
required: false
22+
cli:
23+
description: Install CLI dependencies if `true`. Defaults to `false`.
24+
required: false
25+
purge:
26+
description: Purge unused directories if `true`. Defaults to `false`.
27+
required: false
2228

2329
runs:
2430
using: 'composite'
@@ -32,6 +38,25 @@ runs:
3238
node-version: 20
3339
cache: 'pnpm'
3440

41+
- name: Purge unused ubuntu runner directories
42+
if: ${{ inputs.purge == 'true' }}
43+
shell: bash
44+
run: |
45+
sudo rm -rf /usr/share/dotnet
46+
sudo rm -rf /usr/share/swift
47+
sudo rm -rf /usr/share/mysql
48+
sudo rm -rf /usr/share/az_*
49+
sudo rm -rf /usr/share/postgresql-common
50+
sudo rm -rf /opt/ghc
51+
sudo rm -rf /opt/az
52+
sudo rm -rf /opt/pipx
53+
sudo rm -rf /opt/microsoft
54+
sudo rm -rf /opt/google
55+
sudo rm -rf /opt/hostedtoolcache
56+
sudo rm -rf /usr/local/lib/android
57+
sudo rm -rf /usr/local/lib/heroku
58+
sudo rm -rf /imagegeneration
59+
3560
- name: Install Dependencies
3661
run: pnpm install --frozen-lockfile
3762
shell: bash
@@ -61,6 +86,11 @@ runs:
6186
version: ${{ env.SOLANA_VERSION }}
6287
cache: true
6388

89+
- name: Install CLI dependencies
90+
if: ${{ inputs.cli == 'true' }}
91+
shell: bash
92+
run: sudo apt install libudev-dev protobuf-compiler -y
93+
6494
- name: Cache Cargo Dependencies
6595
if: ${{ inputs.cargo-cache-key && !inputs.cargo-cache-fallback-key }}
6696
uses: actions/cache@v4

0 commit comments

Comments
 (0)