瀏覽代碼

CI: Improve Sphinx performance, use multiple cores

According to https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners, these runners are expected to have 4 CPUs available
Max Hilbrunner 6 月之前
父節點
當前提交
cd993f0b96
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      .github/workflows/build_offline_docs.yml
  2. 1 1
      .github/workflows/ci.yml

+ 2 - 2
.github/workflows/build_offline_docs.yml

@@ -32,7 +32,7 @@ jobs:
           sudo apt install parallel libwebp7
           sudo apt install parallel libwebp7
 
 
       - name: Sphinx - Build HTML
       - name: Sphinx - Build HTML
-        run: make SPHINXOPTS='--color' html
+        run: make SPHINXOPTS='--color -j 4' html
 
 
       - uses: actions/upload-artifact@v4
       - uses: actions/upload-artifact@v4
         with:
         with:
@@ -54,7 +54,7 @@ jobs:
           sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py
           sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py
           sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py
           sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py
 
 
-          make SPHINXOPTS='--color' epub
+          make SPHINXOPTS='--color -j 4' epub
 
 
       - uses: actions/upload-artifact@v4
       - uses: actions/upload-artifact@v4
         with:
         with:

+ 1 - 1
.github/workflows/ci.yml

@@ -23,4 +23,4 @@ jobs:
 
 
       # Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
       # Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
       - name: Sphinx build
       - name: Sphinx build
-        run: make SPHINXOPTS='--color -W' dummy
+        run: make SPHINXOPTS='--color -j 4 -W' dummy