Skip to content

Commit

Permalink
Fix document builder
Browse files Browse the repository at this point in the history
Signed-off-by: owent <admin@owent.net>
  • Loading branch information
owent committed Jun 7, 2021
1 parent 9b6cdfb commit 727e4b3
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 28 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,43 @@ jobs:
shell: bash
run: |
bash ci/do_ci.sh format ;
document: # job id, can be any string
name: Document
# This job runs on Linux
strategy:
matrix:
include:
- os: ubuntu-latest
triplet: x64-linux
cc: gcc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build & Test
shell: bash
run: |
sudo apt-get update ;
sudo apt-get install --no-install-recommends --no-install-suggests -y doxygen graphviz ;
bash ci/do_ci.sh document ;
- name: Deploy
if: ${{ github.event_name == 'push' }}
env:
COMMIT_REF: ${{ github.ref }}
DOCUMENT_DEPLOY_KEY: ${{ secrets.DOCUMENT_DEPLOY_KEY }}
shell: bash
run: |
cd docs/output ;
git config --global init.defaultBranch main ;
git init ;
git add . ;
mkdir -p $HOME/.ssh ;
chmod 700 $HOME/.ssh ;
echo "$DOCUMENT_DEPLOY_KEY" > $HOME/.ssh/deploy.key ;
chmod 600 $HOME/.ssh/deploy.key ;
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentityFile=$HOME/.ssh/deploy.key" ;
git -c user.name='owent' -c user.email='admin@owent.net' commit -m "Delpoy document for $COMMIT_REF";
git push -f -q git@github.com:owent/libcopp-doc.git HEAD:main ;
unix_build: # job id, can be any string
name: Unix Build
# This job runs on Linux
Expand Down
66 changes: 40 additions & 26 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,73 @@ libcopp

Cross-platform coroutine library in C++ .

.. image:: https://img.shields.io/github/v/release/owent/libcopp

.. image:: https://img.shields.io/github/languages/code-size/owent/libcopp
.. image:: https://img.shields.io/github/repo-size/owent/libcopp
.. image:: https://img.shields.io/github/forks/owent/libcopp?style=social
.. image:: https://img.shields.io/github/stars/owent/libcopp?style=social

|ci-badge|
|codecov-badge|
|lgtm-badge|
.. |release-badge| image:: https://img.shields.io/github/v/release/owent/libcopp
:alt: Release
:target: https://github.com/owent/libcopp/releases

.. |code-size-badge| image:: https://img.shields.io/github/languages/code-size/owent/libcopp
:alt: Code size
:target: https://github.com/owent/libcopp

.. |repo-size-badge| image:: https://img.shields.io/github/repo-size/owent/libcopp
:alt: Repo size
:target: https://github.com/owent/libcopp

.. |forks-badge| image:: https://img.shields.io/github/forks/owent/libcopp?style=social
:alt: Forks
:target: https://github.com/owent/libcopp

.. |stars-badge| image:: https://img.shields.io/github/stars/owent/libcopp?style=social
:alt: Stars
:target: https://github.com/owent/libcopp

.. |ci-badge| image:: https://github.com/owent/libcopp/actions/workflows/main.yml/badge.svg
:alt: Travis build status
:alt: CI build status
:target: https://github.com/owent/libcopp/actions/workflows/main.yml

.. |codecov-badge| image:: https://codecov.io/gh/owent/libcopp/branch/v2/graph/badge.svg
:alt: Coveralls coverage
:target: https://codecov.io/gh/owent/libcopp
:alt: Coveralls coverage
:target: https://codecov.io/gh/owent/libcopp

.. |lgtm-badge| image:: https://img.shields.io/lgtm/grade/cpp/g/owent/libcopp.svg?logo=lgtm&logoWidth=18
:alt: Language grade: C/C++
:target: https://lgtm.com/projects/g/owent/libcopp/context:cpp
:alt: Language grade: C/C++
:target: https://lgtm.com/projects/g/owent/libcopp/context:cpp

|release-badge| |code-size-badge| |repo-size-badge| |ci-badge| |codecov-badge| |lgtm-badge| |forks-badge| |stars-badge|

CI Job Matrix
----------------

|+++++++++++++++|++++++++++++++++++++|+++++++++++++++++++++++|
+---------------+--------------------+-----------------------+
| Target System | Toolchain | Note |
|===============|====================|=======================|
+===============+====================+=======================+
| Linux | GCC | Static linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | GCC | Dynamic linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | GCC-latest | |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | GCC-latest | No Exception |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | GCC-latest | Thread Unsafe |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | GCC 4.8 | Legacy |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Linux | Clang-latest | With libc++ |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| MinGW64 | GCC | Dynamic linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Windows | Visual Studio 2019 | Static linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Windows | Visual Studio 2019 | Dynamic linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| Windows | Visual Studio 2017 | Legacy,Static linking |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+
| macOS | AppleClang | With libc++ |
|---------------|--------------------|-----------------------|
+---------------+--------------------+-----------------------+

LICENSE
------------
Expand Down
19 changes: 19 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,25 @@ elif [[ "$1" == "msys2.mingw.test" ]]; then
cmake .. -G 'MinGW Makefiles' ${PROJECT_ADDON_OPTIONS[@]} \
-DLIBCOPP_MACRO_ENABLE_STD_COROUTINE=OFF -DLIBCOPP_MACRO_USE_STD_EXPERIMENTAL_COROUTINE=OFF ;
cmake --build . -j2 || cmake --build . ;
elif [[ "$1" == "document" ]]; then
mkdir -p build_for_doxygen ;
cd build_for_doxygen ;
export PATH="$HOME/.local/bin:$PATH" ;
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBCOPP_FCONTEXT_USE_TSX=ON -DPROJECT_ENABLE_UNITTEST=ON -DPROJECT_ENABLE_SAMPLE=ON ;
cd ../docs ;
python3 -m pip install --user --upgrade pip;
python3 -m pip install --user --upgrade -r requirements.txt;
mkdir -p sphinx/doxygen ;
doxygen libcopp.doxyfile;
du -sh sphinx/doxygen/* ;
sphinx-build -b html -a -D breathe_projects.libcopp=doxygen/xml sphinx output;
if [[ -e "output/doxygen/html" ]]; then
rm -rf "output/doxygen/html";
fi
mkdir -p output/doxygen/ ;
mv -f "sphinx/doxygen/html" "output/doxygen/html";
echo "libcopp.atframe.work" > output/CNAME ;
exit 0;
else
echo "Bad configure";
exit 1;
Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ignore:
- "**/third_party/**"
- "**/sample/**"
- "**/test/**"
- "**/sample/*"
- "**/test/**/*"
- "**/tools/**"
- "**/build_jobs_coverage/CMakeFiles/**"

0 comments on commit 727e4b3

Please sign in to comment.