Align style #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build document | |
on: | |
push: | |
paths: | |
- 'Rakefile' | |
- 'doc/Doxyfile' | |
- 'include/**/*.h' | |
- 'include/**/*.hpp' | |
- '.github/workflows/document.yml' | |
pull_request: | |
paths: | |
- 'Rakefile' | |
- 'doc/Doxyfile' | |
- 'include/**/*.h' | |
- 'include/**/*.hpp' | |
- '.github/workflows/document.yml' | |
concurrency: | |
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build the full document | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
- name: Prepare ccache | |
run: | | |
echo "CCACHE_DIR=${PWD}/ccache" >> ${GITHUB_ENV} | |
- name: Cache ccache | |
uses: actions/cache@v4 | |
with: | |
path: ccache | |
key: document-linux-ccache-${{ hashFiles('lib/**', 'src/**', 'plugins/**', 'include/**') }} | |
restore-keys: document-linux-ccache- | |
- name: Install dependencies | |
run: | | |
./setup.sh | |
pip install -r doc/requirements.txt | |
(cd doc && bundle install) | |
- name: Build document | |
run: | | |
ccache --show-stats --verbose --version || : | |
cmake -S . -B /tmp/groonga.build --preset=doc | |
mkdir -p /tmp/groonga.org/ja | |
rake release:document:update BUILD_DIR=/tmp/groonga.build GROONGA_ORG_DIR=/tmp/groonga.org | |
ccache --show-stats --verbose --version || : | |
- name: Create archive | |
run: | | |
version=$(cat base_version) | |
mv /tmp/groonga.org /tmp/document-${version} | |
tar -czf document-${version}.tar.gz -C /tmp/ document-${version} | |
# Artifact | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: document | |
path: document-*.tar.gz | |
# Release | |
- name: Upload to release | |
if: | | |
github.ref_type == 'tag' | |
run: gh release upload ${{ github.ref_name }} document-*.tar.gz | |
env: | |
GH_TOKEN: ${{ github.token }} | |
# todo: Documents generated by Doxygen are also built with CMake. | |
doxygen: | |
name: Doxygen | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
- name: Install Doxygen | |
run: sudo apt install -y -V doxygen graphviz | |
- name: Run Doxygen | |
run: rake document:api |