Skip to content

Commit 6f619e2

Browse files
committed
[ci][docs] Simplify the doxygen job.
- Remove the override step from the doxygen job. Overrides can be specified as command-line arguments, which significantly shortens the job file. - Remove duplicated build step. There is no difference between the jobs, so we don't need build job based on the workflow trigger. - Create & compress the tar archive in one go.
1 parent 87c679a commit 6f619e2

1 file changed

Lines changed: 8 additions & 48 deletions

File tree

.github/workflows/root-docs-ci.yml

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
DOC_LOCATION: /github/home
3939
BASE_REF: master
4040
WEB_DIR_NAME: master
41-
TAR_NAME: htmlmaster.tar
41+
TAR_FILE: htmlmaster.tar.gz
4242

4343
permissions:
4444
contents: read
@@ -71,53 +71,16 @@ jobs:
7171
# code of the `if`.
7272
run: 'if [ -d /py-venv/ROOT-CI/bin/ ]; then . /py-venv/ROOT-CI/bin/activate && echo PATH=$PATH >> $GITHUB_ENV; fi'
7373

74-
- name: Set up directory name and tar filenames
75-
run: |
76-
echo TAR_NAME=html${BASE_REF}.tar >> $GITHUB_ENV
77-
echo DOCDIR_NAME=${BASE_REF} >> $GITHUB_ENV
78-
79-
- name: Apply option overrides
80-
env:
81-
OVERRIDES: "testing=Off roottest=Off"
82-
CONFIGFILE: '.github/workflows/root-ci-config/buildconfig/alma10.txt'
83-
shell: bash
84-
run: |
85-
set -x
86-
echo '' >> "$CONFIGFILE"
87-
for ENTRY in $OVERRIDES; do
88-
KEY=$( echo "$ENTRY" | cut -d '=' -f 1 )
89-
# Add entry to file if not exists, otherwise replace
90-
if grep -q "$KEY=" "$CONFIGFILE"; then
91-
sed -i "s/$KEY=.*\$/$ENTRY/" "$CONFIGFILE"
92-
else
93-
echo "$ENTRY" >> "$CONFIGFILE"
94-
fi
95-
done
96-
cat "$CONFIGFILE" || true
97-
98-
- name: Build ROOT - Workflow Dispatch
99-
if: github.event_name == 'workflow_dispatch'
100-
env:
101-
INCREMENTAL: ${{ inputs.incremental == 'true' }}
102-
run: ".github/workflows/root-ci-config/build_root.py
103-
--buildtype Release
104-
--platform ${{ env.PLATFORM }}
105-
--incremental ${{ env.INCREMENTAL }}
106-
--base_ref ${BASE_REF}
107-
--head_ref ${BASE_REF}
108-
--binaries false
109-
--repository ${{ github.server_url }}/${{ github.repository }}"
110-
111-
- name: Build ROOT - Schedule
112-
if: github.event_name == 'schedule'
74+
- name: Build ROOT
11375
run: ".github/workflows/root-ci-config/build_root.py
11476
--buildtype Release
11577
--platform ${{ env.PLATFORM }}
11678
--incremental ${{ inputs.incremental }}
11779
--base_ref ${BASE_REF}
11880
--head_ref ${BASE_REF}
11981
--binaries false
120-
--repository ${{ github.server_url }}/${{ github.repository }}"
82+
--repository ${{ github.server_url }}/${{ github.repository }}
83+
--overrides testing=Off roottest=Off"
12184

12285
- name: Run Doxygen
12386
working-directory: ${{ env.DOC_LOCATION }}
@@ -134,20 +97,17 @@ jobs:
13497
run: |
13598
pwd
13699
ls -l
137-
echo ${DOC_DIR}
138-
echo ${TAR_NAME}
139100
ls -l ${DOC_DIR}
140-
tar cf ${TAR_NAME} ${DOC_DIR}
141-
gzip ${TAR_NAME}
101+
tar -caf ${TAR_FILE} ${DOC_DIR}
142102
ls -l
143103
144104
#Upload to GitHub as an artifact
145105
- name: Upload tar file for GH
146106
if: ${{ !cancelled() }}
147107
uses: actions/upload-artifact@v6
148108
with:
149-
name: ${{env.TAR_NAME}}.gz
150-
path: ${{env.DOC_LOCATION}}/${{env.TAR_NAME}}.gz
109+
name: ${{env.TAR_FILE}}
110+
path: ${{env.DOC_LOCATION}}/${{env.TAR_FILE}}
151111
if-no-files-found: error
152112

153113
- name: Sync documentation to EOS
@@ -181,4 +141,4 @@ jobs:
181141
rm -r html
182142
xrdcp --parallel 64 -rf ./ ${EOS_ENDPOINT}/${EOS_BASE_PATH}/doc/${WEB_DIR_NAME}
183143
cd ..
184-
xrdcp -rf ${TAR_NAME}.gz ${EOS_ENDPOINT}/${EOS_BASE_PATH}/download
144+
xrdcp -rf ${TAR_FILE} ${EOS_ENDPOINT}/${EOS_BASE_PATH}/download

0 commit comments

Comments
 (0)