Skip to content

[Github][CI] Add Windows Premerge Job for Testing #2747

[Github][CI] Add Windows Premerge Job for Testing

[Github][CI] Add Windows Premerge Job for Testing #2747

Workflow file for this run

name: LLVM Premerge Checks
permissions:
contents: read
on:
pull_request:
paths:
- .github/workflows/premerge.yaml
push:
branches:
- 'main'
jobs:
premerge-checks-windows:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-windows-runners
concurrency:
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
steps:
- name: Checkout LLVM
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
variant: "sccache"
- name: Build and Test
continue-on-error: true
run: |
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
echo $modified_files
echo $modified_dirs
. ./.ci/compute-projects.sh
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
if [[ "${windows_projects}" == "" ]]; then
echo "No projects to build"
exit 0
fi
echo "Building projects: ${windows_projects}"
echo "Running project checks targets: ${windows_check_targets}"
.ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"