Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit fa534e9

Browse files
authored
token-upgrade: Add CLI and docs (#3593)
* token-upgrade: Add CLI and docs * Remove build.rs and build by hand * Exclude token-upgrade-cli from cargo-build-test * Use user-friendly token-client response printing * Make docs consistent with implementation + other feedback * Remove integer arithmetic * Make required parameters `required()`
1 parent f97a3dc commit fa534e9

File tree

8 files changed

+1338
-8
lines changed

8 files changed

+1338
-8
lines changed

.github/workflows/pull-request-token-upgrade.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,50 @@ jobs:
6060
6161
- name: Build and test
6262
run: ./ci/cargo-test-sbf.sh token-upgrade
63+
64+
cargo-build-test-cli:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v2
68+
69+
- name: Set env vars
70+
run: |
71+
source ci/rust-version.sh
72+
echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV
73+
source ci/solana-version.sh
74+
echo "SOLANA_VERSION=$solana_version" >> $GITHUB_ENV
75+
76+
- uses: actions-rs/toolchain@v1
77+
with:
78+
toolchain: ${{ env.RUST_STABLE }}
79+
override: true
80+
profile: minimal
81+
82+
- uses: actions/cache@v2
83+
with:
84+
path: |
85+
~/.cargo/registry
86+
~/.cargo/git
87+
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUST_STABLE }}
88+
89+
- uses: actions/cache@v2
90+
with:
91+
path: ~/.cache/solana
92+
key: solana-${{ env.SOLANA_VERSION }}
93+
94+
- name: Install dependencies
95+
run: |
96+
./ci/install-build-deps.sh
97+
./ci/install-program-deps.sh
98+
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
99+
100+
- name: Build dependent programs
101+
run: |
102+
cargo build-sbf --manifest-path ./token/program/Cargo.toml
103+
cargo build-sbf --manifest-path ./token/program-2022/Cargo.toml
104+
cargo build-sbf --manifest-path ./associated-token-account/program/Cargo.toml
105+
cargo build-sbf --manifest-path ./token-upgrade/program/Cargo.toml
106+
107+
- name: Run CLI tests
108+
run: |
109+
cargo test --manifest-path ./token-upgrade/cli/Cargo.toml

0 commit comments

Comments
 (0)