Install the layer to standard dirs on Linux. (#244) #57
This file contains hidden or 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
| # Copyright (c) 2025-2026 Lukasz Stalmirski | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all | |
| # copies or substantial portions of the Software. | |
| # | |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| # SOFTWARE. | |
| name: Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'Docs/**' | |
| - '.gitmodules' | |
| - '.github/workflows/docs.yml' | |
| tags: | |
| - release-* | |
| pull_request: | |
| branches: [ "master" ] | |
| types: [ opened, synchronize, reopened, ready_for_review ] | |
| paths: | |
| - 'Docs/**' | |
| - '.gitmodules' | |
| - '.github/workflows/docs.yml' | |
| - 'VkLayer_profiler_layer/VkLayer_profiler_layer.json.in' | |
| jobs: | |
| build-docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Download the repository and set up Python | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install -r ${{github.workspace}}/VkLayer_profiler_layer/scripts/requirements.txt | |
| python3 -m pip install -r ${{github.workspace}}/Docs/requirements.txt | |
| # Build the documentation | |
| - name: Add build worktree | |
| if: github.event_name != 'pull_request' | |
| run: git worktree add -f docs_build docs-build | |
| - name: Build profiler_codegen | |
| run: | | |
| cmake -B ${{github.workspace}}/build -DSKIP_PLATFORMS_CHECK=ON | |
| cmake --build ${{github.workspace}}/build --target profiler_codegen | |
| - name: Clean previous versions | |
| if: github.event_name != 'pull_request' | |
| run: rm -r ${{github.workspace}}/docs_build/docs | |
| - name: Build documentation | |
| run: sphinx-multiversion ${{github.workspace}}/Docs ${{github.workspace}}/docs_build/docs -D vkprof_licenses="${{github.workspace}}/build/LICENSES.rst" -E -a | |
| - name: Validate documentation | |
| run: | | |
| python3 ${{github.workspace}}/VkLayer_profiler_layer/scripts/validate_docs.py \ | |
| ${{github.workspace}}/build/VkLayer_profiler_layer/VkLayer_profiler_layer.json \ | |
| ${{github.workspace}}/Docs | |
| # Push documentation to docs-build branch | |
| - name: Publish documentation | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| cd ${{github.workspace}}/docs_build | |
| if ! git diff-index --quiet HEAD; then | |
| git config user.name "GitHub Actions" | |
| git config user.email "<>" | |
| git add docs | |
| git commit -m "Update documentation for ${{github.sha}}" | |
| git push | |
| fi |