Skip to content

Commit abd1354

Browse files
chrisryugjclaude
andcommitted
ci: macos RUSTC 도 toolchain 직접 바이너리로 지정 — rustup proxy auto-install 우회
rust-src remove 로는 안 풀림(rustc 가 매번 재시도). 근본 원인은 build script 를 컴파일하는 rustc 가 rustup proxy 라 rust-src 자동 설치를 트리거하는 것. RUSTUP_CARGO 와 짝으로 RUSTC 도 toolchain 직접 바이너리로 지정해 proxy 를 완전 우회한다. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 350bfdb commit abd1354

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,19 @@ jobs:
143143
# 우회: rustup proxy 가 아니라 toolchain 디렉토리 안의 진짜 cargo binary 를 직접
144144
# 호출. dtolnay/rust-toolchain@stable + targets:aarch64-apple-darwin → 정확히
145145
# `~/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo` 에 설치됨.
146-
# [v2.6.24] macos-14 runner 이미지(2026-06 갱신)에 rust-src 가 사전설치돼 있어,
147-
# proc-macro 크레이트(quote/proc-macro2) 의 build script 를 컴파일할 때 rustup
148-
# proxy 가 rust-src 를 재다운로드하려다 `detected conflict: lib/rustlib/src/rust/
149-
# library/Cargo.lock` 로 빌드가 실패한다(이전 runner 이미지에선 통과, 코드 무관).
150-
# rust-src 는 이 프로젝트 빌드에 불필요(build-std 미사용)하므로 사전 제거해
151-
# 충돌 자체를 없앤다. 멱등 — 없으면 조용히 통과.
152-
- name: Remove preinstalled rust-src to avoid rustup conflict
153-
run: rustup component remove rust-src 2>/dev/null || true
154-
146+
# [v2.6.24] macos-14 runner 이미지(2026-06 갱신) + rustup 1.28 조합에서,
147+
# proc-macro 크레이트(proc-macro2/quote)의 build script 를 컴파일하는 `rustc`
148+
# 호출이 rustup proxy 를 거치면서 rust-src 컴포넌트를 자동 다운로드하려다
149+
# 실패(`downloading component rust-src` → conflict / rename 오류)해 빌드가 깨진다
150+
# (이전 runner 이미지에선 통과, 코드 무관). RUSTUP_CARGO 로 cargo 는 toolchain
151+
# 직접 바이너리로 우회했지만 cargo 가 spawn 하는 rustc 는 여전히 PATH proxy 였던
152+
# 것이 원인. RUSTC 도 toolchain 직접 바이너리로 지정해 proxy 를 완전히 우회하면
153+
# auto-install 시도 자체가 사라진다. rust-src 는 이 빌드에 불필요(build-std 미사용).
155154
- name: Cargo check (mac target)
156155
working-directory: src-tauri
157156
env:
158157
RUSTUP_CARGO: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo
158+
RUSTC: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc
159159
run: |
160160
ls -la "$RUSTUP_CARGO" || (ls -la "$HOME/.rustup/toolchains/" ; exit 1)
161161
"$RUSTUP_CARGO" --version
@@ -165,10 +165,12 @@ jobs:
165165
working-directory: src-tauri
166166
env:
167167
RUSTUP_CARGO: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo
168+
RUSTC: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc
168169
run: $RUSTUP_CARGO clippy --target aarch64-apple-darwin --all-targets -- -D warnings
169170

170171
- name: Cargo test (mac target)
171172
working-directory: src-tauri
172173
env:
173174
RUSTUP_CARGO: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo
175+
RUSTC: /Users/runner/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc
174176
run: $RUSTUP_CARGO test --target aarch64-apple-darwin

0 commit comments

Comments
 (0)