@@ -1113,32 +1113,110 @@ jobs:
11131113 tag-pattern : ' boost-.*\..*\..*'
11141114
11151115 antora :
1116- name : Antora Docs
1117- runs-on : ubuntu-latest
1116+ needs : [ runner-selection ]
1117+ strategy :
1118+ matrix :
1119+ include :
1120+ # - { name: Windows, os: windows-latest }
1121+ - { name: Ubuntu, os: ubuntu-latest }
1122+ - { name: MacOS, os: macos-latest }
1123+ name : Antora Docs (${{ matrix.name }})
1124+ runs-on : ${{ fromJSON(needs.runner-selection.outputs.labelmatrix)[matrix.os] }}
1125+ defaults :
1126+ run :
1127+ shell : bash
11181128 steps :
1119- - name : Clone Http.Proto
1129+ - name : Install packages
1130+ uses : alandefreitas/cpp-actions/package-install@v1.8.7
1131+ with :
1132+ apt-get : git cmake
1133+
1134+ - name : Clone Boost.Http.Proto
11201135 uses : actions/checkout@v3
1136+ with :
1137+ path : http-proto-root
11211138
1122- - uses : actions/setup-node@v3
1139+ - name : Clone Boost.Buffers
1140+ uses : actions/checkout@v3
11231141 with :
1124- node-version : 18
1142+ path : buffers-root
1143+ repository : cppalliance/buffers
1144+ ref : develop
11251145
1126- - name : Setup C++
1127- uses : alandefreitas/cpp-actions/setup-cpp @v1.8.7
1128- id : setup-cpp
1146+ - name : Clone Boost
1147+ uses : alandefreitas/cpp-actions/boost-clone @v1.8.7
1148+ id : boost-clone
11291149 with :
1130- compiler : clang
1131- version : 18
1150+ branch : ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
1151+ boost-dir : boost-source
1152+ scan-modules-dir : http-proto-root
1153+ scan-modules-ignore : http_proto
11321154
1133- - name : Build Antora Docs
1155+ - name : Patch Boost
1156+ id : patch
1157+ shell : bash
11341158 run : |
11351159 set -xe
1160+ pwd
1161+ ls
1162+ ls -lah boost-source
1163+
1164+ # Identify boost module being tested
1165+ module=${GITHUB_REPOSITORY#*/}
1166+ echo "module=$module" >> $GITHUB_OUTPUT
1167+
1168+ # Identify GitHub workspace root
1169+ workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g')
1170+ echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT
11361171
1172+ # Remove module from boost-source
1173+ rm -r "boost-source/libs/$module" || true
1174+
1175+ # Copy cached boost-source to an isolated boost-root
1176+ cp -r boost-source boost-root
1177+
1178+ # Set boost-root output
1179+ cd boost-root
1180+ boost_root="$(pwd)"
1181+ boost_root=$(echo "$boost_root" | sed 's/\\/\//g')
1182+ echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
1183+
1184+ # Patch boost-root with workspace module
1185+ cp -r "$workspace_root"/http-proto-root "libs/$module"
1186+ cp -r "$workspace_root"/buffers-root libs/buffers
1187+
1188+ python3 tools/boostdep/depinst/depinst.py buffers
1189+ python3 tools/boostdep/depinst/depinst.py http_proto
1190+
1191+ - uses : actions/setup-node@v4
1192+ with :
1193+ node-version : 18
1194+
1195+ - name : Setup Ninja
1196+ if : runner.os == 'Windows'
1197+ uses : seanmiddleditch/gha-setup-ninja@v5
1198+
1199+ - name : Build Antora Docs
1200+ env :
1201+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1202+ run : |
1203+ git config --global --add safe.directory "$(pwd)"
1204+
1205+ BOOST_SRC_DIR="$(pwd)/boost-root"
1206+ export BOOST_SRC_DIR
1207+ cd boost-root/libs/http_proto
1208+
11371209 cd doc
11381210 bash ./build_antora.sh
1211+
1212+ # Antora returns zero even if it fails, so we check if the site directory exists
1213+ if [ ! -d "build/site" ]; then
1214+ echo "Antora build failed"
1215+ exit 1
1216+ fi
11391217
11401218 - name : Create Antora Docs Artifact
1141- uses : actions/upload-artifact@v3
1219+ uses : actions/upload-artifact@v4
11421220 with :
1143- name : antora-docs
1221+ name : antora-docs-${{ matrix.name }}
11441222 path : doc/build/site
0 commit comments