Skip to content

Commit

Permalink
ci: Split out prepare-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Sep 2, 2024
1 parent 6c833d8 commit e92de01
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 55 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/prepare-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build docs artifact with Verific

on: push

jobs:
prepare-docs:
# docs builds are needed for anything on main, any tagged versions, and any tag
# or branch starting with docs-preview
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
runs-on: [self-hosted, linux, x64, fast]
steps:
- name: Checkout Yosys
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true

- name: Runtime environment
run: |
echo "procs=$(nproc)" >> $GITHUB_ENV
- name: Build Yosys
run: |
make config-clang
echo "ENABLE_VERIFIC := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_EDIF := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
echo "ENABLE_CCACHE := 1" >> Makefile.conf
make -j${{ env.procs }} ENABLE_LTO=1
- name: Prepare docs
shell: bash
run:
make docs/prep TARGETS= EXTRA_TARGETS=

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cmd-ref-${{ github.sha }}
path: |
docs/source/cmd
docs/source/generated
docs/source/_images
docs/source/code_examples
- name: Trigger RTDs build
uses: dfm/[email protected]
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
commit_ref: ${{ github.ref }}
55 changes: 0 additions & 55 deletions .github/workflows/test-verific.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Build and run tests with Verific (Linux)

on: [push, pull_request]
# docs builds are needed for anything on main, any tagged versions, and any tag
# or branch starting with docs-preview
env:
is_docs_job: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}

jobs:
pre-job:
Expand Down Expand Up @@ -74,54 +70,3 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
run: |
make -C sby run_ci
prepare-docs:
name: Generate docs artifact
needs: [pre-job, test-verific]
runs-on: [self-hosted, linux, x64, fast]
steps:
- name: Checkout Yosys
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true

- name: Runtime environment
run: |
echo "procs=$(nproc)" >> $GITHUB_ENV
- name: Build Yosys
if: ${{ (needs.pre-job.outputs.should_skip != 'true') || env.is_docs_job }}
run: |
make config-clang
echo "ENABLE_VERIFIC := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_EDIF := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
echo "ENABLE_CCACHE := 1" >> Makefile.conf
make -j${{ env.procs }} ENABLE_LTO=1
- name: Prepare docs
if: ${{ (needs.pre-job.outputs.should_skip != 'true') || env.is_docs_job }}
shell: bash
run:
make docs/prep TARGETS= EXTRA_TARGETS=

- name: Upload artifact
if: ${{ (needs.pre-job.outputs.should_skip != 'true') || env.is_docs_job }}
uses: actions/upload-artifact@v4
with:
name: cmd-ref-${{ github.sha }}
path: |
docs/source/cmd
docs/source/generated
docs/source/_images
docs/source/code_examples
- name: Trigger RTDs build
if: ${{ env.is_docs_job }}
uses: dfm/[email protected]
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
commit_ref: ${{ github.ref }}

0 comments on commit e92de01

Please sign in to comment.