Skip to content

Commit 2f085bf

Browse files
tazarovclaude
andcommitted
fix: Add Rust toolchain setup to Go workflows
- Add Rust toolchain installation step to go-ci.yml and go-release.yml - Ensures cargo is available when no rust-v* releases exist yet - Fixes CI failures on Windows and other platforms during initial setup - Removes unnecessary apt-get install cargo from Linux fallback This allows the workflows to build the Rust library locally when no rust-v* tagged releases are available, which is the case for new branches and initial project setup. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 324c500 commit 2f085bf

4 files changed

Lines changed: 35 additions & 2 deletions

File tree

.claude/commands/feature.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Please analyze and implement the GitHub feature: $ARGUMENTS.
2+
3+
Follow these steps:
4+
5+
1. Use `gh issue view` to get the feature issue details
6+
2. Understand the feature described in the issue
7+
3. Create a new branch for the change, ensure the working three is clean
8+
4. Search the codebase for relevant files
9+
5. Implement the necessary changes to address the feature requirements
10+
6. Write and run tests to verify the feature is working as intended
11+
7. Ensure code passes linting and type checking
12+
8. Create a descriptive commit message
13+
9. Push and create a PR
14+
15+
Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks.

.claude/commands/ifeed.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Use the following feedback to do the following:
2+
3+
- Create new issues if the suggestions cause a scope creep for the current PR
4+
- Implement critical issues and those that make sense in the context of the PR so that it is in a complete and usable state
5+
6+
FEEDBACK:
7+
8+
$ARGUMENTS
9+
10+
**IMPORTANT:** Be concise and make sure to lint and test all code changes.

.github/workflows/go-ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,23 @@ jobs:
3737
with:
3838
go-version: ${{ matrix.go-version }}
3939

40+
- name: Install Rust toolchain (for fallback builds)
41+
uses: dtolnay/rust-toolchain@stable
42+
4043
- name: Run Go linting
4144
uses: golangci/golangci-lint-action@v6
4245
with:
4346
version: latest
4447
args: --timeout=5m
4548

4649
# Download pre-built Rust library for testing
47-
# This assumes a recent Rust release is available
50+
# Falls back to building locally if no rust-v* releases exist yet
4851
- name: Download latest Rust library (Linux)
4952
if: matrix.os == 'ubuntu-latest'
5053
run: |
5154
LATEST_RELEASE=$(gh release list --repo ${{ github.repository }} --limit 10 | grep -E "^rust-v" | head -1 | cut -f1)
5255
if [ -z "$LATEST_RELEASE" ]; then
5356
echo "No Rust release found, building locally"
54-
sudo apt-get update && sudo apt-get install -y cargo
5557
cargo build --release
5658
echo "TOKENIZERS_LIB_PATH=$(pwd)/target/release/libtokenizers.so" >> $GITHUB_ENV
5759
else
@@ -129,6 +131,9 @@ jobs:
129131
with:
130132
go-version: '1.24'
131133

134+
- name: Install Rust toolchain (for fallback builds)
135+
uses: dtolnay/rust-toolchain@stable
136+
132137
- name: Download latest Rust library
133138
run: |
134139
LATEST_RELEASE=$(gh release list --repo ${{ github.repository }} --limit 10 | grep -E "^rust-v" | head -1 | cut -f1)

.github/workflows/go-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
with:
2929
go-version: ${{ matrix.go-version }}
3030

31+
- name: Install Rust toolchain (for fallback builds)
32+
uses: dtolnay/rust-toolchain@stable
33+
3134
- name: Run Go linting
3235
uses: golangci/golangci-lint-action@v6
3336
with:

0 commit comments

Comments
 (0)