Skip to content

Commit 76d820e

Browse files
committed
New CI for Doxygen
Let's hope it works alright.
1 parent 1ffbd3a commit 76d820e

File tree

4 files changed

+72
-33
lines changed

4 files changed

+72
-33
lines changed

.github/workflows/linux.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Linux CI
22

33
# Controls when the action will run.
44
on:

.github/workflows/main.yml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
name: CI
1+
name: Doxygen
22

33
# Controls when the action will run.
44
on:
55
push:
66
branches: 'master'
77

8-
# Run for all pull requests
9-
pull_request:
10-
branches: '*'
11-
types: [opened]
12-
138
env:
14-
CMAKE_DOXYGEN_INPUT_LIST: "Components Docs/src OgreMain PlugIns RenderSystems"
15-
OGRE_SOURCE_DIR: "./"
16-
OGRE_BINARY_DIR: "./"
179
OGRE_VERSION: "latest"
18-
DOXYGEN_HTML_OUTPUT_DIR: "./latest"
1910

2011
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2112
jobs:
@@ -24,27 +15,15 @@ jobs:
2415
# The type of runner that the job will run on
2516
runs-on: ubuntu-latest
2617

27-
# Steps represent a sequence of tasks that will be executed as part of the job
2818
steps:
29-
- uses: actions/checkout@v3
30-
31-
- name: Generate Doxyfile
32-
# Replace CMake's ${ENV_VAR} to Doxygen's $(ENV_VAR) syntax
33-
run: cat CMake/Templates/html.cfg.in | sed 's/\${\(.*\)}/$(\1)/' > Doxyfile
34-
35-
- name: Generate docs with doxygen
36-
uses: mattnotmitt/doxygen-action@v1
37-
with:
38-
doxyfile-path: './Doxyfile'
39-
40-
- name: Remove files
41-
working-directory: .github/workflows/
42-
run: python3 doxygen_remove_files.py
43-
44-
- name: Publish # Only on master branch
45-
if: github.ref == 'refs/heads/master'
46-
uses: peaceiris/actions-gh-pages@v3
19+
- uses: actions/checkout@v4
20+
- name: Build Doxygen
21+
working-directory: ./
22+
run: ./Scripts/BuildScripts/build_ci_doxygen_step0.sh
23+
- uses: actions/checkout@v4
4724
with:
48-
github_token: ${{ secrets.GITHUB_TOKEN }}
49-
publish_dir: ./
50-
keep_files: true
25+
ref: gh-pages
26+
path: gh-pages
27+
- name: Publish Doxygen
28+
working-directory: ./
29+
run: ./Scripts/BuildScripts/build_ci_doxygen_step1.sh
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
if [ -z "$OGRE_VERSION" ]; then
4+
echo "OGRE_VERSION is not set. Aborting!"
5+
exit 1;
6+
fi
7+
8+
echo "--- Installing System Dependencies ---"
9+
sudo apt-get update
10+
sudo apt-get install -y ninja-build libxrandr-dev libxaw7-dev libxcb-randr0-dev libx11-xcb-dev libsdl2-dev doxygen graphviz
11+
12+
echo "--- Fetching prebuilt Dependencies ---"
13+
wget https://github.com/OGRECave/ogre-next-deps/releases/download/bin-releases/Dependencies_Release_Ubuntu.20.04.LTS.Clang-12_a3f61e782f3effbd58a15727885cbd85cd1b342b.7z
14+
15+
echo "--- Extracting prebuilt Dependencies ---"
16+
7z x Dependencies_Release_Ubuntu.20.04.LTS.Clang-12_a3f61e782f3effbd58a15727885cbd85cd1b342b.7z
17+
18+
mkdir -p build/Doxygen
19+
cd build/Doxygen
20+
echo "--- Building Ogre (Debug) ---"
21+
cmake \
22+
-DOGRE_CONFIG_THREAD_PROVIDER=0 \
23+
-DOGRE_CONFIG_THREADS=0 \
24+
-DOGRE_BUILD_COMPONENT_SCENE_FORMAT=1 \
25+
-DOGRE_BUILD_SAMPLES2=0 \
26+
-DOGRE_BUILD_TESTS=0 \
27+
-DOGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS=1 \
28+
-DCMAKE_BUILD_TYPE="Debug" \
29+
-DCMAKE_CXX_STANDARD=11 \
30+
-G Ninja ../.. || exit $?
31+
ninja OgreDoc || exit $?
32+
cd ../.. || exit $?
33+
# echo "--- Checking out gh-pages branch ---"
34+
# git checkout gh-pages || exit $?
35+
36+
echo "Done Step 0!"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
if [ -z "$OGRE_VERSION" ]; then
4+
echo "OGRE_VERSION is not set. Aborting!"
5+
exit 1;
6+
fi
7+
8+
# echo "--- Checking out gh-pages branch ---"
9+
# git checkout gh-pages || exit $?
10+
cd gh-pages || exit $?
11+
cd api || exit $?
12+
echo "--- Removing old ${OGRE_VERSION} ---"
13+
git rm -rf ${OGRE_VERSION} || exit $?
14+
rm -rf ${OGRE_VERSION} || exit $?
15+
echo "--- Copying new ${OGRE_VERSION} ---"
16+
mv ../../build/Doxygen/api/html ${OGRE_VERSION} || exit $?
17+
echo "--- Adding to ${OGRE_VERSION} to git ---"
18+
git add ${OGRE_VERSION} || exit $?
19+
echo "--- Committing ---"
20+
git commit -m "Deploy GH" || exit $?
21+
echo "--- Pushing repo... ---"
22+
git push || exit $?
23+
24+
echo "Done Step 1!"

0 commit comments

Comments
 (0)