From f958bbb4f4548b05489a46e05e342639b0cc5b54 Mon Sep 17 00:00:00 2001 From: gyt Date: Thu, 9 Jul 2026 13:36:23 -0400 Subject: [PATCH] ci: add GKERN build and analysis workflow --- .github/workflows/build.yml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b79a84b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: GKERN CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + analyze: + runs-on: ubuntu-latest + name: Code Analysis + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env + rustc --version + + - name: Check Rust files + run: | + source $HOME/.cargo/env + echo "=== Rust source files ===" + find . -name "*.rs" | head -20 + echo "" + echo "=== C source files ===" + find . -name "*.c" -o -name "*.h" | head -20 + echo "" + echo "=== File counts ===" + echo "Rust files: $(find . -name '*.rs' | wc -l)" + echo "C files: $(find . -name '*.c' | wc -l)" + echo "Header files: $(find . -name '*.h' | wc -l)" + echo "Python files: $(find . -name '*.py' | wc -l)" + + - name: Syntax check Rust + run: | + source $HOME/.cargo/env + echo "=== Checking Rust syntax ===" + for f in $(find . -name "*.rs" -not -path "*/isa/*" -not -path "*/isa2/*" | head -5); do + echo "Checking $f..." + rustfmt --check "$f" 2>&1 || true + done + + - name: Run benchmarks (dry run) + run: | + echo "=== Benchmark suite ===" + ls -la benchmark_suite/ + echo "" + echo "=== Benchmark scripts ===" + for f in benchmark_suite/*.py; do + echo "--- $f ---" + head -10 "$f" + echo "" + done