|
63 | 63 | clang: git build-essential pkg-config python3 curl openjdk-11-jdk pkg-config libncurses-dev libxml2-utils libxml2-dev
|
64 | 64 | msvc: ''
|
65 | 65 | extra-values: |
|
66 |
| - llvm-hash: e1065370aaacb1b1cb48e77d37d376bf024f4a39 |
| 66 | + llvm-hash: dd7a3d4d798e30dfe53b5bbbbcd9a23c24ea1af9 |
67 | 67 | llvm-id: {{ substr llvm-hash 0 7 }}
|
68 | 68 | llvm-build-preset-prefix: {{#if optimized-debug}}debwithopt{{else}}{{lowercase build-type}}{{/if}}
|
69 | 69 | llvm-build-preset-suffix: {{#if (ieq os 'windows') }}win{{else}}unix{{/if}}
|
|
74 | 74 | llvm-archive-basename: llvm-{{ os }}-{{ llvm-build-preset-prefix }}-{{ llvm-id }}
|
75 | 75 | llvm-archive-extension: {{#if (ieq os 'windows') }}7z{{else}}tar.bz2{{/if}}
|
76 | 76 | llvm-archive-filename: {{ llvm-archive-basename }}.{{ llvm-archive-extension }}
|
77 |
| - libcxx-runtimes: libcxx;libcxxabi{{#if (ine os 'windows') }};libunwind{{/if}} |
78 |
| - libcxx-targets: cxx {{#if (ine os 'windows') }}cxxabi unwind{{/if}} install-cxx {{#if (ine os 'windows') }}install-cxxabi install-unwind{{/if}} |
79 |
| - libcxx-cxxflags: {{#if (ieq os 'windows') }}-D__ORDER_LITTLE_ENDIAN__=1234 -D__ORDER_BIG_ENDIAN__=4321 -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__{{/if}} |
80 |
| - libcxx-cmake-args: -D LLVM_ENABLE_RUNTIMES="{{ libcxx-runtimes }}" {{#if (ieq os 'windows') }}-D LIBCXXABI_USE_LLVM_UNWINDER=OFF -D LIBCXXABI_ENABLE_SHARED=OFF -D LIBCXXABI_ENABLE_STATIC=ON -D LIBCXX_ENABLE_SHARED=OFF -D LIBCXX_NO_VCRUNTIME=ON{{/if}} {{#if (ieq os 'macos') }}-D CMAKE_OSX_ARCHITECTURES=""{{/if}} |
81 | 77 | mrdocs-ccflags: {{ ccflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
|
82 | 78 | mrdocs-cxxflags: {{ cxxflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
|
83 | 79 | mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
|
@@ -178,6 +174,81 @@ jobs:
|
178 | 174 | with:
|
179 | 175 | apt-get: ${{ matrix.install }}
|
180 | 176 |
|
| 177 | + - name: Resolve LLVM Root |
| 178 | + id: resolve-llvm-root |
| 179 | + run: | |
| 180 | + set -x |
| 181 | + cd .. |
| 182 | + llvm_root=$(pwd)/third-party/llvm-project/install |
| 183 | + if [[ ${{ runner.os }} == 'Windows' ]]; then |
| 184 | + llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g') |
| 185 | + llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|') |
| 186 | + echo "$llvm_root" |
| 187 | + fi |
| 188 | + echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT |
| 189 | +
|
| 190 | + - name: Cached LLVM Binaries |
| 191 | + id: llvm-cache |
| 192 | + uses: actions/cache@v4 |
| 193 | + with: |
| 194 | + path: ${{ steps.resolve-llvm-root.outputs.llvm-root }} |
| 195 | + key: ${{ matrix.llvm-cache-key }} |
| 196 | + |
| 197 | + - name: Download LLVM Binaries |
| 198 | + id: llvm-download |
| 199 | + if: steps.llvm-cache.outputs.cache-hit != 'true' |
| 200 | + run: | |
| 201 | + set -x |
| 202 | + url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }} |
| 203 | + http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url") |
| 204 | + if [ "$http_status" -eq 200 ]; then |
| 205 | + found="true" |
| 206 | + echo "found=$found" >> $GITHUB_OUTPUT |
| 207 | + curl -L -o ${{ matrix.llvm-archive-filename }} "$url" |
| 208 | + install_prefix=$(pwd)/../third-party/llvm-project/install |
| 209 | + mkdir -p $install_prefix |
| 210 | + if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then |
| 211 | + 7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix |
| 212 | + else |
| 213 | + tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix |
| 214 | + fi |
| 215 | + if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then |
| 216 | + single_dir=$(ls -1 $install_prefix) |
| 217 | + if [[ -d $install_prefix/$single_dir ]]; then |
| 218 | + mv $install_prefix/$single_dir/* $install_prefix/ |
| 219 | + rmdir $install_prefix/$single_dir |
| 220 | + fi |
| 221 | + fi |
| 222 | + else |
| 223 | + found="false" |
| 224 | + echo "found=$found" >> $GITHUB_OUTPUT |
| 225 | + fi |
| 226 | +
|
| 227 | + - name: Install LLVM |
| 228 | + uses: alandefreitas/cpp-actions/[email protected] |
| 229 | + if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true' |
| 230 | + with: |
| 231 | + cmake-version: '>=3.26' |
| 232 | + source-dir: ../third-party/llvm-project/llvm |
| 233 | + git-repository: https://github.com/llvm/llvm-project.git |
| 234 | + git-tag: ${{ matrix.llvm-hash }} |
| 235 | + download-dir: ../third-party/llvm-project |
| 236 | + patches: | |
| 237 | + ./third-party/llvm/CMakePresets.json |
| 238 | + ./third-party/llvm/CMakeUserPresets.json |
| 239 | + build-dir: ${sourceDir}/llvm/build |
| 240 | + preset: ${{ matrix.llvm-build-preset }} |
| 241 | + build-type: ${{ matrix.build-type }} |
| 242 | + extra-args: | |
| 243 | + ${{ runner.os == 'Windows' && '-DLLVM_ENABLE_RUNTIMES=libcxx' || '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind' }} |
| 244 | + cc: ${{ steps.setup-cpp.outputs.cc }} |
| 245 | + cxx: ${{ steps.setup-cpp.outputs.cxx }} |
| 246 | + generator: Ninja |
| 247 | + install: true |
| 248 | + install-prefix: ${sourceDir}/../install |
| 249 | + run-tests: false |
| 250 | + trace-commands: true |
| 251 | + |
181 | 252 | - name: Install Duktape
|
182 | 253 | uses: alandefreitas/cpp-actions/[email protected]
|
183 | 254 | with:
|
@@ -270,97 +341,6 @@ jobs:
|
270 | 341 | run-tests: false
|
271 | 342 | trace-commands: true
|
272 | 343 |
|
273 |
| - - name: Resolve LLVM Root |
274 |
| - id: resolve-llvm-root |
275 |
| - run: | |
276 |
| - set -x |
277 |
| - cd .. |
278 |
| - llvm_root=$(pwd)/third-party/llvm-project/install |
279 |
| - if [[ ${{ runner.os }} == 'Windows' ]]; then |
280 |
| - llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g') |
281 |
| - llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|') |
282 |
| - echo "$llvm_root" |
283 |
| - fi |
284 |
| - echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT |
285 |
| -
|
286 |
| - - name: Cached LLVM Binaries |
287 |
| - id: llvm-cache |
288 |
| - uses: actions/cache@v4 |
289 |
| - with: |
290 |
| - path: ${{ steps.resolve-llvm-root.outputs.llvm-root }} |
291 |
| - key: ${{ matrix.llvm-cache-key }} |
292 |
| - |
293 |
| - - name: Download LLVM Binaries |
294 |
| - id: llvm-download |
295 |
| - if: steps.llvm-cache.outputs.cache-hit != 'true' |
296 |
| - run: | |
297 |
| - set -x |
298 |
| - url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }} |
299 |
| - http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url") |
300 |
| - if [ "$http_status" -eq 200 ]; then |
301 |
| - found="true" |
302 |
| - echo "found=$found" >> $GITHUB_OUTPUT |
303 |
| - curl -L -o ${{ matrix.llvm-archive-filename }} "$url" |
304 |
| - install_prefix=$(pwd)/../third-party/llvm-project/install |
305 |
| - mkdir -p $install_prefix |
306 |
| - if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then |
307 |
| - 7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix |
308 |
| - else |
309 |
| - tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix |
310 |
| - fi |
311 |
| - if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then |
312 |
| - single_dir=$(ls -1 $install_prefix) |
313 |
| - if [[ -d $install_prefix/$single_dir ]]; then |
314 |
| - mv $install_prefix/$single_dir/* $install_prefix/ |
315 |
| - rmdir $install_prefix/$single_dir |
316 |
| - fi |
317 |
| - fi |
318 |
| - else |
319 |
| - found="false" |
320 |
| - echo "found=$found" >> $GITHUB_OUTPUT |
321 |
| - fi |
322 |
| -
|
323 |
| - - name: Install LLVM |
324 |
| - uses: alandefreitas/cpp-actions/[email protected] |
325 |
| - if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true' |
326 |
| - with: |
327 |
| - cmake-version: '>=3.26' |
328 |
| - source-dir: ../third-party/llvm-project/llvm |
329 |
| - git-repository: https://github.com/llvm/llvm-project.git |
330 |
| - git-tag: ${{ matrix.llvm-hash }} |
331 |
| - download-dir: ../third-party/llvm-project |
332 |
| - patches: | |
333 |
| - ./third-party/llvm/CMakePresets.json |
334 |
| - ./third-party/llvm/CMakeUserPresets.json |
335 |
| - build-dir: ${sourceDir}/llvm/build |
336 |
| - preset: ${{ matrix.llvm-build-preset }} |
337 |
| - build-type: ${{ matrix.build-type }} |
338 |
| - cc: ${{ steps.setup-cpp.outputs.cc }} |
339 |
| - cxx: ${{ steps.setup-cpp.outputs.cxx }} |
340 |
| - install: true |
341 |
| - install-prefix: ${sourceDir}/../install |
342 |
| - run-tests: false |
343 |
| - trace-commands: true |
344 |
| - |
345 |
| - - name: Install LibC++ |
346 |
| - uses: alandefreitas/cpp-actions/[email protected] |
347 |
| - if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true' |
348 |
| - with: |
349 |
| - cmake-version: '>=3.26' |
350 |
| - source-dir: ../third-party/llvm-project/runtimes |
351 |
| - build-dir: ${sourceDir}/build-libcxx |
352 |
| - build-target: ${{ matrix.libcxx-targets }} |
353 |
| - # MrDocs will only use the LibC++ headers: any compiler that works in this workflow will do |
354 |
| - cc: ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cc || '../third-party/llvm-project/install/bin/clang' }} |
355 |
| - cxx: ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cxx || '../third-party/llvm-project/install/bin/clang++' }} |
356 |
| - cxxflags: ${{ matrix.libcxx-cxxflags }} |
357 |
| - generator: Ninja |
358 |
| - extra-args: ${{ matrix.libcxx-cmake-args }} |
359 |
| - install: true |
360 |
| - install-prefix: ${sourceDir}/../install |
361 |
| - run-tests: false |
362 |
| - trace-commands: true |
363 |
| - |
364 | 344 | - name: Install Node.js
|
365 | 345 | uses: actions/setup-node@v4
|
366 | 346 | with:
|
|
0 commit comments