mirror of
https://github.com/boostorg/auto_index.git
synced 2025-05-11 05:24:03 +00:00
Merge pull request #7 from grafikrobot/modular
Add support for modular build structure.
This commit is contained in:
commit
91e2f15b8b
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- feature/**
|
- feature/**
|
||||||
|
- modular
|
||||||
|
|
||||||
env:
|
env:
|
||||||
UBSAN_OPTIONS: print_stacktrace=1
|
UBSAN_OPTIONS: print_stacktrace=1
|
||||||
@ -56,22 +57,16 @@ jobs:
|
|||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
LIBRARY=../tools/${GITHUB_REPOSITORY#*/}
|
BOOST_BRANCH=develop && ( test "${GITHUB_REF_NAME}" == "master" || test "${GITHUB_REF_NAME}" == "modular" ) && BOOST_BRANCH=${GITHUB_REF_NAME} || true
|
||||||
echo LIBRARY: $LIBRARY
|
BOOST_GIT=https://github.com/${GITHUB_REPOSITORY/auto_index/boost}.git
|
||||||
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
echo BOOST_GIT: ${BOOST_GIT}
|
||||||
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
|
||||||
echo GITHUB_REF: $GITHUB_REF
|
|
||||||
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
|
||||||
REF=${REF#refs/heads/}
|
|
||||||
echo REF: $REF
|
|
||||||
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
|
||||||
echo BOOST_BRANCH: $BOOST_BRANCH
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
cd ..
|
cd ..
|
||||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
git clone -b $BOOST_BRANCH --depth 1 "${BOOST_GIT}" boost-root
|
||||||
cd boost-root
|
cd boost-root
|
||||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
git submodule update --init
|
||||||
git submodule update --init tools/boostdep
|
rm -rf tools/auto_index/*
|
||||||
python3 tools/boostdep/depinst/depinst.py -I examples --git_args "--jobs 3" $LIBRARY
|
cp -r $GITHUB_WORKSPACE/* tools/auto_index
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./b2 -d0 headers
|
./b2 -d0 headers
|
||||||
|
|
||||||
@ -83,7 +78,7 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
|
./b2 -j3 tools/auto_index//all toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
strategy:
|
strategy:
|
||||||
@ -110,21 +105,18 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=../tools/%%~nxi
|
|
||||||
echo LIBRARY: %LIBRARY%
|
|
||||||
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
|
||||||
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
|
||||||
echo GITHUB_REF: %GITHUB_REF%
|
|
||||||
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
|
||||||
set BOOST_BRANCH=develop
|
set BOOST_BRANCH=develop
|
||||||
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
if "%GITHUB_REF_NAME%" == "master" set BOOST_BRANCH=master
|
||||||
|
if "%GITHUB_REF_NAME%" == "modular" set BOOST_BRANCH=modular
|
||||||
|
set BOOST_GIT=https://github.com/%GITHUB_REPOSITORY:auto_index=boost%.git
|
||||||
|
echo BOOST_GIT: %BOOST_GIT%
|
||||||
echo BOOST_BRANCH: %BOOST_BRANCH%
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
cd ..
|
cd ..
|
||||||
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
git clone -b %BOOST_BRANCH% --depth 1 %BOOST_GIT% boost-root
|
||||||
cd boost-root
|
cd boost-root
|
||||||
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY:/=\%\
|
git submodule update --init
|
||||||
git submodule update --init tools/boostdep
|
rd /s/q tools\auto_index
|
||||||
python tools/boostdep/depinst/depinst.py -I examples --git_args "--jobs 3" %LIBRARY%
|
xcopy /s /e /q %GITHUB_WORKSPACE% tools\auto_index\
|
||||||
cmd /c bootstrap
|
cmd /c bootstrap
|
||||||
b2 -d0 headers
|
b2 -d0 headers
|
||||||
|
|
||||||
@ -132,4 +124,4 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release embed-manifest-via=linker
|
b2 -j3 tools/auto_index//all toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release embed-manifest-via=linker
|
||||||
|
29
build.jam
Normal file
29
build.jam
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Copyright René Ferdinand Rivera Morell 2024
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
require-b2 5.2 ;
|
||||||
|
|
||||||
|
import option ;
|
||||||
|
import path ;
|
||||||
|
|
||||||
|
local DIST_DIR = [ option.get distdir ] ;
|
||||||
|
DIST_DIR ?= [ option.get build-dir ] ;
|
||||||
|
DIST_DIR ?= [ path.join $(BOOST_ROOT) dist ] ;
|
||||||
|
DIST_DIR ?= dist ;
|
||||||
|
DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ;
|
||||||
|
|
||||||
|
project /boost/auto_index ;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ install dist-bin
|
||||||
|
: build//auto_index/<link>static
|
||||||
|
: <install-type>EXE <location>$(DIST_DIR)/bin
|
||||||
|
: release ]
|
||||||
|
[ alias auto_index : build//auto_index ]
|
||||||
|
[ alias all : auto_index test dist-bin ]
|
||||||
|
;
|
||||||
|
|
||||||
|
# Install distribution files/execs by default.
|
||||||
|
alias dist : dist-bin ;
|
@ -6,30 +6,13 @@
|
|||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
import quickbook ;
|
exe auto_index :
|
||||||
import modules ;
|
../src/auto_index.cpp
|
||||||
import boostcpp ;
|
../src/file_scanning.cpp
|
||||||
import path ;
|
../src/index_generator.cpp
|
||||||
import option ;
|
../src/tiny_xml.cpp
|
||||||
|
/boost/regex//boost_regex
|
||||||
local DIST_DIR = [ option.get distdir ] ;
|
/boost/filesystem//boost_filesystem
|
||||||
DIST_DIR ?= [ option.get build-dir ] ;
|
/boost/system//boost_system
|
||||||
DIST_DIR ?= [ path.join $(BOOST_ROOT) dist ] ;
|
/boost/program_options//boost_program_options
|
||||||
DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ;
|
: <define>BOOST_ALL_NO_LIB=1 <link>static release ;
|
||||||
local DIST_BIN = [ path.join $(DIST_DIR) bin ] ;
|
|
||||||
|
|
||||||
exe auto_index :
|
|
||||||
../src/auto_index.cpp
|
|
||||||
../src/file_scanning.cpp
|
|
||||||
../src/index_generator.cpp
|
|
||||||
../src/tiny_xml.cpp
|
|
||||||
/boost//regex
|
|
||||||
/boost//filesystem
|
|
||||||
/boost//system
|
|
||||||
/boost//program_options
|
|
||||||
: <define>BOOST_ALL_NO_LIB=1 <link>static release ;
|
|
||||||
|
|
||||||
install aii : auto_index : <location>. ;
|
|
||||||
explicit aii ;
|
|
||||||
|
|
||||||
install i : auto_index : <location>$(DIST_BIN) ;
|
|
||||||
|
@ -15,11 +15,6 @@ boostbook standalone
|
|||||||
:
|
:
|
||||||
auto_index
|
auto_index
|
||||||
:
|
:
|
||||||
# Path for links to Boost:
|
|
||||||
<xsl:param>boost.root=../../../..
|
|
||||||
# Path for libraries index:
|
|
||||||
<xsl:param>boost.libraries=$(boost-root)/libs/libraries.htm
|
|
||||||
|
|
||||||
# Some general style settings:
|
# Some general style settings:
|
||||||
<xsl:param>table.footnote.number.format=1
|
<xsl:param>table.footnote.number.format=1
|
||||||
<xsl:param>footnote.number.format=1
|
<xsl:param>footnote.number.format=1
|
||||||
@ -83,6 +78,3 @@ boostbook standalone
|
|||||||
;
|
;
|
||||||
|
|
||||||
install pdf-install : standalone : <install-type>PDF <location>. <name>auto_index.pdf ;
|
install pdf-install : standalone : <install-type>PDF <location>. <name>auto_index.pdf ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,56 +12,31 @@ import toolset ;
|
|||||||
import type ;
|
import type ;
|
||||||
|
|
||||||
path-constant ROOT : ../../.. ;
|
path-constant ROOT : ../../.. ;
|
||||||
path-constant HERE : . ;
|
|
||||||
|
|
||||||
exe line_compare_tool : text_diff.cpp ;
|
actions auto-index
|
||||||
|
{
|
||||||
|
"$(>[1])" "--prefix=$(ROOT)" "--in=$(>[2])" "--script=$(>[3])" "--out=$(<[1])"
|
||||||
|
}
|
||||||
|
|
||||||
rule auto-index-test ( target-name : input-file : script-file : output-file ? : options * )
|
rule auto-index-test ( target-name : input-file : script-file : output-file ? : options * )
|
||||||
{
|
{
|
||||||
local project = [ project.current ] ;
|
make $(target-name)._out
|
||||||
|
: ../build//auto_index/<variant>release
|
||||||
local t =
|
$(input-file)
|
||||||
[ targets.create-typed-target RUN
|
$(script-file)
|
||||||
: $(project)
|
: @auto-index
|
||||||
: $(target-name)
|
: <location-prefix>$(target-name).test
|
||||||
: [ alias autoindex : ../build//auto_index : release ]
|
<dependency>Jamfile.v2
|
||||||
: $(requirements)
|
|
||||||
<location-prefix>$(target-name).test
|
|
||||||
<testing.arg>--prefix=$(ROOT)
|
|
||||||
<testing.arg>$(options)
|
|
||||||
<testing.arg>--in=$(HERE)/$(input-file)
|
|
||||||
<testing.arg>--script=$(HERE)/$(script-file)
|
|
||||||
<testing.arg>--out=$(HERE)/$(target-name).out
|
|
||||||
<preserve-test-targets>on
|
|
||||||
<dependency>Jamfile.v2
|
|
||||||
<dependency>$(input-file)
|
|
||||||
<dependency>$(script-file)
|
|
||||||
]
|
|
||||||
;
|
;
|
||||||
|
|
||||||
local n = [ $(t).name ] ;
|
testing.run text_diff.cpp
|
||||||
#ECHO n: $(n) ;
|
:
|
||||||
|
: $(target-name)._out
|
||||||
t +=
|
$(target-name).gold
|
||||||
[ targets.create-typed-target RUN
|
: <preserve-test-targets>on
|
||||||
: $(project)
|
<dependency>Jamfile.v2
|
||||||
: $(target-name)_check
|
: $(target-name)_check
|
||||||
: [ alias lct : line_compare_tool : release ]
|
|
||||||
: $(requirements)
|
|
||||||
<location-prefix>$(target-name).test
|
|
||||||
<testing.arg>$(HERE)/$(target-name).out
|
|
||||||
<testing.arg>$(HERE)/$(target-name).gold
|
|
||||||
<preserve-test-targets>on
|
|
||||||
<dependency>$(n)
|
|
||||||
<dependency>Jamfile.v2
|
|
||||||
<dependency>$(input-file)
|
|
||||||
<dependency>$(script-file)
|
|
||||||
]
|
|
||||||
;
|
;
|
||||||
|
|
||||||
modules.poke testing : .all-tests : \$\(all-tests\) $(t) ;
|
|
||||||
|
|
||||||
return $(t) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto-index-test test1 : type_traits.docbook : index.idx ;
|
auto-index-test test1 : type_traits.docbook : index.idx ;
|
||||||
|
160
test/test2.gold
160
test/test2.gold
File diff suppressed because one or more lines are too long
160
test/test3.gold
160
test/test3.gold
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user