@@ -1016,37 +1016,119 @@ jobs:
1016
1016
tag-pattern : ' boost-.*\..*\..*'
1017
1017
1018
1018
antora :
1019
- name : Antora Docs
1020
- runs-on : ubuntu-latest
1019
+ needs : [ runner-selection ]
1020
+ strategy :
1021
+ matrix :
1022
+ include :
1023
+ # - { name: Windows, os: windows-latest }
1024
+ - { name: Ubuntu, os: ubuntu-latest }
1025
+ - { name: MacOS, os: macos-latest }
1026
+ name : Antora Docs (${{ matrix.name }})
1027
+ runs-on : ${{ fromJSON(needs.runner-selection.outputs.labelmatrix)[matrix.os] }}
1028
+ defaults :
1029
+ run :
1030
+ shell : bash
1021
1031
steps :
1032
+ - name : Install packages
1033
+ uses :
alandefreitas/cpp-actions/[email protected]
1034
+ with :
1035
+ apt-get : git cmake
1036
+
1022
1037
- name : Clone Boost.Http.Io
1023
1038
uses : actions/checkout@v3
1039
+ with :
1040
+ path : http-io-root
1024
1041
1025
- - uses : actions/setup-node@v3
1042
+ - name : Clone Boost.Http.Proto
1043
+ uses : actions/checkout@v3
1026
1044
with :
1027
- node-version : 18
1045
+ repository : cppalliance/http_proto
1046
+ path : http-proto-root
1047
+ ref : develop
1028
1048
1029
- - name : Setup C++
1030
- uses :
alandefreitas/cpp-actions/[email protected]
1031
- id : setup-cpp
1049
+ - name : Clone Boost.Buffers
1050
+ uses : actions/checkout@v3
1032
1051
with :
1033
- compiler : clang
1034
- version : 18
1052
+ path : buffers-root
1053
+ repository : cppalliance/buffers
1054
+ ref : develop
1035
1055
1036
- - name : Build Antora Docs
1056
+ - name : Clone Boost
1057
+ uses :
alandefreitas/cpp-actions/[email protected]
1058
+ id : boost-clone
1059
+ with :
1060
+ branch : ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
1061
+ boost-dir : boost-source
1062
+ scan-modules-dir : http-io-root
1063
+ scan-modules-ignore : http_io
1064
+
1065
+ - name : Patch Boost
1066
+ id : patch
1067
+ shell : bash
1037
1068
run : |
1038
1069
set -xe
1070
+ pwd
1071
+ ls
1072
+ ls -lah boost-source
1073
+
1074
+ # Identify boost module being tested
1075
+ module=${GITHUB_REPOSITORY#*/}
1076
+ echo "module=$module" >> $GITHUB_OUTPUT
1039
1077
1040
- CXX="/usr/bin/clang++-18"
1041
- export CXX
1042
- CC="/usr/bin/clang-18"
1043
- export CC
1078
+ # Identify GitHub workspace root
1079
+ workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g')
1080
+ echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT
1044
1081
1082
+ # Remove module from boost-source
1083
+ rm -r "boost-source/libs/$module" || true
1084
+
1085
+ # Copy cached boost-source to an isolated boost-root
1086
+ cp -r boost-source boost-root
1087
+
1088
+ # Set boost-root output
1089
+ cd boost-root
1090
+ boost_root="$(pwd)"
1091
+ boost_root=$(echo "$boost_root" | sed 's/\\/\//g')
1092
+ echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
1093
+
1094
+ # Patch boost-root with workspace module
1095
+ cp -r "$workspace_root"/http-io-root "libs/$module"
1096
+ cp -r "$workspace_root"/buffers-root libs/buffers
1097
+ cp -r "$workspace_root"/http-proto-root libs/http_proto
1098
+
1099
+ python3 tools/boostdep/depinst/depinst.py buffers
1100
+ python3 tools/boostdep/depinst/depinst.py http_proto
1101
+ python3 tools/boostdep/depinst/depinst.py http_io
1102
+
1103
+ - uses : actions/setup-node@v4
1104
+ with :
1105
+ node-version : 18
1106
+
1107
+ - name : Setup Ninja
1108
+ if : runner.os == 'Windows'
1109
+ uses : seanmiddleditch/gha-setup-ninja@v5
1110
+
1111
+ - name : Build Antora Docs
1112
+ env :
1113
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1114
+ run : |
1115
+ git config --global --add safe.directory "$(pwd)"
1116
+
1117
+ BOOST_SRC_DIR="$(pwd)/boost-root"
1118
+ export BOOST_SRC_DIR
1119
+ cd boost-root/libs/http_io
1120
+
1045
1121
cd doc
1046
1122
bash ./build_antora.sh
1123
+
1124
+ # Antora returns zero even if it fails, so we check if the site directory exists
1125
+ if [ ! -d "build/site" ]; then
1126
+ echo "Antora build failed"
1127
+ exit 1
1128
+ fi
1047
1129
1048
1130
- name : Create Antora Docs Artifact
1049
- uses : actions/upload-artifact@v3
1131
+ uses : actions/upload-artifact@v4
1050
1132
with :
1051
- name : antora-docs
1133
+ name : antora-docs-${{ matrix.name }}
1052
1134
path : doc/build/site
0 commit comments