Skip to content

Commit e0f02a8

Browse files
authored
Remove jito-bytemuck, jito-account-traits-derive (#270)
1 parent 8109c87 commit e0f02a8

11 files changed

Lines changed: 74 additions & 453 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: ci
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
tags:
7-
- 'v*'
7+
- "v*"
88
pull_request:
9-
branches: [ master ]
9+
branches: [master]
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -20,18 +20,23 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: recursive
23+
- uses: actions-rust-lang/setup-rust-toolchain@v1
24+
with:
25+
toolchain: 1.85.0
2326
- name: Install cargo-audit from crates.io
2427
uses: baptiste0928/cargo-install@v3
2528
with:
2629
crate: cargo-audit
27-
version: "0.21.1"
30+
version: "0.22.1"
2831
- run: |
2932
cargo audit \
3033
--ignore RUSTSEC-2022-0093 \
3134
--ignore RUSTSEC-2024-0344 \
3235
--ignore RUSTSEC-2024-0421 \
3336
--ignore RUSTSEC-2025-0022 \
34-
--ignore RUSTSEC-2025-0055 # waiting for solana upgrade
37+
--ignore RUSTSEC-2025-0055 \
38+
--ignore RUSTSEC-2026-0007 \
39+
--ignore RUSTSEC-2026-0009
3540
3641
code_gen:
3742
# cargo b && ./target/debug/jito-shank-cli && yarn generate-clients && cargo b
@@ -41,27 +46,27 @@ jobs:
4146
- uses: actions/checkout@v4
4247
with:
4348
submodules: recursive
44-
49+
4550
- uses: actions-rust-lang/setup-rust-toolchain@v1
4651
with:
4752
components: rustfmt, clippy
4853
toolchain: 1.84.1
4954
- name: Install system dependencies
5055
run: sudo apt-get update && sudo apt-get install -y libudev-dev
51-
56+
5257
- name: Set Node.js 22.x
5358
uses: actions/setup-node@v3
5459
with:
55-
node-version: '22.x'
56-
60+
node-version: "22.x"
61+
5762
- name: Generate all code
5863
run: make generate-code
59-
64+
6065
- name: Verify no file changes
6166
uses: tj-actions/verify-changed-files@v20
6267
with:
6368
fail-if-changed: true
64-
fail-message: 'Unexpected changes in generated files. Please run `make generate-code` locally to regenerate the files.'
69+
fail-message: "Unexpected changes in generated files. Please run `make generate-code` locally to regenerate the files."
6570

6671
lint:
6772
name: lint

.github/workflows/publish-crate.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ on:
66
package_path:
77
description: Which crate to publish
88
required: true
9-
default: 'account_traits_derive'
9+
default: "clients/rust/common"
1010
type: choice
1111
options:
12-
- account_traits_derive
13-
- bytemuck
1412
- clients/rust/common
1513
- clients/rust/restaking_client
1614
- clients/rust/vault_client
@@ -151,18 +149,18 @@ jobs:
151149
run: |
152150
# Get current version before update
153151
OLD_VERSION=$(grep -m1 'version =' Cargo.toml | cut -d '"' -f2)
154-
152+
155153
if [ "${{ inputs.dry_run }}" == "true" ]; then
156154
# For dry-run mode, don't use the -x flag (dry-run is default)
157155
cargo release ${{ inputs.level }} --no-confirm --no-push
158156
else
159157
# For actual execution, use the -x flag
160158
cargo release ${{ inputs.level }} --no-confirm -x
161159
fi
162-
160+
163161
# Get new version after update
164162
NEW_VERSION=$(grep -m1 'version =' Cargo.toml | cut -d '"' -f2)
165-
163+
166164
# Set outputs for the release step
167165
echo "old_version=${OLD_VERSION}" >> $GITHUB_OUTPUT
168166
echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT
@@ -182,4 +180,4 @@ jobs:
182180
with:
183181
tag: ${{ steps.publish.outputs.new_git_tag }}
184182
name: "${{ steps.extract_name.outputs.crate_name }} v${{ steps.publish.outputs.new_version }}"
185-
body: ${{ steps.changelog.outputs.changelog }}
183+
body: ${{ steps.changelog.outputs.changelog }}

.github/workflows/publish-crates.yaml

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
package_path:
7-
description: 'Comma-separated list of crates to publish. Example: core,restaking_core,cli'
7+
description: "Comma-separated list of crates to publish. Example: core,restaking_core,cli"
88
required: true
9-
default: 'account_traits_derive,bytemuck,clients/rust/common,clients/rust/restaking_client,clients/rust/vault_client,core,restaking_sdk,restaking_core,restaking_program,vault_sdk,vault_core,vault_program'
9+
default: "clients/rust/common,clients/rust/restaking_client,clients/rust/vault_client,core,restaking_sdk,restaking_core,restaking_program,vault_sdk,vault_core,vault_program"
1010
type: string
1111
level:
1212
description: Version increment level for selected crates
@@ -18,7 +18,7 @@ on:
1818
- minor
1919
- major
2020
tag_name:
21-
description: 'Custom tag name for release. Example: v1.2.3 or release-2024-01'
21+
description: "Custom tag name for release. Example: v1.2.3 or release-2024-01"
2222
required: true
2323
type: string
2424
dry_run:
@@ -46,8 +46,6 @@ jobs:
4646
run: |
4747
# All available crates in dependency order
4848
ALL_CRATES=(
49-
"account_traits_derive"
50-
"bytemuck"
5149
"clients/rust/common"
5250
"clients/rust/restaking_client"
5351
"clients/rust/vault_client"
@@ -59,7 +57,7 @@ jobs:
5957
"vault_core"
6058
"vault_program"
6159
)
62-
60+
6361
# Check if input contains commas (multiple crates) or is "all"
6462
if [[ "${{ inputs.package_path }}" == "all" ]]; then
6563
# Publish all crates
@@ -70,7 +68,7 @@ jobs:
7068
# Multiple crates - parse comma-separated list
7169
IFS=',' read -ra SELECTED_ARRAY <<< "${{ inputs.package_path }}"
7270
CRATES_TO_PUBLISH=()
73-
71+
7472
# Validate and order selected crates according to dependency order
7573
for crate in "${ALL_CRATES[@]}"; do
7674
for selected in "${SELECTED_ARRAY[@]}"; do
@@ -82,7 +80,7 @@ jobs:
8280
fi
8381
done
8482
done
85-
83+
8684
echo "📦 Publishing MULTIPLE crates: ${{ inputs.package_path }}"
8785
IS_SINGLE="false"
8886
else
@@ -91,15 +89,15 @@ jobs:
9189
echo "📦 Publishing SINGLE crate: ${{ inputs.package_path }}"
9290
IS_SINGLE="true"
9391
fi
94-
92+
9593
# Convert to space-separated string for output
9694
CRATES_STRING=$(IFS=' '; echo "${CRATES_TO_PUBLISH[*]}")
9795
COUNT=${#CRATES_TO_PUBLISH[@]}
98-
96+
9997
echo "crates_to_publish=$CRATES_STRING" >> $GITHUB_OUTPUT
10098
echo "crate_count=$COUNT" >> $GITHUB_OUTPUT
10199
echo "is_single_crate=$IS_SINGLE" >> $GITHUB_OUTPUT
102-
100+
103101
echo "Will publish $COUNT crates: $CRATES_STRING"
104102
echo "Is single crate: $IS_SINGLE"
105103
@@ -208,52 +206,52 @@ jobs:
208206
run: |
209207
# Convert space-separated string back to array
210208
read -ra CRATES_TO_PUBLISH <<< "${{ needs.determine_crates.outputs.crates_to_publish }}"
211-
209+
212210
PUBLISHED_CRATES=""
213-
211+
214212
# Determine the version level to use
215213
LEVEL="${{ inputs.level }}"
216-
214+
217215
for crate_path in "${CRATES_TO_PUBLISH[@]}"; do
218216
echo "========================================="
219217
echo "Publishing $crate_path..."
220218
echo "========================================="
221219
cd "$GITHUB_WORKSPACE/$crate_path"
222-
220+
223221
# Get versions
224222
OLD_VERSION=$(grep -m1 'version =' Cargo.toml | cut -d '"' -f2)
225223
CRATE_NAME=$(basename "$crate_path")
226-
224+
227225
echo "Current version: $OLD_VERSION"
228-
226+
229227
if [ "${{ inputs.dry_run }}" == "true" ]; then
230228
echo "🧪 DRY RUN: Would publish $CRATE_NAME $LEVEL"
231229
cargo release $LEVEL --no-confirm --no-push
232230
else
233231
echo "🚀 Publishing $CRATE_NAME $LEVEL"
234232
cargo release $LEVEL --no-confirm -x
235-
233+
236234
# Wait a bit between publishes to avoid rate limits (only for multiple crates)
237235
if [ "${{ needs.determine_crates.outputs.is_single_crate }}" == "false" ]; then
238236
echo "⏳ Waiting 10 seconds before next publish..."
239237
sleep 10
240238
fi
241239
fi
242-
240+
243241
NEW_VERSION=$(grep -m1 'version =' Cargo.toml | cut -d '"' -f2)
244242
echo "New version: $NEW_VERSION"
245-
243+
246244
# Track published crates for summary
247245
PUBLISHED_CRATES="${PUBLISHED_CRATES}- **${CRATE_NAME}**: ${OLD_VERSION} → ${NEW_VERSION}\n"
248-
246+
249247
echo "✅ Completed $CRATE_NAME"
250248
cd "$GITHUB_WORKSPACE"
251249
done
252-
250+
253251
echo "published_crates<<EOF" >> $GITHUB_OUTPUT
254252
echo -e "$PUBLISHED_CRATES" >> $GITHUB_OUTPUT
255253
echo "EOF" >> $GITHUB_OUTPUT
256-
254+
257255
echo "========================================="
258256
echo "🎉 Publishing completed!"
259257
echo "========================================="
@@ -276,12 +274,12 @@ jobs:
276274
run: |
277275
# Convert space-separated string back to array
278276
read -ra CRATES_TO_PUBLISH <<< "${{ needs.determine_crates.outputs.crates_to_publish }}"
279-
277+
280278
# Determine release info based on what was published
281279
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
282280
CRATE_COUNT=${{ needs.determine_crates.outputs.crate_count }}
283281
TAG_NAME=${{ github.event.inputs.tag_name }}
284-
282+
285283
if [ "${{ needs.determine_crates.outputs.is_single_crate }}" == "true" ]; then
286284
# Single crate release
287285
CRATE_PATH="${CRATES_TO_PUBLISH[0]}"
@@ -294,9 +292,9 @@ jobs:
294292
# Multiple crates release
295293
RELEASE_TITLE="Jito Restaking Release - $(date +%Y-%m-%d)"
296294
fi
297-
295+
298296
echo "Creating combined release: $RELEASE_TITLE"
299-
297+
300298
# Build release notes
301299
RELEASE_NOTES="## $RELEASE_TITLE
302300
@@ -307,39 +305,39 @@ jobs:
307305
### 📝 What's Changed
308306
309307
Recent changes across all published crates:"
310-
308+
311309
# Generate combined changelog
312310
COMBINED_CHANGELOG=""
313311
for crate_path in "${CRATES_TO_PUBLISH[@]}"; do
314312
CRATE_NAME=$(basename "$crate_path")
315313
echo "Generating changelog for $CRATE_NAME..."
316-
314+
317315
# Get recent commits for this crate
318316
CRATE_CHANGELOG=$(git log --pretty=format:'- %s' --no-merges $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD -- "$crate_path" | head -5)
319-
317+
320318
if [ -n "$CRATE_CHANGELOG" ]; then
321319
COMBINED_CHANGELOG="$COMBINED_CHANGELOG
322320
323321
#### $CRATE_NAME
324322
$CRATE_CHANGELOG"
325323
fi
326324
done
327-
325+
328326
if [ -z "$COMBINED_CHANGELOG" ]; then
329327
COMBINED_CHANGELOG="
330328
- Published new versions of selected crates"
331329
fi
332-
330+
333331
RELEASE_NOTES="$RELEASE_NOTES$COMBINED_CHANGELOG
334332
335333
**Full Changelog**: https://github.com/${{ github.repository }}/commits/$TAG_NAME"
336-
334+
337335
# Create the combined GitHub release
338336
gh release create "$TAG_NAME" \
339337
--title "$RELEASE_TITLE" \
340338
--notes "$RELEASE_NOTES" \
341339
--latest=true
342-
340+
343341
echo "✅ Created combined release: $TAG_NAME"
344342
env:
345343
GH_TOKEN: ${{ secrets.JITO_TEAM_PAT }}
@@ -360,18 +358,18 @@ jobs:
360358
echo "- **Dry run**: ${{ inputs.dry_run }}" >> $GITHUB_STEP_SUMMARY
361359
echo "- **Version level**: ${{ inputs.level }}" >> $GITHUB_STEP_SUMMARY
362360
echo "" >> $GITHUB_STEP_SUMMARY
363-
361+
364362
if [ "${{ inputs.dry_run }}" == "true" ]; then
365363
echo "⚠️ **This was a dry run - no actual publishing occurred**" >> $GITHUB_STEP_SUMMARY
366364
else
367365
echo "✅ **Publishing completed successfully!**" >> $GITHUB_STEP_SUMMARY
368-
366+
369367
if [ "${{ inputs.create_release }}" == "true" ]; then
370368
echo "🏷️ **Combined GitHub release created**" >> $GITHUB_STEP_SUMMARY
371369
fi
372370
fi
373-
371+
374372
echo "" >> $GITHUB_STEP_SUMMARY
375373
echo "### 📋 Published Crates" >> $GITHUB_STEP_SUMMARY
376374
echo "" >> $GITHUB_STEP_SUMMARY
377-
echo "${{ needs.publish.outputs.published_crates }}" >> $GITHUB_STEP_SUMMARY
375+
echo "${{ needs.publish.outputs.published_crates }}" >> $GITHUB_STEP_SUMMARY

Cargo.lock

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)