Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doc build script #12

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 5 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,9 @@ jobs:
needs: [ runner-selection ]
runs-on: ${{ fromJSON(needs.runner-selection.outputs.labelmatrix)['ubuntu-latest'] }}
steps:
- name: Clone Boost.Http.Io
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -1035,78 +1038,13 @@ jobs:
compiler: clang
version: 17

- name: Clone Boost.Http.Io
uses: actions/checkout@v3
with:
path: http-io-root

- name: Clone Boost.Http.Proto
uses: actions/checkout@v3
with:
repository: cppalliance/http_proto
path: http-proto-root
ref: develop

- name: Clone Boost.Buffers
uses: actions/checkout@v3
with:
path: buffers-root
repository: cppalliance/buffers
ref: develop

- name: Clone Boost
uses: alandefreitas/cpp-actions/[email protected]
id: boost-clone
with:
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
boost-dir: boost-source
scan-modules-dir: http-io-root
scan-modules-ignore: http_io

- name: Patch Boost
id: patch
shell: bash
run: |
set -xe
pwd
ls
ls -lah boost-source

# Identify boost module being tested
module=${GITHUB_REPOSITORY#*/}
echo "module=$module" >> $GITHUB_OUTPUT

# Identify GitHub workspace root
workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g')
echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT

# Remove module from boost-source
rm -r "boost-source/libs/$module" || true

# Copy cached boost-source to an isolated boost-root
cp -r boost-source boost-root

# Set boost-root output
cd boost-root
boost_root="$(pwd)"
boost_root=$(echo "$boost_root" | sed 's/\\/\//g')
echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT

# Patch boost-root with workspace module
cp -r "$workspace_root"/http-io-root "libs/$module"
cp -r "$workspace_root"/buffers-root libs/buffers
cp -r "$workspace_root"/http-proto-root libs/http_proto

python3 tools/boostdep/depinst/depinst.py buffers
python3 tools/boostdep/depinst/depinst.py http_proto

- name: Build Antora Docs
run: |
cd boost-root/libs/http_io/doc
cd doc
bash ./build_antora.sh

- name: Create Antora Docs Artifact
uses: actions/upload-artifact@v3
with:
name: antora-docs
path: boost-root/libs/http_io/doc/build/site
path: doc/build/site
12 changes: 12 additions & 0 deletions doc/generate-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ if (isBoostDir(cwdParentParent)) {
execSync('git submodule update --init --recursive', {cwd: boostDir})
console.log(`Cloned Boost to ${boostDir}`)

// Clone buffers
if (!fs.existsSync(path.join(boostDir, 'libs', 'buffers'))){
execSync(`git clone https://github.com/CPPAlliance/buffers --depth 1 --branch ${boostBranch}`,
{ cwd: path.join(boostDir, 'libs') })
}

// Clone http_proto
if (!fs.existsSync(path.join(boostDir, 'libs', 'http_proto'))){
execSync(`git clone https://github.com/CPPAlliance/http_proto --depth 1 --branch ${boostBranch}`,
{ cwd: path.join(boostDir, 'libs') })
}

// Delete `self` from boost/libs
const selfDir = path.join(boostDir, 'libs', self)
console.log(`Deleting ${selfDir}`)
Expand Down
Loading