diff --git a/.ci/exclude.txt b/.ci/exclude.txt new file mode 100644 index 00000000..52efc8e5 --- /dev/null +++ b/.ci/exclude.txt @@ -0,0 +1,2 @@ +# CTest exclude patterns. Each entry links to an upstream issue. +# Fix the test, then remove the entry. diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml new file mode 100644 index 00000000..82796055 --- /dev/null +++ b/.github/workflows/presubmit.yml @@ -0,0 +1,56 @@ +name: Presubmit + +on: + pull_request: + paths-ignore: "docs/**" + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + meatloaf-x64-intel: + runs-on: [self-hosted, Linux, X64] + env: + CHIP_MODULE_CACHE_DIR: "" + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 1 + - name: Build and test + shell: bash + run: | + set -e + if [ -f "$HOME/.local/init/bash" ]; then + export MODULESHOME=$HOME/.local + source "$MODULESHOME/init/bash" + elif [ -f /etc/profile.d/lmod.sh ]; then + source /etc/profile.d/lmod.sh + else + source /etc/profile.d/modules.sh + fi + module use /space/pvelesko/modulefiles + module load oneapi/2025.0.4 llvm/22.0-native HIP/chipStar/main level-zero/dgpu HIP/rocPRIM/2026.04.08 HIP/hipCUB/2026.04.08 HIP/rocThrust/2026.04.08 + module list + rm -rf ~/.cache/chipStar build + cmake -S . -B build \ + -DCMAKE_CXX_COMPILER="$(which hipcc)" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=OFF \ + -DAMDGPU_TEST_TARGETS="" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + cmake --build build -j 8 + if [ -f .ci/exclude.txt ]; then + exclude=$(grep -Ev '^\s*(#|$)' .ci/exclude.txt | paste -sd '|' - || true) + fi + cd build + ctest --output-on-failure --timeout 300 ${exclude:+-E "$exclude"} + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: ctest-logs-meatloaf + path: build/Testing/**/LastTest*.log + if-no-files-found: ignore