mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Create documentation on GHA
This commit is contained in:
parent
62494bccfd
commit
e59e2dfe8c
6 changed files with 107 additions and 48 deletions
59
.github/workflows/release.yml
vendored
Normal file
59
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# Copyright 2020 Alexander Grund
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
name: Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEP_DIR: ${{github.workspace}}/dependencies
|
||||
BOOST_VERSION: 1.71.0
|
||||
BOOST_ROOT: ${{env.DEP_DIR}}/boost
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: boostorg/boost
|
||||
ref: boost-${{env.BOOST_VERSION}}
|
||||
path: ${{env.BOOST_ROOT}}
|
||||
fetch-depth: 1
|
||||
- name: Prepare boost
|
||||
working-directory: ${{env.BOOST_ROOT}}
|
||||
run: |
|
||||
git submodule update --init --jobs 3 tools/boostdep tools/quickbook tools/boostbook
|
||||
python tools/boostdep/depinst/depinst.py --exclude test --git_args '--jobs 3' ../tools/quickbook
|
||||
./bootstrap.sh || (cat bootstrap.log && false)
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install xsltproc docbook-xsl docbook-xml
|
||||
- name: Create documentation
|
||||
run: scripts/build_doc.sh
|
||||
- run: tar -czf doc.tar.gz html
|
||||
working-directory: doc
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
body: |
|
||||
C++ mock object library for Boost
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload docs
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: doc/doc.tar.gz
|
||||
asset_name: doc.tar.gz
|
||||
asset_content_type: application/tar.gz
|
||||
28
Jamfile.v2
28
Jamfile.v2
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright Rene Rivera 2007.
|
||||
#
|
||||
# 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)
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# bjam [options | properties | targets]
|
||||
#
|
||||
# Options:
|
||||
#
|
||||
# --boost=<BOOST> The directory of a Boost source tree.
|
||||
# Default; BOOST env var (if found)
|
||||
# Default; ../boost (if found)
|
||||
#
|
||||
# --boost-build=<BOOST_BUILD>
|
||||
# The directory for the Boost.Build v2 files.
|
||||
# Default; BOOST_BUILD_PATH env var (if found)
|
||||
# Default; BOOST_BUILD env var (if found)
|
||||
# Default; <BOOST>/tools/build/v2 (if found)
|
||||
|
||||
#~ If we have the Boost sources we can use the project...
|
||||
|
||||
if [ GLOB $(BOOST) : [ modules.peek project : JAMFILE ] ]
|
||||
{
|
||||
use-project /boost : $(BOOST) ;
|
||||
}
|
||||
10
Jamroot.jam
10
Jamroot.jam
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
import modules ;
|
||||
|
||||
local boost = [ modules.peek : BOOST ] ;
|
||||
if BOOST_ROOT
|
||||
{
|
||||
local boost = [ modules.peek : BOOST_ROOT ] ;
|
||||
|
||||
project mock : requirements <include>$(boost) <include>. ;
|
||||
project mock : requirements <include>$(boost) ;
|
||||
|
||||
# This seems to prevent some Boost.Build errors that otherwise occur :-(
|
||||
use-project /boost : $(boost) ;
|
||||
#use-project /boost : $(boost) ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,6 @@
|
|||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
copy()
|
||||
{
|
||||
for dir; do true; done
|
||||
mkdir -p "$dir"
|
||||
cp "$@"
|
||||
}
|
||||
|
||||
set -eux
|
||||
|
||||
export BOOST="$BOOST_ROOT"
|
||||
|
|
@ -21,13 +14,7 @@ cd "$BOOST"
|
|||
./b2 "$PROJECT_DIR/test" -q "$@"
|
||||
|
||||
cd "$PROJECT_DIR"
|
||||
export BOOSTBOOK_DIR="$PROJECT_DIR/bin/turtle/boostbook"
|
||||
copy -r "$BOOST"/tools/boostbook/xsl "$BOOSTBOOK_DIR"
|
||||
copy -r "$BOOST"/tools/boostbook/dtd "$BOOSTBOOK_DIR"
|
||||
copy -r build/boostbook/* "$BOOSTBOOK_DIR"
|
||||
copy "$BOOST"/doc/src/boostbook.css doc/html
|
||||
copy "$BOOST"/doc/src/images/*.png doc/html/images
|
||||
copy "$BOOST"/doc/src/images/callouts/*.png doc/html/images/callouts
|
||||
scripts/build_doc.sh "$@"
|
||||
|
||||
cd "$BOOST"
|
||||
./b2 "$PROJECT_DIR/doc" -q "$@"
|
||||
./b2 "$PROJECT_DIR/doc//mock_examples" -q "$@"
|
||||
|
|
|
|||
|
|
@ -46,7 +46,15 @@ project example
|
|||
|
||||
rule compile-examples
|
||||
{
|
||||
for name in [ glob example/*.cpp ] { compile $(name) ; }
|
||||
local examples ;
|
||||
for name in [ glob example/*.cpp ]
|
||||
{
|
||||
local compile-target = [ compile $(name) ] ;
|
||||
explicit $(compile-target) ;
|
||||
examples += $(compile-target) ;
|
||||
}
|
||||
return $(examples) ;
|
||||
}
|
||||
|
||||
alias mock_examples : [ compile-examples ] ;
|
||||
explicit mock_examples ;
|
||||
|
|
|
|||
31
scripts/build_doc.sh
Executable file
31
scripts/build_doc.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2015 Mathieu Champlon
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# Execute from repo root folder or set PROJECT_DIR
|
||||
# Requires BOOST_ROOT to be set
|
||||
|
||||
set -eu
|
||||
|
||||
copy()
|
||||
{
|
||||
for dir; do true; done
|
||||
mkdir -p "$dir"
|
||||
cp "$@"
|
||||
}
|
||||
|
||||
PROJECT_DIR="${PROJECT_DIR:-$(pwd)}"
|
||||
|
||||
export BOOSTBOOK_DIR="${PROJECT_DIR}/bin/turtle/boostbook"
|
||||
copy -r "$BOOST_ROOT"/tools/boostbook/xsl "$BOOSTBOOK_DIR"
|
||||
copy -r "$BOOST_ROOT"/tools/boostbook/dtd "$BOOSTBOOK_DIR"
|
||||
copy -r build/boostbook/* "$BOOSTBOOK_DIR"
|
||||
copy "$BOOST_ROOT"/doc/src/boostbook.css doc/html
|
||||
copy "$BOOST_ROOT"/doc/src/images/*.png doc/html/images
|
||||
copy "$BOOST_ROOT"/doc/src/images/callouts/*.png doc/html/images/callouts
|
||||
|
||||
cd "$BOOST_ROOT"
|
||||
./b2 "$PROJECT_DIR/doc" -q "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue