@@ -37,22 +37,26 @@ jobs:
37
37
gcc 14
38
38
clang 18
39
39
msvc >=14.40
40
+ apple-clang *
40
41
standards : ' 20'
41
- latest-factors : ' '
42
- factors : |
42
+ latest-factors : |
43
43
msvc Optimized-Debug
44
+ factors : ' '
45
+ runs-on : |
46
+ apple-clang: macos-15
44
47
build-types : |
45
48
gcc: Release
46
49
clang: Release
50
+ apple-clang: Release
47
51
msvc: RelWithDebInfo
48
52
msvc Optimized-Debug: Debug
49
53
ccflags : |
50
54
msvc Optimized-Debug: /Ob1 /O2 /Zi
51
55
cxxflags : |
52
56
msvc Optimized-Debug: /Ob1 /O2 /Zi
53
57
install : |
54
- gcc: git build-essential pkg-config python3 curl openjdk-11-jdk ninja-build pkg-config libncurses-dev libxml2-utils libxml2-dev
55
- clang: git build-essential pkg-config python3 curl openjdk-11-jdk ninja-build pkg-config libncurses-dev libxml2-utils libxml2-dev
58
+ gcc: git build-essential pkg-config python3 curl openjdk-11-jdk pkg-config libncurses-dev libxml2-utils libxml2-dev
59
+ clang: git build-essential pkg-config python3 curl openjdk-11-jdk pkg-config libncurses-dev libxml2-utils libxml2-dev
56
60
msvc: ''
57
61
extra-values : |
58
62
llvm-hash: e1065370aaacb1b1cb48e77d37d376bf024f4a39
68
72
llvm-archive-filename: {{ llvm-archive-basename }}.{{ llvm-archive-extension }}
69
73
libcxx-runtimes: libcxx;libcxxabi{{#if (ine os 'windows') }};libunwind{{/if}}
70
74
libcxx-targets: cxx {{#if (ine os 'windows') }}cxxabi unwind{{/if}} install-cxx {{#if (ine os 'windows') }}install-cxxabi install-unwind{{/if}}
75
+ libcxx-cxxflags: {{#if (ieq os 'windows') }}-D__ORDER_LITTLE_ENDIAN__=1234 -D__ORDER_BIG_ENDIAN__=4321 -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__{{/if}}
76
+ 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}}
71
77
mrdocs-ccflags: {{ ccflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
72
78
mrdocs-cxxflags: {{ cxxflags }} {{#if (eq compiler 'gcc') }}-static{{/if}} {{#if asan }}-static-libasan{{/if}} {{#if tsan }}-static-libtsan{{/if}}
73
79
mrdocs-package-generators: {{#if (ieq os 'windows') }}7Z ZIP WIX{{else}}TGZ TXZ{{/if}}
@@ -131,8 +137,7 @@ jobs:
131
137
trace-commands : ' true'
132
138
133
139
- name : Setup Ninja
134
- uses : seanmiddleditch/gha-setup-ninja@v4
135
- if : ${{ runner.os == 'Windows' }}
140
+ uses : seanmiddleditch/gha-setup-ninja@v5
136
141
137
142
- name : Setup C++
138
143
uses :
alandefreitas/cpp-actions/[email protected]
@@ -141,6 +146,15 @@ jobs:
141
146
compiler : ${{ matrix.compiler }}
142
147
version : ${{ matrix.version }}
143
148
149
+ # If apple-clang on macos, we run `clang -print-targets` to
150
+ # get the list of targets supported by the compiler.
151
+ - name : Print Clang Targets
152
+ if : matrix.compiler == 'apple-clang'
153
+ run : |
154
+ set -x
155
+ ${{ steps.setup-cpp.outputs.cxx }} --print-targets
156
+ ${{ steps.setup-cpp.outputs.cxx }} --print-target-triple
157
+
144
158
- name : Install System Packages
145
159
uses :
alandefreitas/cpp-actions/[email protected]
146
160
if : matrix.compiler != 'msvc'
@@ -323,24 +337,19 @@ jobs:
323
337
source-dir : ../third-party/llvm-project/runtimes
324
338
build-dir : ${sourceDir}/build-libcxx
325
339
build-target : ${{ matrix.libcxx-targets }}
326
- cc : ../third-party/llvm-project/install/bin/clang
327
- cxx : ../third-party/llvm-project/install/bin/clang++
328
- cxxflags : ${{ runner.os == 'Windows' && '-D__ORDER_LITTLE_ENDIAN__=1234 -D__ORDER_BIG_ENDIAN__=4321 -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__' || '' }}
340
+ # MrDocs will only use the LibC++ headers: any compiler that works in this workflow will do
341
+ cc : ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cc || '../third-party/llvm-project/install/bin/clang' }}
342
+ cxx : ${{ runner.os == 'macOS' && steps.setup-cpp.outputs.cxx || '../third-party/llvm-project/install/bin/clang++' }}
343
+ cxxflags : ${{ matrix.libcxx-cxxflags }}
329
344
generator : Ninja
330
- extra-args : |
331
- -D LLVM_ENABLE_RUNTIMES="${{ matrix.libcxx-runtimes }}"
332
- ${{ runner.os == 'Windows' && '-D LIBCXXABI_USE_LLVM_UNWINDER=OFF' || '' }}
333
- ${{ runner.os == 'Windows' && '-D LIBCXXABI_ENABLE_SHARED=OFF' || '' }}
334
- ${{ runner.os == 'Windows' && '-D LIBCXXABI_ENABLE_STATIC=ON' || '' }}
335
- ${{ runner.os == 'Windows' && '-D LIBCXX_ENABLE_SHARED=OFF' || '' }}
336
- ${{ runner.os == 'Windows' && '-D LIBCXX_NO_VCRUNTIME=ON' || '' }}
345
+ extra-args : ${{ matrix.libcxx-cmake-args }}
337
346
install : true
338
347
install-prefix : ${sourceDir}/../install
339
348
run-tests : false
340
349
trace-commands : true
341
350
342
351
- name : Install Node.js
343
- uses : actions/setup-node@v3
352
+ uses : actions/setup-node@v4
344
353
with :
345
354
node-version : ' 20'
346
355
@@ -427,12 +436,12 @@ jobs:
427
436
uses : actions/checkout@v4
428
437
429
438
- name : Install Node.js
430
- uses : actions/setup-node@v3
439
+ uses : actions/setup-node@v4
431
440
with :
432
441
node-version : ' 18'
433
442
434
443
- name : Setup Ninja
435
- uses : seanmiddleditch/gha-setup-ninja@v4
444
+ uses : seanmiddleditch/gha-setup-ninja@v5
436
445
if : ${{ runner.os == 'Windows' }}
437
446
438
447
- name : Download MrDocs package
@@ -445,7 +454,8 @@ jobs:
445
454
run : |
446
455
set -x
447
456
if [[ ${{ runner.os }} != 'Windows' ]]; then
448
- dest_dir="/usr/local"
457
+ dest_dir="$HOME/local"
458
+ mkdir -p "$dest_dir"
449
459
find packages -maxdepth 1 -name 'MrDocs-*.tar.gz' -exec tar -vxzf {} -C $dest_dir --strip-components=1 \;
450
460
else
451
461
dest_dir="$GITHUB_WORKSPACE/usr/local"
@@ -475,6 +485,39 @@ jobs:
475
485
modules-exclude-paths : ' '
476
486
trace-commands : true
477
487
488
+ - name : Set up llvm-symbolizer
489
+ if : ${{ runner.os == 'macOS' }}
490
+ run : |
491
+ set -x
492
+
493
+ # Step 1: Check if llvm-symbolizer is installed
494
+ if ! command -v llvm-symbolizer &> /dev/null; then
495
+ echo "llvm-symbolizer is not installed. Installing via Homebrew..."
496
+ # Step 2: Install llvm if not installed
497
+ if command -v brew &> /dev/null; then
498
+ brew install llvm
499
+ else
500
+ echo "Homebrew is not installed. Please install Homebrew first: https://brew.sh/"
501
+ exit 1
502
+ fi
503
+ fi
504
+
505
+ # Step 3: Ensure llvm-symbolizer is in your PATH
506
+ llvm_bin_path=$(brew --prefix)/opt/llvm/bin
507
+ PATH="$PATH:$llvm_bin_path"
508
+ LLVM_SYMBOLIZER_PATH=$(which llvm-symbolizer)
509
+ if [ -z "$LLVM_SYMBOLIZER_PATH" ]; then
510
+ echo "llvm-symbolizer installation failed or it's not in the PATH."
511
+ exit 1
512
+ else
513
+ echo "llvm-symbolizer found at: $LLVM_SYMBOLIZER_PATH"
514
+ fi
515
+
516
+ # Step 4: Export LLVM_SYMBOLIZER_PATH environment variable
517
+ export LLVM_SYMBOLIZER_PATH="$LLVM_SYMBOLIZER_PATH"
518
+ echo -e "LLVM_SYMBOLIZER_PATH=$LLVM_SYMBOLIZER_PATH" >> $GITHUB_ENV
519
+ echo "Environment variable LLVM_SYMBOLIZER_PATH set to: $LLVM_SYMBOLIZER_PATH"
520
+
478
521
- name : Generate Landing Page
479
522
working-directory : docs/website
480
523
run : |
0 commit comments