Skip to content

Commit ef7a690

Browse files
committed
actions: docbuild: Use a full Zephyr setup
In order to support the latest doc build from upstream, switch to using a full Zephyr setup. Signed-off-by: Carles Cufi <[email protected]>
1 parent d3cae8e commit ef7a690

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

.github/workflows/docbuild.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,55 @@ jobs:
3232
group: ${{ github.workflow }}-${{ github.ref }}
3333
cancel-in-progress: true
3434
steps:
35-
- name: Checkout sources
36-
uses: nrfconnect/action-checkout-west-update@main
35+
- name: checkout
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3737
with:
38-
git-fetch-depth: 0
39-
40-
- name: cache-pip
41-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
42-
with:
43-
path: ~/.cache/pip
44-
key: ${{ runner.os }}-doc-pip
38+
ref: ${{ github.event.pull_request.head.sha }}
39+
fetch-depth: 0
40+
path: ncs/nrf
41+
42+
- name: Rebase
43+
if: github.event_name == 'pull_request'
44+
continue-on-error: true
45+
env:
46+
BASE_REF: ${{ github.base_ref }}
47+
PR_HEAD: ${{ github.event.pull_request.head.sha }}
48+
working-directory: ncs/nrf
49+
run: |
50+
git config --global user.email "[email protected]"
51+
git config --global user.name "Github Actions"
52+
rm -fr ".git/rebase-apply"
53+
rm -fr ".git/rebase-merge"
54+
git rebase origin/${BASE_REF}
55+
git clean -f -d
56+
git log --graph --oneline HEAD...${PR_HEAD}
4557
4658
- name: Install packages
59+
working-directory: ncs
4760
run: |
4861
sudo apt update
49-
sudo apt-get install -y ninja-build mscgen plantuml
62+
sudo apt-get install -y wget python3-pip git ninja-build graphviz lcov mscgen plantuml
5063
sudo snap install yq
51-
DOXYGEN_VERSION=$(yq ".doxygen.version" ./ncs/nrf/scripts/tools-versions-linux.yml)
64+
DOXYGEN_VERSION=$(yq ".doxygen.version" nrf/scripts/tools-versions-linux.yml)
5265
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
5366
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
5467
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
5568
56-
- name: Install Python dependencies
69+
- name: Set up Python
70+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
71+
with:
72+
python-version: 3.12
73+
cache: pip
74+
cache-dependency-path: ncs/nrf/doc/requirements.txt
75+
76+
- name: Setup Zephyr project
77+
uses: zephyrproject-rtos/action-zephyr-setup@6a744370a22e4ecb24f5dda3c7e80ff3e0a3b847 # v1.0.8
78+
with:
79+
base-path: ncs
80+
app-path: nrf
81+
toolchains: 'all'
82+
83+
- name: install-pip
5784
working-directory: ncs
5885
run: |
5986
pip install -r nrf/doc/requirements.txt

0 commit comments

Comments
 (0)