Skip to content

Commit df2bdb9

Browse files
kartbennashif
authored andcommitted
ci: doc: github: Build PDF from vanilla ubuntu
Moved away from a texlive docker container to a vanilla ubuntu runner so that we can better track the actual dependencies a user needs to build the PDF rather than relying on the gigabytes of random stuff that the texlive docker container pulls in. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 0bc512f commit df2bdb9

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

.github/workflows/doc-build.yml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ permissions:
1717
env:
1818
# NOTE: west docstrings will be extracted from the version listed here
1919
WEST_VERSION: 1.2.0
20-
# The latest CMake available directly with apt is 3.18, but we need >=3.20
21-
# so we fetch that through pip.
22-
CMAKE_VERSION: 3.20.5
2320
DOXYGEN_VERSION: 1.12.0
2421
DOXYGEN_MD5SUM: fd96a5defa535dfe2e987b46540844a4
2522
JOB_COUNT: 4
@@ -188,50 +185,48 @@ jobs:
188185
needs: [doc-file-check]
189186
if: |
190187
github.event_name != 'pull_request'
191-
runs-on: ubuntu-22.04
192-
container: texlive/texlive:latest
188+
runs-on: ubuntu-24.04
193189
timeout-minutes: 120
194190
concurrency:
195191
group: doc-build-pdf-${{ github.ref }}
196192
cancel-in-progress: true
197193

198194
steps:
199-
- name: Apply container owner mismatch workaround
200-
run: |
201-
git config --global --add safe.directory ${GITHUB_WORKSPACE}
202-
203195
- name: checkout
204196
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
197+
with:
198+
path: zephyr
205199

206200
- name: install-pkgs
207201
run: |
208-
apt-get update
209-
apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin imagemagick
202+
sudo apt-get update
203+
sudo apt-get install --no-install-recommends graphviz librsvg2-bin \
204+
texlive-latex-base texlive-latex-extra latexmk \
205+
texlive-fonts-recommended texlive-fonts-extra texlive-xetex \
206+
imagemagick fonts-noto xindy
207+
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
208+
echo "${DOXYGEN_MD5SUM} doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" | md5sum -c
209+
if [ $? -ne 0 ]; then
210+
echo "Failed to verify doxygen tarball"
211+
exit 1
212+
fi
213+
sudo tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz -C /opt
214+
echo "/opt/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
210215
211-
- name: cache-pip
212-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
216+
- name: Setup Zephyr project
217+
uses: zephyrproject-rtos/action-zephyr-setup@f7b70269a8eb01f70c8e710891e4c94972a2f6b4 # v1.0.6
213218
with:
214-
path: ~/.cache/pip
215-
key: pip-${{ hashFiles('doc/requirements.txt') }}
216-
217-
- name: setup-venv
218-
run: |
219-
python3 -m venv .venv
220-
. .venv/bin/activate
221-
echo PATH=$PATH >> $GITHUB_ENV
219+
app-path: zephyr
220+
toolchains: 'arm-zephyr-eabi'
222221

223-
- name: install-pip
222+
- name: install-pip-pkgs
223+
working-directory: zephyr
224224
run: |
225225
pip install -r doc/requirements.txt
226-
pip install west==${WEST_VERSION}
227-
pip install cmake==${CMAKE_VERSION}
228-
229-
- name: west setup
230-
run: |
231-
west init -l .
232226
233227
- name: build-docs
234228
shell: bash
229+
working-directory: zephyr
235230
continue-on-error: true
236231
run: |
237232
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
@@ -252,8 +247,8 @@ jobs:
252247
name: pdf-output
253248
if-no-files-found: ignore
254249
path: |
255-
doc/_build/latex/zephyr.pdf
256-
doc/_build/latex/zephyr.log
250+
zephyr/doc/_build/latex/zephyr.pdf
251+
zephyr/doc/_build/latex/zephyr.log
257252
258253
doc-build-status-check:
259254
if: always()

0 commit comments

Comments
 (0)