2424 llvm-version : [20]
2525 image-version : [22.04]
2626
27- name : " Pre Release"
27+ name : " Pre Release and Build Doc "
2828 runs-on : ubuntu-${{ matrix.image-version }}
2929 if : ${{ github.event.workflow_run.conclusion == 'success' }}
3030 timeout-minutes : 60
@@ -44,12 +44,29 @@ jobs:
4444 submodules : true
4545 fetch-depth : 1
4646
47+ - name : Free up disk space
48+ run : |
49+ docker system prune -af --volumes || true
50+ sudo apt-get clean || true
51+ sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* || true
52+ rm -rf /gha-runner/usr/local/lib/android || true
53+ rm -rf /gha-runner/usr/local/share/boost || true
54+
4755 - name : Configure build
48- run : cmake --preset ci
56+ run : cmake --preset ci -DLLVM_Z3_INSTALL_DIR=/usr/local
4957
5058 - name : Build release
5159 run : cmake --build --preset ci-release -j $(nproc)
5260
61+ - name : Build Patchestry Doc
62+ run : cmake --build --preset ci-release --target mlir-doc
63+
64+ - name : Build Patchestry Pages
65+ run : |
66+ sh ./www/setup.sh _site ./builds/ci/
67+ pip install mkdocs mkdocs-material
68+ mkdocs build --config-file _site/mkdocs.yml --site-dir _site/site
69+
5370 - name : Package
5471 run : cpack --preset ci
5572
@@ -70,45 +87,33 @@ jobs:
7087 ./LICENSE
7188 ./builds/ci/package/*
7289
73- build_doc :
74- strategy :
75- matrix :
76- llvm-version : [20]
77- image-version : [22.04]
78- name : " Build Patchestry doc"
79- runs-on : ubuntu-${{ matrix.image-version }}
80- timeout-minutes : 60
81- container :
82- image :
83- ghcr.io/lifting-bits/patchestry-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest
90+ - name : Upload Patchestry sites
91+ uses : actions/upload-artifact@v4
92+ with :
93+ name : mkdocs-sites
94+ path : _site
95+ if-no-files-found : error
8496
85- env :
86- CMAKE_PREFIX_PATH : " /usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/mlir/;/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/clang/"
87- TOOLCHAIN : ${{ github.workspace }}/cmake/lld.toolchain.cmake
88- LLVM_EXTERNAL_LIT : " /usr/local/bin/lit"
97+ deploy_doc :
98+ needs : build_prerelease
99+ runs-on : ubuntu-latest
100+ permissions :
101+ contents : write
89102
90103 steps :
91- - name : Clean Docker to prevent space issues
92- run : |
93- docker system prune -af --volumes || true
94-
95104 - name : Clone the Patchestry repository
96105 uses : actions/checkout@v4
97106 with :
98- submodules : true
99107 fetch-depth : 1
100108
101- - name : Configure build
102- run : cmake --preset ci -DLLVM_Z3_INSTALL_DIR=/usr/local
103-
104- - name : Build Patchestry Doc
105- run : cmake --build --preset ci-release --target mlir-doc
106-
107- - name : Build Pages
108- run : |
109- sh ./www/setup.sh _site ./builds/ci/
109+ - name : Download Patchestry sites
110+ uses : actions/download-artifact@v4
111+ with :
112+ name : mkdocs-sites
113+ path : _site
110114
111- - name : Deploy docs
115+ # Deploy with the Docker-based action in a non-containerized job
116+ - name : Deploy Patchestry sites to gh-pages
112117 uses : mhausenblas/mkdocs-deploy-gh-pages@master
113118 env :
114119 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments