Ensure CI/CD workflows build, test, and package artifacts in a way that is correct for each target platform/architecture—without running irrelevant jobs.
Apply these rules: 1) Prefer dedicated toolchains; avoid hardcoded compiler/arch knobs unless the workflow explicitly documents and matches the toolchain. 2) Scope CI triggers and steps by actual feature/platform support.
Concrete example (macOS per-arch Vulkan wiring):
# x86_64
CIBW_ENVIRONMENT: |
NCNN_VULKAN=ON
Vulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/include
Vulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/dylib/macOS/libMoltenVK.dylib
Concrete example (path-scoped CI triggering):
# Only run when relevant; don’t trigger for Vulkan-only subtree changes if Vulkan is off
on:
pull_request:
paths:
- '.github/workflows/windows-xp-clang.yml'
- 'CMakeLists.txt'
- 'src/*'
# Omit 'src/layer/vulkan/**' if Vulkan support is disabled
Quick validation checklist for each platform/arch:
Enter the URL of a public GitHub repository