Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions .github/workflows/multi_arch_build_windows_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,36 @@ jobs:
rm -fv patches/amd-mainline/llvm-project/0009-Add-gcc-toolset-13-prefix-detection.patch
rm -fv patches/amd-mainline/llvm-project/0001-Ensure-to-use-libamdhip64-with-major-version.patch

- name: Fix LLVM test variable mismatch
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
sed -i 's/THEROCK_ENABLE_LLVM_TESTS/THEROCK_BUILD_LLVM_TESTS/g' \
cmake/therock_subproject.cmake compiler/CMakeLists.txt

- name: Auto-forward THEROCK_BUILD_COMGR_TESTS to subprojects
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
sed -i '/^ THEROCK_BUILD_TESTING$/a\ THEROCK_BUILD_COMGR_TESTS' \
cmake/therock_subproject.cmake

- name: Enable COMGR tests via THEROCK_BUILD_TESTING fallback
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
sed -i 's/if(THEROCK_BUILD_COMGR_TESTS)/if(THEROCK_BUILD_COMGR_TESTS OR THEROCK_BUILD_TESTING)/' \
compiler/pre_hook_amd-comgr.cmake

- name: Remove llvm-lit install/wrapper code (fails on Windows)
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
sed -i '/Install llvm-lit script/,/^ ")/d' \
compiler/pre_hook_amd-llvm.cmake

- name: Skip hip-tests on Windows (ROCm root not available)
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
sed -i '/^ if(THEROCK_BUILD_TESTING)/,/^ endif(THEROCK_BUILD_TESTING)/d' \
core/CMakeLists.txt

#- name: Setup ccache
# run: |
# ./build_tools/setup_ccache.py \
Expand Down Expand Up @@ -331,15 +361,16 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
${{ inputs.build_variant_cmake_preset && format('--preset={0}', inputs.build_variant_cmake_preset) }} \
${{ steps.stage_config.outputs.cmake_args }} \
${{ env.extra_cmake_options }}
${{ env.extra_cmake_options }} \
${{ inputs.stage_name == 'compiler-runtime' && '-DTHEROCK_BUILD_COMGR_TESTS=ON -DTHEROCK_BUILD_TESTING=ON' || '-DTHEROCK_BUILD_TESTING=OFF' }}

- name: Configure All Projects
if: ${{ github.event_name != 'pull_request' && inputs.test_type == 'full' }}
env:
cmake_preset: ${{ inputs.build_variant_cmake_preset }}
amdgpu_families: ${{ inputs.amdgpu_families }}
package_version: ${{ inputs.package_version }}
extra_cmake_options: ${{ inputs.extra_cmake_options }}
extra_cmake_options: "${{ inputs.extra_cmake_options }}"
run: |
# clear cache before build and after download
cd L:
Expand All @@ -351,14 +382,27 @@ jobs:
-DTHEROCK_AMDGPU_FAMILIES=gfx1151 \
-DTHEROCK_BACKGROUND_BUILD_JOBS=4 \
${{ inputs.build_variant_cmake_preset && format('--preset={0}', inputs.build_variant_cmake_preset) }} \
${{ steps.stage_config.outputs.cmake_args }}
${{ steps.stage_config.outputs.cmake_args }} \
${{ inputs.stage_name == 'compiler-runtime' && '-DTHEROCK_BUILD_COMGR_TESTS=ON -DTHEROCK_BUILD_TESTING=ON' || '-DTHEROCK_BUILD_TESTING=OFF' }}

- name: Build stage
run: |
cd L:
python build_tools/memory_monitor.py --phase Build -- \
cmake --build "${BUILD_DIR}" --target stage-${STAGE_NAME} therock-artifacts -- -k 0

- name: COMGR Lit Tests
if: ${{ inputs.stage_name == 'compiler-runtime' }}
continue-on-error: true
run: |
python "${BUILD_DIR}"/compiler/amd-llvm/build/bin/llvm-lit.py \
"${BUILD_DIR}"/compiler/amd-comgr/build/test-lit -v

- name: COMGR CTest
if: ${{ inputs.stage_name == 'compiler-runtime' }}
run: |
ctest --test-dir "${BUILD_DIR}"/compiler/amd-comgr/build --output-on-failure

- name: Report
if: ${{ !cancelled() }}
run: |
Expand Down
Loading