Download chips/yosys/.github/workflows/prepare-docs.yml from STAR-future/Trinity-SciData: direct link, hf CLI and curl.
- Browser
- Download file 3.4 kB
-
https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/.github/workflows/prepare-docs.yml
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SciData/chips/yosys/.github/workflows/prepare-docs.yml
-
curl -L -o prepare-docs.yml https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/.github/workflows/prepare-docs.yml
3.4 kB
| name: Build docs artifact with Verific | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: [ main, "docs-preview/**", "docs-preview*" ] | |
| tags: [ "*" ] | |
| workflow_dispatch: | |
| jobs: | |
| check_docs_rebuild: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.set_output.outputs.should_skip }} | |
| docs_export: ${{ steps.docs_var.outputs.docs_export }} | |
| env: | |
| docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@v5.3.2 | |
| with: | |
| paths_ignore: '["**/README.md"]' | |
| # don't cancel in case we're updating docs | |
| cancel_others: 'false' | |
| # push filtering means we only want to skip duplicates for PRs | |
| do_not_skip: '["workflow_dispatch", "merge_group", "push"]' | |
| concurrent_skipping: 'same_content_newer' | |
| - id: docs_var | |
| run: echo "docs_export=${docs_export}" >> $GITHUB_OUTPUT | |
| - id: set_output | |
| run: | | |
| if [ "${{ github.event_name }}" = "merge_group" ]; then | |
| echo "should_skip=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT | |
| fi | |
| prepare-docs: | |
| # docs builds are needed for anything on main, any tagged versions, and any tag | |
| # or branch starting with docs-preview | |
| needs: check_docs_rebuild | |
| if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }} | |
| runs-on: [self-hosted, linux, x64, fast] | |
| steps: | |
| - name: Checkout Yosys | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Runtime environment | |
| run: | | |
| echo "procs=$(nproc)" >> $GITHUB_ENV | |
| - name: Build Yosys | |
| run: | | |
| rm -rf build Configuration.cmake | |
| echo 'set(CMAKE_C_COMPILER clang CACHE STRING "")' >> Configuration.cmake | |
| echo 'set(CMAKE_CXX_COMPILER clang++ CACHE STRING "")' >> Configuration.cmake | |
| echo 'set(YOSYS_COMPILER_LAUNCHER ccache CACHE STRING "")' >> Configuration.cmake | |
| echo 'set(YOSYS_VERIFIC_DIR "/usr/local/src/verific_lib" CACHE STRING "")' >> Configuration.cmake | |
| cmake -C Configuration.cmake -B build . | |
| cmake --build build -j$procs | |
| - name: Prepare docs | |
| shell: bash | |
| run: | |
| cmake --build build --target docs-prepare -j$procs | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cmd-ref-${{ github.sha }} | |
| path: | | |
| docs/source/generated | |
| docs/source/_images | |
| docs/source/code_examples | |
| - name: Install doc prereqs | |
| shell: bash | |
| run: | | |
| make -C docs reqs | |
| - name: Test build docs | |
| shell: bash | |
| run: | | |
| cmake --build build --target docs-html -j$procs | |
| - name: Trigger RTDs build | |
| if: ${{ needs.check_docs_rebuild.outputs.docs_export == 'true' && github.repository == 'YosysHQ/yosys' }} | |
| uses: dfm/rtds-action@v1.1.0 | |
| with: | |
| webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }} | |
| webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }} | |
| commit_ref: ${{ github.ref }} | |