Squash 147 commits (2026-08-20 through 2026-08-31) into one change on top of the exact-kernel-grid work. Covers native lowering and pointer/layout construction, AIR intrinsic and funnel-shift coverage, BDA address preservation across aggregate calls, CFG structurization, function-constant and visible-function specialization, the 30-second translation ceiling, the authored-case corpus and linkage validation suite, and refreshed byte-exact MoltenVK evidence. The kernel-grid lowering in this tree supersedes the 324-line variant in the parent commit; that file is reduced to its current 139-line form here. Resulting tree is identical to 7174c7b. Prior history remains reachable at tag pre-squash-backup and branch backup/pre-squash-7174c7b. Claude-Session: https://claude.ai/code/session_01D1u4vU7Mr5QNWrnnRHC8iS
112 lines
4.1 KiB
YAML
112 lines
4.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
# Fail the job on any rustc warning (unused imports, dead_code, etc.).
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
jobs:
|
|
test:
|
|
name: test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Pin major OS images (not *-latest). Labels from actions/runner-images:
|
|
# ubuntu-26.04 — Ubuntu 26.04 LTS
|
|
# macos-26 — macOS 26 (arm64 GitHub-hosted runner)
|
|
os: [ubuntu-26.04, macos-26]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache cargo
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install LLVM + SPIR-V tools (Ubuntu)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
set -euo pipefail
|
|
sudo apt-get update
|
|
# llvm: llvm-dis; spirv-tools: spirv-val + the product passthrough path's spirv-as.
|
|
# Keep lavapipe available for explicit
|
|
# corpus-vulkan qualification on GPU-less Linux runners.
|
|
sudo apt-get install -y llvm spirv-tools mesa-vulkan-drivers libvulkan1
|
|
command -v llvm-dis
|
|
command -v spirv-val
|
|
command -v spirv-as
|
|
# Fail setup early if an explicit corpus-vulkan run would have no ICD.
|
|
shopt -s nullglob
|
|
icds=(/usr/share/vulkan/icd.d/*.json /etc/vulkan/icd.d/*.json)
|
|
echo "Vulkan ICDs: ${icds[*]:-none}"
|
|
test "${#icds[@]}" -gt 0
|
|
|
|
- name: Install LLVM + SPIR-V tools (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
set -euo pipefail
|
|
brew install llvm spirv-tools
|
|
# llvm is keg-only: not linked into /opt/homebrew/bin. GITHUB_PATH only
|
|
# affects *later* steps, so export PATH here before command -v probes.
|
|
export PATH="/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin:${PATH}"
|
|
echo "/opt/homebrew/opt/llvm/bin" >> "$GITHUB_PATH"
|
|
echo "/usr/local/opt/llvm/bin" >> "$GITHUB_PATH"
|
|
echo "/opt/homebrew/bin" >> "$GITHUB_PATH"
|
|
command -v llvm-dis
|
|
command -v spirv-val
|
|
command -v spirv-as
|
|
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
# clippy --all-targets typechecks the workspace; no separate cargo build step.
|
|
- name: Clippy (warnings denied)
|
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
- name: Build public documentation (warnings denied)
|
|
env:
|
|
RUSTDOCFLAGS: -Dwarnings
|
|
run: cargo doc --workspace --all-features --no-deps
|
|
|
|
- name: Test metal2vulkan
|
|
run: cargo test -p metal2vulkan
|
|
|
|
- name: Test validation suite
|
|
run: cargo test -p metal2vulkan-validation
|
|
|
|
# Machine-specific semantic qualification remains explicit. Linux CI has lavapipe, so it can
|
|
# execute the owned public cases against their exact committed Metal observations without a
|
|
# physical GPU. Rows written here are ephemeral CI evidence, not committed environment slots.
|
|
- name: Qualify public cases on native Vulkan (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
set -euo pipefail
|
|
cargo build -p metal2vulkan-validation --bins
|
|
for case_id in \
|
|
d9ce86618e0924966fbb1e7de63761ef471bb6e85b592a70193a26375ec0423f \
|
|
4659fedddd1695fba79c3faa797ec3be647e3fd1a87ecec23bde55ccbfbcf656 \
|
|
1e54315eb0ffcac633d4992c577f3e6ac384ed1bdf2321887c1f37242c00c887
|
|
do
|
|
target/debug/corpus-vulkan \
|
|
--case-id "$case_id" \
|
|
--metal-environment-id apple-m2-macos26.5.2 \
|
|
--environment-id ubuntu-26.04-lavapipe
|
|
done
|
|
target/debug/corpus-index
|
|
target/debug/corpus-index --check
|
|
status=$(target/debug/corpus-status --limit 20)
|
|
echo "$status"
|
|
if grep -Eq 'vulkan=(missing|stale|failed)' <<<"$status"; then
|
|
echo "native Vulkan qualification is incomplete" >&2
|
|
exit 1
|
|
fi
|