diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-09-26 18:06:42 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-09-26 19:01:25 +0300 |
commit | 878b73c89f377788862ffe3f20436f2d3ed80fa7 (patch) | |
tree | 7c1cb66261f9ee64832ddc35dce32d601fce74c8 | |
parent | add Doxygen docs (diff) | |
download | winapi-utf8-878b73c89f377788862ffe3f20436f2d3ed80fa7.tar.gz winapi-utf8-878b73c89f377788862ffe3f20436f2d3ed80fa7.zip |
workflows: publish docs to GitHub Pages
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/ci.yml | 44 | ||||
-rw-r--r-- | Makefile | 2 |
2 files changed, 44 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3833293..8d01b5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,10 @@ on: - cron: '30 5 * * 0' workflow_dispatch: +env: + BOOST_VERSION: 1.72.0 + CMAKE_FLAGS: -D WINAPI_UTF8_TESTS=ON + jobs: lint: runs-on: ubuntu-latest @@ -43,8 +47,6 @@ jobs: TOOLSET: '${{ matrix.toolset }}' PLATFORM: '${{ matrix.platform }}' CONFIGURATION: '${{ matrix.configuration }}' - BOOST_VERSION: 1.72.0 - CMAKE_FLAGS: -D WINAPI_UTF8_TESTS=ON steps: - name: Checkout uses: actions/checkout@v2 @@ -75,3 +77,41 @@ jobs: - name: Test run: make test if: runner.os == 'Windows' + + docs: + needs: [lint, build] + runs-on: ubuntu-latest + name: Docs + if: github.ref == 'refs/heads/master' + env: + TOOLSET: mingw + PLATFORM: auto + CONFIGURATION: Debug + CMAKE_FLAGS: -D WINAPI_UTF8_TESTS=OFF + steps: + # This is rather stupid. In order to build Doxygen docs, I need a working + # CMake build directory, so I assume that means I need to pretty much + # build the project. TODO: research if this is possible without having a + # Doxyfile. + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up Python + uses: actions/setup-python@v2 + - name: Set up MinGW + uses: egor-tensin/setup-mingw@v2 + - name: Install Doxygen + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends doxygen + - name: Build + run: make install + - name: Build docs + run: make docs + - name: Publish to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: ../build/cmake/html + single-commit: true @@ -88,9 +88,11 @@ xdg-open := $(shell command -v xdg-open 2> /dev/null) .PHONY: docs docs: cmake --build '$(call escape,$(cmake_dir))' --target docs +ifndef CI ifdef xdg-open xdg-open '$(call escape,$(cmake_dir))/html/index.html' endif +endif clang-tidy := run-clang-tidy ifeq (1,$(shell test -e /usr/share/clang/run-clang-tidy.py && echo 1)) |