ci: prune workflows to minimal fast-smoke only
This commit is contained in:
63
.github/workflows/box_first_guard.yml
vendored
63
.github/workflows/box_first_guard.yml
vendored
@ -1,63 +0,0 @@
|
|||||||
name: Box-First Guard (Advisory)
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
advisory-guards:
|
|
||||||
name: Advisory Box-First Checks
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true # informational for now
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install ripgrep
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y ripgrep
|
|
||||||
|
|
||||||
- name: Disallow direct env reads in jit (except config/runtime)
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
echo "Checking for std::env::var direct reads under src/jit (excluding config.rs and rt.rs)"
|
|
||||||
# find occurrences outside config.rs and rt.rs
|
|
||||||
if rg -n "std::env::var\(" src/jit | rg -v 'src/jit/(config|rt)\.rs'; then
|
|
||||||
echo "[GUARD] Found direct env reads outside jit::config/rt (advisory)."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "[OK] No direct env reads outside jit::config/rt"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Report direct env reads (global advisory)
|
|
||||||
run: |
|
|
||||||
echo "[ADVISORY] Listing direct std::env::var reads outside config aggregators..."
|
|
||||||
rg -n "std::env::var\(" src \
|
|
||||||
| rg -v 'src/jit/config\.rs|src/config/env\.rs' \
|
|
||||||
|| true
|
|
||||||
echo "[NOTE] Above is advisory; prefer using config::env or jit::config for critical flags."
|
|
||||||
|
|
||||||
- name: Prevent reintroducing removed modular builder feature (advisory)
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
if rg -n "mir_modular_builder" Cargo.toml src || true; then
|
|
||||||
echo "[GUARD] Found 'mir_modular_builder' mention (advisory). This feature was removed."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "[OK] No 'mir_modular_builder' mentions found"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Enforce single B1 ABI switch point (advisory)
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
echo "Checking unexpected B1 mentions"
|
|
||||||
# allow occurrences in known switch points
|
|
||||||
if rg -n "B1" src | rg -v 'abi_param_for_kind|returns.*types::B1|jit-b1-abi'; then
|
|
||||||
echo "[GUARD] Found unexpected B1 usage (advisory)."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "[OK] No unexpected B1 usage"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Print reminder for stats.jsonl (advisory)
|
|
||||||
run: |
|
|
||||||
echo "[NOTE] Consider emitting stats.jsonl with {function, abi_mode, reason} at least once per run."
|
|
||||||
51
.github/workflows/ci.yml
vendored
51
.github/workflows/ci.yml
vendored
@ -1,51 +0,0 @@
|
|||||||
name: nyash-ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-smoke:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (apt.llvm.org)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y wget gnupg lsb-release
|
|
||||||
wget https://apt.llvm.org/llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
|
|
||||||
- name: Set LLVM env
|
|
||||||
run: echo "LLVM_SYS_180_PREFIX=$(llvm-config-18 --prefix)" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Ensure Python3
|
|
||||||
run: sudo apt-get install -y python3
|
|
||||||
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache Rust build
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
cache-targets: true
|
|
||||||
|
|
||||||
- name: Build (LLVM feature)
|
|
||||||
run: cargo build --release --features llvm
|
|
||||||
|
|
||||||
- name: Curated LLVM smokes
|
|
||||||
run: ./tools/smokes/curated_llvm.sh
|
|
||||||
|
|
||||||
- name: Curated LLVM Stage-3 smokes
|
|
||||||
run: ./tools/smokes/curated_llvm_stage3.sh
|
|
||||||
|
|
||||||
- name: Bridge Stage-3 acceptance (JSON v0 pipe)
|
|
||||||
run: ./tools/ny_stage3_bridge_accept_smoke.sh
|
|
||||||
|
|
||||||
- name: Curated LLVM Stage-3 smokes (PHI-off)
|
|
||||||
run: ./tools/smokes/curated_llvm_stage3.sh --phi-off
|
|
||||||
|
|
||||||
36
.github/workflows/core13-pure-llvm.yml
vendored
36
.github/workflows/core13-pure-llvm.yml
vendored
@ -1,36 +0,0 @@
|
|||||||
name: Core-13 Pure CI (LLVM)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-core13-pure-llvm:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (llvm-config-18)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
|
|
||||||
- name: Run tests with Core-13 pure mode + LLVM
|
|
||||||
env:
|
|
||||||
NYASH_MIR_CORE13_PURE: "1"
|
|
||||||
run: |
|
|
||||||
export LLVM_SYS_180_PREFIX="$(llvm-config-18 --prefix)"
|
|
||||||
export LLVM_SYS_181_PREFIX="$(llvm-config-18 --prefix)"
|
|
||||||
cargo test --features llvm --all-targets --no-fail-fast
|
|
||||||
|
|
||||||
27
.github/workflows/core13-pure.yml
vendored
27
.github/workflows/core13-pure.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
name: Core-13 Pure CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-core13-pure:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Build (release)
|
|
||||||
run: cargo build --release
|
|
||||||
|
|
||||||
- name: Run tests with Core-13 pure mode
|
|
||||||
env:
|
|
||||||
NYASH_MIR_CORE13_PURE: "1"
|
|
||||||
run: cargo test --all-targets --no-fail-fast
|
|
||||||
|
|
||||||
34
.github/workflows/docs-link-check.yml
vendored
34
.github/workflows/docs-link-check.yml
vendored
@ -1,34 +0,0 @@
|
|||||||
name: docs-link-check
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '**.md'
|
|
||||||
- '.github/workflows/docs-link-check.yml'
|
|
||||||
- '.github/mlc_config.json'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '**.md'
|
|
||||||
- '.github/workflows/docs-link-check.yml'
|
|
||||||
- '.github/mlc_config.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
markdown-link-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Run markdown-link-check on docs and READMEs
|
|
||||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
||||||
with:
|
|
||||||
use-quiet-mode: 'yes'
|
|
||||||
use-verbose-mode: 'no'
|
|
||||||
config-file: '.github/mlc_config.json'
|
|
||||||
folder-path: |
|
|
||||||
docs
|
|
||||||
file-path: |
|
|
||||||
README.md
|
|
||||||
README.ja.md
|
|
||||||
CLAUDE.md
|
|
||||||
|
|
||||||
58
.github/workflows/llvm-aot-smoke.yml
vendored
58
.github/workflows/llvm-aot-smoke.yml
vendored
@ -1,58 +0,0 @@
|
|||||||
name: LLVM AOT Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'crates/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/llvm-aot-smoke.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'crates/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
llvm-aot:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_CLI_VERBOSE: '1'
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (llvm-config-18)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
|
|
||||||
- name: Run LLVM AOT smokes
|
|
||||||
run: bash tools/llvm_smoke.sh
|
|
||||||
|
|
||||||
61
.github/workflows/llvm-ny-llvmc-exe.yml
vendored
61
.github/workflows/llvm-ny-llvmc-exe.yml
vendored
@ -1,61 +0,0 @@
|
|||||||
name: llvm-ny-llvmc-exe
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master, "**" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "**" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ny-llvmc-exe:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 25
|
|
||||||
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 LLVM 18 and Python deps
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg python3-pip
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
python3 -m pip install llvmlite jsonschema
|
|
||||||
|
|
||||||
- name: Build nyash and ny-llvmc (release)
|
|
||||||
run: |
|
|
||||||
cargo build --release -j 2
|
|
||||||
cargo build --release -p nyash-llvm-compiler -j 2
|
|
||||||
cargo build --release -p nyrt -j 2
|
|
||||||
|
|
||||||
- name: EXE build+run (ternary_basic -> exit 10)
|
|
||||||
run: |
|
|
||||||
mkdir -p tmp
|
|
||||||
./target/release/nyash --emit-mir-json tmp/tb.json --backend mir apps/tests/ternary_basic.nyash
|
|
||||||
./target/release/ny-llvmc --in tmp/tb.json --emit exe --nyrt target/release --out tmp/tb
|
|
||||||
set +e; ./tmp/tb >/dev/null 2>&1; CODE=$?; set -e
|
|
||||||
echo "exit=$CODE"; test "$CODE" -eq 10
|
|
||||||
|
|
||||||
- name: EXE build+run (ternary_nested -> exit 50)
|
|
||||||
run: |
|
|
||||||
./target/release/nyash --emit-mir-json tmp/tn.json --backend mir apps/tests/ternary_nested.nyash
|
|
||||||
./target/release/ny-llvmc --in tmp/tn.json --emit exe --nyrt target/release --out tmp/tn
|
|
||||||
set +e; ./tmp/tn >/dev/null 2>&1; CODE=$?; set -e
|
|
||||||
echo "exit=$CODE"; test "$CODE" -eq 50
|
|
||||||
|
|
||||||
- name: EXE build+run (peek_expr_block -> exit 1)
|
|
||||||
run: |
|
|
||||||
./target/release/nyash --emit-mir-json tmp/pb.json --backend mir apps/tests/peek_expr_block.nyash
|
|
||||||
./target/release/ny-llvmc --in tmp/pb.json --emit exe --nyrt target/release --out tmp/pb
|
|
||||||
set +e; ./tmp/pb >/dev/null 2>&1; CODE=$?; set -e
|
|
||||||
echo "exit=$CODE"; test "$CODE" -eq 1
|
|
||||||
|
|
||||||
49
.github/workflows/llvm-ny-llvmc-obj.yml
vendored
49
.github/workflows/llvm-ny-llvmc-obj.yml
vendored
@ -1,49 +0,0 @@
|
|||||||
name: llvm-ny-llvmc-obj
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master, "**" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "**" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ny-llvmc-obj:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 25
|
|
||||||
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 LLVM 18 and Python deps
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg python3-pip
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
python3 -m pip install llvmlite
|
|
||||||
|
|
||||||
- name: Build nyash (release)
|
|
||||||
run: cargo build --release -j 2
|
|
||||||
|
|
||||||
- name: Generate object via ny-llvmc (crate path)
|
|
||||||
env:
|
|
||||||
NYASH_LLVM_COMPILER: crate
|
|
||||||
NYASH_LLVM_ONLY_OBJ: "1"
|
|
||||||
run: |
|
|
||||||
bash tools/build_llvm.sh apps/tests/hello_simple_llvm.nyash -o app
|
|
||||||
ls -la target/aot_objects
|
|
||||||
test -f target/aot_objects/hello_simple_llvm.o
|
|
||||||
|
|
||||||
- name: Print object file type
|
|
||||||
run: |
|
|
||||||
file target/aot_objects/hello_simple_llvm.o || true
|
|
||||||
|
|
||||||
58
.github/workflows/llvm-vinvoke-smoke.yml
vendored
58
.github/workflows/llvm-vinvoke-smoke.yml
vendored
@ -1,58 +0,0 @@
|
|||||||
name: LLVM VInvoke Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'crates/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/llvm-vinvoke-smoke.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'crates/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
llvm-vinvoke:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_CLI_VERBOSE: '1'
|
|
||||||
# Plugins enabled (do not set NYASH_DISABLE_PLUGINS)
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (llvm-config-18)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg build-essential libzstd-dev
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
|
|
||||||
- name: Run LLVM VInvoke + Array smoke tests
|
|
||||||
run: |
|
|
||||||
NYASH_LLVM_VINVOKE_RET_SMOKE=1 NYASH_LLVM_ARRAY_RET_SMOKE=1 ./tools/llvm_smoke.sh release
|
|
||||||
28
.github/workflows/mir-golden-ci.yml
vendored
28
.github/workflows/mir-golden-ci.yml
vendored
@ -1,28 +0,0 @@
|
|||||||
name: MIR Golden CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-compare:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Build (release)
|
|
||||||
run: cargo build --release
|
|
||||||
|
|
||||||
- name: Make tools executable
|
|
||||||
run: chmod +x tools/*.sh
|
|
||||||
|
|
||||||
- name: Compare MIR against golden snapshots
|
|
||||||
run: bash tools/ci_check_golden.sh
|
|
||||||
|
|
||||||
115
.github/workflows/nekocode-pr-analysis.yml
vendored
115
.github/workflows/nekocode-pr-analysis.yml
vendored
@ -1,115 +0,0 @@
|
|||||||
name: NekoCode PR Impact Analysis
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
branches: [main, dev]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
nekocode-analysis:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Code Impact Analysis
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout PR
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Download NekoCode
|
|
||||||
run: |
|
|
||||||
mkdir -p bin
|
|
||||||
curl -L https://github.com/moe-charm/nekocode-rust/raw/main/releases/nekocode-rust -o bin/nekocode-rust
|
|
||||||
chmod +x bin/nekocode-rust
|
|
||||||
|
|
||||||
- name: Analyze Current PR
|
|
||||||
id: analyze-pr
|
|
||||||
run: |
|
|
||||||
echo "🔍 Analyzing PR changes..."
|
|
||||||
|
|
||||||
# 🎯 修正1: パスを. (ルート)に変更
|
|
||||||
./bin/nekocode-rust analyze . --stats-only > pr_analysis.txt 2>&1
|
|
||||||
|
|
||||||
# 🎯 修正2: エラー処理を改善
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "❌ NekoCode analysis failed!"
|
|
||||||
cat pr_analysis.txt
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "📊 Analysis Results:"
|
|
||||||
cat pr_analysis.txt
|
|
||||||
|
|
||||||
# 🎯 修正3: より確実な値抽出
|
|
||||||
FILES_COUNT=$(grep -E "found [0-9]+ files" pr_analysis.txt | grep -oE "[0-9]+" || echo "0")
|
|
||||||
ANALYSIS_TIME=$(grep -E "Total.*took: [0-9.]+s" pr_analysis.txt | grep -oE "[0-9.]+s" || echo "N/A")
|
|
||||||
LANGUAGES=$(grep -A 10 "言語別:" pr_analysis.txt | grep -E "• \w+:" | wc -l || echo "1")
|
|
||||||
|
|
||||||
echo "files_analyzed=$FILES_COUNT" >> $GITHUB_OUTPUT
|
|
||||||
echo "analysis_time=$ANALYSIS_TIME" >> $GITHUB_OUTPUT
|
|
||||||
echo "languages_detected=$LANGUAGES" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Generate Impact Report
|
|
||||||
run: |
|
|
||||||
PR_FILES=${{ steps.analyze-pr.outputs.files_analyzed }}
|
|
||||||
ANALYSIS_TIME=${{ steps.analyze-pr.outputs.analysis_time }}
|
|
||||||
LANGUAGES_COUNT=${{ steps.analyze-pr.outputs.languages_detected }}
|
|
||||||
|
|
||||||
cat > impact_report.md << EOF
|
|
||||||
## 🦀 NekoCode 分析レポート
|
|
||||||
|
|
||||||
### 📊 コードの影響の概要
|
|
||||||
|
|
||||||
| メトリック | 価値 |
|
|
||||||
|-----------|------|
|
|
||||||
| **分析対象** | $(basename "$GITHUB_WORKSPACE") ディレクトリ全体 |
|
|
||||||
| **分析されたファイル** | ${PR_FILES} ファイル |
|
|
||||||
| **分析時間** | ${ANALYSIS_TIME} |
|
|
||||||
| **検出された言語** | ${LANGUAGES_COUNT}言語 |
|
|
||||||
|
|
||||||
### ✅ 分析ステータス
|
|
||||||
|
|
||||||
- **コード品質**: NekoCode分析が正常完了
|
|
||||||
- **パフォーマンス**: 分析時間 ${ANALYSIS_TIME}
|
|
||||||
- **互換性**: 検出されたファイルがエラーなしで処理完了
|
|
||||||
|
|
||||||
---
|
|
||||||
*🚀 [NekoCode](https://github.com/moe-charm/nekocode-rust)による分析*
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Comment PR
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const report = fs.readFileSync('impact_report.md', 'utf8');
|
|
||||||
|
|
||||||
const comments = await github.rest.issues.listComments({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
});
|
|
||||||
|
|
||||||
const nekocodeComment = comments.data.find(comment =>
|
|
||||||
comment.body.includes('🦀 NekoCode 分析レポート')
|
|
||||||
);
|
|
||||||
|
|
||||||
if (nekocodeComment) {
|
|
||||||
await github.rest.issues.updateComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
comment_id: nekocodeComment.id,
|
|
||||||
body: report
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await github.rest.issues.createComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
body: report
|
|
||||||
});
|
|
||||||
}
|
|
||||||
26
.github/workflows/plugin-v2-smoke.yml
vendored
26
.github/workflows/plugin-v2-smoke.yml
vendored
@ -1,26 +0,0 @@
|
|||||||
name: plugin-v2-smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master, "**" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "**" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
linux-smoke:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Run plugin v2 smoke
|
|
||||||
run: |
|
|
||||||
bash tools/plugin_v2_smoke.sh
|
|
||||||
|
|
||||||
41
.github/workflows/plugins-e2e.yml
vendored
41
.github/workflows/plugins-e2e.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
name: Plugins E2E (Linux)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, dev ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main, dev ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
plugins-e2e:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Cache cargo
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Build (release)
|
|
||||||
run: cargo build --release -j2
|
|
||||||
|
|
||||||
- name: Run E2E with plugins (Linux)
|
|
||||||
env:
|
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
NYASH_NET_LOG: "0"
|
|
||||||
run: |
|
|
||||||
cargo test --features plugins -q -- --nocapture
|
|
||||||
|
|
||||||
55
.github/workflows/pyvm-llvmlite-parity.yml
vendored
55
.github/workflows/pyvm-llvmlite-parity.yml
vendored
@ -1,55 +0,0 @@
|
|||||||
name: PyVM ↔ llvmlite Parity (Optional)
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 6 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
parity:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (llvm-config-18)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
|
|
||||||
- name: Build nyash (release)
|
|
||||||
run: cargo build --release -j 2
|
|
||||||
|
|
||||||
- name: Parity esc_dirname_smoke (PyVM vs llvmlite)
|
|
||||||
run: tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/esc_dirname_smoke.nyash --timeout 20
|
|
||||||
|
|
||||||
- name: Parity string_ops_basic (PyVM vs llvmlite)
|
|
||||||
run: tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/string_ops_basic.nyash --timeout 20
|
|
||||||
|
|
||||||
- name: Parity ternary_nested (PyVM vs llvmlite)
|
|
||||||
run: tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/ternary_nested.nyash --timeout 20
|
|
||||||
|
|
||||||
- name: Parity peek_return_value (PyVM vs llvmlite)
|
|
||||||
run: tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/peek_return_value.nyash --timeout 20
|
|
||||||
|
|
||||||
83
.github/workflows/pyvm-smoke.yml
vendored
83
.github/workflows/pyvm-smoke.yml
vendored
@ -1,83 +0,0 @@
|
|||||||
name: PyVM + Using Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'docs/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/pyvm-smoke.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pyvm-smokes:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install ripgrep
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y ripgrep
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build (release)
|
|
||||||
run: cargo build --release -j 2
|
|
||||||
|
|
||||||
- name: PyVM Stage-2 smokes
|
|
||||||
run: bash tools/pyvm_stage2_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM nested control smokes
|
|
||||||
run: bash tools/pyvm_stage2_nested_control_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM call/args smokes
|
|
||||||
run: bash tools/pyvm_stage2_call_args_smoke.sh
|
|
||||||
|
|
||||||
- name: Bridge Stage-2 (parser MVP) smokes
|
|
||||||
run: bash tools/ny_stage2_bridge_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM collections smokes
|
|
||||||
run: bash tools/pyvm_collections_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM compare smokes
|
|
||||||
run: bash tools/pyvm_stage2_compare_smoke.sh
|
|
||||||
|
|
||||||
- name: Bridge Stage-2 short-circuit smoke
|
|
||||||
run: bash tools/ny_stage2_shortcircuit_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM Stage-2 dot-chain smoke
|
|
||||||
run: bash tools/pyvm_stage2_dot_chain_smoke.sh
|
|
||||||
|
|
||||||
- name: PyVM Stage-2 new/method smoke
|
|
||||||
run: bash tools/ny_stage2_new_method_smoke.sh
|
|
||||||
|
|
||||||
- name: Selfhost using acceptance (no-op)
|
|
||||||
run: bash tools/ny_selfhost_using_smoke.sh
|
|
||||||
|
|
||||||
- name: Emitter meta.usings gate (fallback allowed)
|
|
||||||
run: bash tools/selfhost_emitter_usings_gate_smoke.sh
|
|
||||||
50
.github/workflows/selfhost-bootstrap.yml
vendored
50
.github/workflows/selfhost-bootstrap.yml
vendored
@ -1,50 +0,0 @@
|
|||||||
name: Selfhost Bootstrap Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'docs/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/selfhost-bootstrap.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'apps/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
selfhost-bootstrap:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build (release, cranelift-jit)
|
|
||||||
run: cargo build --release --features cranelift-jit -j 2
|
|
||||||
|
|
||||||
- name: Run bootstrap selfhost smoke
|
|
||||||
run: timeout -s KILL 40s bash tools/bootstrap_selfhost_smoke.sh
|
|
||||||
|
|
||||||
57
.github/workflows/selfhost-exe-first.yml
vendored
57
.github/workflows/selfhost-exe-first.yml
vendored
@ -1,57 +0,0 @@
|
|||||||
name: Selfhost EXE-first (Optional)
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 7 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
selfhost-exe-first:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 25
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Install LLVM 18 (llvm-config-18)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y curl ca-certificates lsb-release wget gnupg python3-pip
|
|
||||||
curl -fsSL https://apt.llvm.org/llvm.sh -o llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 18
|
|
||||||
llvm-config-18 --version
|
|
||||||
|
|
||||||
- name: Install llvmlite (Python)
|
|
||||||
run: |
|
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
python3 -m pip install llvmlite jsonschema
|
|
||||||
|
|
||||||
- name: Build nyash (release)
|
|
||||||
run: cargo build --release -j 2
|
|
||||||
|
|
||||||
- name: ny-llvmc dummy smoke
|
|
||||||
run: |
|
|
||||||
cargo build --release -p nyash-llvm-compiler -j 2
|
|
||||||
./target/release/ny-llvmc --dummy --out /tmp/dummy.o
|
|
||||||
file /tmp/dummy.o || true
|
|
||||||
|
|
||||||
- name: Run EXE-first smoke (parser EXE + bridge)
|
|
||||||
run: timeout -s KILL 10m bash tools/exe_first_smoke.sh
|
|
||||||
54
.github/workflows/selfhost-minimal.yml
vendored
54
.github/workflows/selfhost-minimal.yml
vendored
@ -1,54 +0,0 @@
|
|||||||
name: Selfhost Minimal Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ selfhosting-dev ]
|
|
||||||
paths:
|
|
||||||
- 'apps/selfhost-minimal/**'
|
|
||||||
- 'src/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.github/workflows/selfhost-minimal.yml'
|
|
||||||
- 'docs/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ selfhosting-dev ]
|
|
||||||
paths:
|
|
||||||
- 'apps/selfhost-minimal/**'
|
|
||||||
- 'src/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- 'docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
selfhost-minimal:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build (release, cranelift-jit)
|
|
||||||
run: cargo build --release --features cranelift-jit
|
|
||||||
|
|
||||||
- name: Run selfhost-minimal smoke
|
|
||||||
run: bash tools/selfhost_vm_smoke.sh
|
|
||||||
|
|
||||||
144
.github/workflows/smoke.yml
vendored
144
.github/workflows/smoke.yml
vendored
@ -1,144 +0,0 @@
|
|||||||
name: LLVM Curated Smoke
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'examples/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- 'docs/**'
|
|
||||||
- '.github/workflows/smoke.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'examples/**'
|
|
||||||
- 'tools/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- 'docs/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
llvm-curated:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
# Disable external plugins to keep CI deterministic
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
NYASH_LLVM_USE_HARNESS: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Run curated LLVM smokes (PHI-on)
|
|
||||||
run: bash tools/smokes/curated_llvm.sh
|
|
||||||
|
|
||||||
- name: Run curated LLVM smokes (PHI-off)
|
|
||||||
run: bash tools/smokes/curated_llvm.sh --phi-off
|
|
||||||
|
|
||||||
jit-direct-smoke:
|
|
||||||
if: false # archived: JIT path not maintained in current phase
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
profile: [debug, release]
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
# Disable external plugins to keep CI deterministic
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
# Ensure lowering runs
|
|
||||||
NYASH_JIT_THRESHOLD: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build (${{ matrix.profile }}, cranelift-jit)
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.profile }}" = "release" ]; then
|
|
||||||
cargo build --release --features cranelift-jit
|
|
||||||
else
|
|
||||||
cargo build --features cranelift-jit
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: JIT-direct smoke: mir-branch-ret
|
|
||||||
run: |
|
|
||||||
BIN=./target/${{ matrix.profile }}/nyash
|
|
||||||
timeout 15s "$BIN" --jit-direct apps/tests/mir-branch-ret/main.nyash
|
|
||||||
|
|
||||||
- name: JIT-direct smoke: mir-phi-min
|
|
||||||
run: |
|
|
||||||
BIN=./target/${{ matrix.profile }}/nyash
|
|
||||||
timeout 15s "$BIN" --jit-direct apps/tests/mir-phi-min/main.nyash
|
|
||||||
|
|
||||||
- name: JIT-direct smoke: mir-branch-multi
|
|
||||||
run: |
|
|
||||||
BIN=./target/${{ matrix.profile }}/nyash
|
|
||||||
timeout 15s "$BIN" --jit-direct apps/tests/mir-branch-multi/main.nyash
|
|
||||||
|
|
||||||
smoke-compile-events:
|
|
||||||
if: false # archived: JIT compile-events not maintained in current phase
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
NYASH_DISABLE_PLUGINS: '1'
|
|
||||||
NYASH_JIT_EVENTS_COMPILE: '1'
|
|
||||||
NYASH_JIT_HOSTCALL: '1'
|
|
||||||
NYASH_JIT_EVENTS_PATH: events.jsonl
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Rust (stable)
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache cargo registry and build
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --release -j2 --features cranelift-jit
|
|
||||||
|
|
||||||
- name: Run HH example (compile events)
|
|
||||||
run: ./target/release/nyash --backend vm examples/jit_map_get_param_hh.nyash
|
|
||||||
|
|
||||||
- name: Verify events contain phase:lower
|
|
||||||
run: |
|
|
||||||
test -f events.jsonl
|
|
||||||
grep -q '"phase":"lower"' events.jsonl
|
|
||||||
41
.github/workflows/vm-jit-identical.yml
vendored
41
.github/workflows/vm-jit-identical.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
name: VM-JIT Identical Execution
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
strict: ["0", "1"]
|
|
||||||
vt: ["0", "1"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
- name: Cargo test (subset, with JIT feature)
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: "-C debuginfo=0"
|
|
||||||
NYASH_ABI_STRICT: ${{ matrix.strict }}
|
|
||||||
NYASH_ABI_VTABLE: ${{ matrix.vt }}
|
|
||||||
NYASH_JIT_HOST_BRIDGE: "1"
|
|
||||||
NYASH_EXTERN_ROUTE_SLOTS: "1"
|
|
||||||
NYASH_VM_PIC_THRESHOLD: "8"
|
|
||||||
run: |
|
|
||||||
cargo test --features cranelift-jit \
|
|
||||||
src/tests/identical_exec.rs \
|
|
||||||
src/tests/identical_exec_collections.rs \
|
|
||||||
src/tests/identical_exec_string.rs \
|
|
||||||
src/tests/identical_exec_instance.rs \
|
|
||||||
src/tests/vtable_array_string.rs \
|
|
||||||
src/tests/vtable_strict.rs \
|
|
||||||
src/tests/host_reverse_slot.rs \
|
|
||||||
-- --nocapture
|
|
||||||
29
.github/workflows/vm-legacy-build.yml
vendored
29
.github/workflows/vm-legacy-build.yml
vendored
@ -1,29 +0,0 @@
|
|||||||
name: vm-legacy-build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- 'Cargo.toml'
|
|
||||||
- '.github/workflows/vm-legacy-build.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-vm-legacy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 20
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Cache Rust build
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
cache-targets: true
|
|
||||||
|
|
||||||
- name: Build with vm-legacy + interpreter-legacy (compile check only)
|
|
||||||
run: cargo build --release --features vm-legacy,interpreter-legacy
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user