Files
hakorune/.github/workflows/min-gate.yml
Selfhosting Dev b573c3e5b8 feat: LLVM_SYS_180_PREFIX環境変数削除完了!llvm-harness経路でRust LLVMバインディング不要化達成
🚀 Phase 15.5 MIR Call統一革命 - LLVM環境変数削除フェーズ完了

##  完了内容
- **条件分岐実装**: llvm-harness(デフォルト)はLLVM_SYS_180_PREFIX不要
- **後方互換性維持**: llvm-inkwell-legacy使用時はLLVM_SYS_180_PREFIX必要
- **全ツール統一**: 12個のビルドスクリプト・テストスクリプトを一括更新
- **ドキュメント更新**: ENV_VARS.mdでLLVM feature選択方法を明記

## 🛠️ 更新ファイル
- **コアビルド**: src/runner/build.rs, tools/build_llvm.sh, build_llvm.sh
- **スモークテスト**: tools/llvm_smoke.sh, tools/test/smoke/llvm/ir_phi_empty_check.sh
- **CI設定**: .github/workflows/min-gate.yml
- **Windows版**: build_llvm_wsl.sh, build_llvm_wsl_msvc.sh (cross-compilation)
- **開発ツール**: tools/build_compiler_exe.sh, tools/ny_mir_builder.sh
- **ドキュメント**: docs/development/runtime/ENV_VARS.md

##  技術的成果
- **環境変数削減**: LLVM_SYS_180_PREFIX → 条件付き使用のみ
- **Python LLVM統合**: llvmliteハーネス経路でRust LLVM依存完全除去
- **ビルド簡略化**: デフォルトでllvm-config-18のみ必要
- **動作確認**: tools/llvm_smoke.sh成功 (1648バイト.oファイル生成)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 03:28:24 +09:00

212 lines
6.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: min-gate
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cargo check (default features)
run: cargo check --all-targets -q
# Disabled by default to keep CI light; run locally when needed
pyvm-smoke:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: rust-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install ripgrep (for smokes)
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Run PyVM Stage-2 smokes
run: bash tools/pyvm_stage2_smoke.sh
- name: JSON smoke — collect_prints (PyVM+plugins)
run: bash tools/test/smoke/selfhost/jsonbox_collect_prints.sh
- name: JSON smoke — parse error (PyVM+plugins)
run: bash tools/test/smoke/selfhost/jsonbox_parse_err.sh
# Disabled by default to keep CI light; run locally when needed
macro-golden:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: rust-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build (release)
run: cargo build --release -q
- name: Macro golden — identity
run: bash tools/test/golden/macro/identity_user_macro_golden.sh
- name: Macro golden — upper string
run: bash tools/test/golden/macro/upper_string_user_macro_golden.sh
- name: Macro golden — array prepend zero
run: bash tools/test/golden/macro/array_prepend_zero_user_macro_golden.sh
- name: Macro golden — array empty
run: bash tools/test/golden/macro/array_empty_user_macro_golden.sh
- name: Macro golden — array nested
run: bash tools/test/golden/macro/array_nested_user_macro_golden.sh
- name: Macro golden — array mixed
run: bash tools/test/golden/macro/array_mixed_user_macro_golden.sh
- name: Macro golden — map insert tag
run: bash tools/test/golden/macro/map_insert_tag_user_macro_golden.sh
- name: Macro golden — map multi
run: bash tools/test/golden/macro/map_multi_user_macro_golden.sh
- name: Macro golden — map escape
run: bash tools/test/golden/macro/map_esc_user_macro_golden.sh
- name: Macro golden — if then → loopform (gated)
run: bash tools/test/golden/macro/if_then_loopform_user_macro_golden.sh
# Disabled by default to keep CI light; run locally when needed
macro-smokes-lite:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: rust-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install ripgrep (for smokes)
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Build (release)
run: cargo build --release -q
- name: Smoke — match guard literal OR
run: bash tools/test/smoke/macro/match_guard_literal_or_smoke.sh
- name: Smoke — match guard type (no PeekExpr)
run: bash tools/test/smoke/macro/match_guard_type_smoke.sh
- name: Smoke — MIR hints Scope enter/leave
run: bash tools/test/smoke/mir/hints_trace_smoke.sh
- name: Smoke — MIR hints JoinResult (two vars)
run: bash tools/test/smoke/mir/hints_join_result_two_vars_smoke.sh
- name: Smoke — MIR hints JoinResult (three vars)
run: bash tools/test/smoke/mir/hints_join_result_three_vars_smoke.sh
- name: Smoke — MIR scope hints (loop+if)
run: bash tools/test/smoke/mir/hints_scope_loop_if_smoke.sh
- name: Smoke — ScopeBox enabled (no-op)
run: bash tools/test/smoke/mir/scopebox_enable_smoke.sh
- name: Smoke — Loop PHI values (then-continue)
run: bash tools/test/smoke/loop_phi_values.sh
- name: Smoke — MacroCtx JSON (ctx caps)
run: bash tools/test/smoke/macro/macro_ctx_json_smoke.sh
- name: Smoke — UTF-8 CP strings (length/indexOf/substring)
run: bash tools/test/smoke/strings/utf8_cp_smoke.sh
# Disabled by default to keep CI light; run locally when needed
llvm-phi-smoke:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: rust-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install ripgrep (for smokes)
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Build (llvm + phi)
run: |
set -euo pipefail
# llvm featurellvm-harnessはLLVM_SYS_180_PREFIX不要
cargo build --release --features "llvm,phi-legacy" -q
- name: LLVM harness — empty PHI check (batch)
env:
NYASH_MIR_NO_PHI: "0"
run: bash tools/test/smoke/llvm/ir_phi_empty_check_all.sh
# Disabled by default to keep CI light; run locally when needed
selfhost-preexpand-smoke:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: rust-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build (release)
run: cargo build --release -q
- name: Self-host preexpand (upper_string)
env:
NYASH_USE_NY_COMPILER: "1"
NYASH_VM_USE_PY: "1"
NYASH_MACRO_BOX: "1"
NYASH_MACRO_BOX_NY: "1"
NYASH_MACRO_BOX_CHILD_RUNNER: "0"
NYASH_MACRO_BOX_NY_PATHS: apps/macros/examples/upper_string_macro.nyash
run: |
set -euo pipefail
out=$(./target/release/nyash --macro-preexpand --backend vm apps/tests/macro_golden_upper_string.nyash 2>&1)
echo "$out"
echo "$out" | grep -q "HELLO"