|
10 | 10 | push:
|
11 | 11 | branches:
|
12 | 12 | - 'main'
|
| 13 | + - 'release/**' |
13 | 14 |
|
14 | 15 | jobs:
|
15 | 16 | premerge-checks-linux:
|
@@ -132,3 +133,72 @@ jobs:
|
132 | 133 | call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
|
133 | 134 | bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
|
134 | 135 |
|
| 136 | + permerge-check-macos: |
| 137 | + runs-on: macos-14 |
| 138 | + concurrency: |
| 139 | + group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }} |
| 140 | + cancel-in-progress: true |
| 141 | + if: >- |
| 142 | + (startswith(github.ref_name, 'release/') || |
| 143 | + startswith(github.base_ref, 'refs/heads/release/')) |
| 144 | + steps: |
| 145 | + - name: Checkout LLVM |
| 146 | + uses: actions/checkout@v4 |
| 147 | + with: |
| 148 | + fetch-depth: 2 |
| 149 | + - name: Setup ccache |
| 150 | + uses: hendrikmuhs/[email protected] |
| 151 | + with: |
| 152 | + max-size: "2000M" |
| 153 | + - name: Install Ninja |
| 154 | + uses: llvm/actions/install-ninja@main |
| 155 | + - name: Build and Test |
| 156 | + run: | |
| 157 | + modified_files=$(git diff --name-only HEAD~1...HEAD) |
| 158 | + modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u) |
| 159 | +
|
| 160 | + echo $modified_files |
| 161 | + echo $modified_dirs |
| 162 | +
|
| 163 | + . ./.ci/compute-projects.sh |
| 164 | +
|
| 165 | + all_projects="clang clang-tools-extra lld lldb llvm mlir" |
| 166 | + modified_projects="$(keep-modified-projects ${all_projects})" |
| 167 | +
|
| 168 | + # We have to disable the runtimes builds due to https://github.com/llvm/llvm-project/issues/90568 |
| 169 | + # and the lldb tests depend on libcxx, so we need to skip them. |
| 170 | + mac_check_targets=$(check-targets ${modified_projects} | sort | uniq | tr '\n' ' ' | sed -e 's/check-lldb //g') |
| 171 | + mac_projects=$(add-dependencies ${modified_projects} | sort | uniq | tr '\n' ' ') |
| 172 | +
|
| 173 | + mac_runtimes_to_test=$(compute-runtimes-to-test ${modified_projects}) |
| 174 | + mac_runtime_check_targets=$(check-targets ${mac_runtimes_to_test} | sort | uniq | tr '\n' ' ') |
| 175 | + mac_runtimes=$(echo ${mac_runtimes_to_test} | tr ' ' '\n' | sort | uniq | tr '\n' ' ') |
| 176 | +
|
| 177 | + if [[ "${mac_projects}" == "" ]]; then |
| 178 | + echo "No projects to build" |
| 179 | + exit 0 |
| 180 | + fi |
| 181 | +
|
| 182 | + echo "Projects to test: ${modified_projects}" |
| 183 | + echo "Runtimes to test: ${mac_runtimes_to_test}" |
| 184 | + echo "Building projects: ${mac_projects}" |
| 185 | + echo "Running project checks targets: ${mac_check_targets}" |
| 186 | + echo "Building runtimes: ${mac_runtimes}" |
| 187 | + echo "Running runtimes checks targets: ${mac_runtime_check_targets}" |
| 188 | +
|
| 189 | + # -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for |
| 190 | + # https://github.com/llvm/llvm-project/issues/81967 |
| 191 | + # Disable sharding in lit so that the LIT_XFAIL environment var works. |
| 192 | + cmake -G Ninja \ |
| 193 | + -B build \ |
| 194 | + -S llvm \ |
| 195 | + -DLLVM_ENABLE_PROJECTS="$(echo ${mac_projects} | tr ' ' ';')" \ |
| 196 | + -DLLVM_DISABLE_ASSEMBLY_FILES=ON \ |
| 197 | + -DCMAKE_BUILD_TYPE=Release \ |
| 198 | + -DLLDB_INCLUDE_TESTS=OFF \ |
| 199 | + -DLLVM_ENABLE_ASSERTIONS=ON \ |
| 200 | + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ |
| 201 | + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
| 202 | +
|
| 203 | + # The libcxx tests fail, so we are skipping the runtime targets. |
| 204 | + ninja -C build $mac_check_targets |
0 commit comments