Skip to content

Commit 2b21b3a

Browse files
authored
Docs: CI & minor improvements of contents (#180)
2 parents 10f2df2 + 37ab451 commit 2b21b3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+761
-682
lines changed

.github/workflows/debug.yml

Lines changed: 138 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
name: Debug
22

3-
on: [ push, workflow_dispatch, pull_request, merge_group ]
3+
on:
4+
push:
5+
paths-ignore:
6+
- "**/*.md"
7+
- "docs/**"
8+
pull_request:
9+
paths-ignore:
10+
- "**/*.md"
11+
- "docs/**"
12+
merge_group:
13+
paths-ignore:
14+
- "**/*.md"
15+
- "docs/**"
16+
workflow_dispatch:
417

518
jobs:
619
build:
@@ -9,7 +22,7 @@ jobs:
922
QtLatestVersion: &QtLatest "6.10.1"
1023
QtBrewVersion: &QtBrew "6.9.3"
1124
QtMinimalVersion: &QtMinimal "5.12.0"
12-
needs: [ build-riscv-tests, build-stud-support-tests ]
25+
needs: [build-riscv-tests, build-stud-support-tests]
1326
# Avoid duplicate builds on PR from the same repository
1427
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
1528
runs-on: ${{ matrix.config.os }}
@@ -19,88 +32,110 @@ jobs:
1932
config:
2033
# Linux testing
2134
- {
22-
name: "Ubuntu latest (GCC) + packaged Qt6",
23-
os: ubuntu-latest,
24-
build_type: "Debug",
25-
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
26-
qt_version: "native",
27-
qt_install_command: "sudo apt-get update && sudo apt-get install qt6-base-dev"
28-
}
35+
name: "Ubuntu latest (GCC) + packaged Qt6",
36+
os: ubuntu-latest,
37+
build_type: "Debug",
38+
cc: "gcc",
39+
cxx: "g++",
40+
build_system: "Unix Makefiles",
41+
qt_version: "native",
42+
qt_install_command: "sudo apt-get update && sudo apt-get install qt6-base-dev",
43+
}
2944
- {
30-
name: "Ubuntu latest (GCC) + packaged Qt5",
31-
os: ubuntu-latest,
32-
build_type: "Debug",
33-
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
34-
qt_version: "native",
35-
qt_install_command: "sudo apt-get update && sudo apt-get install qtbase5-dev"
36-
}
45+
name: "Ubuntu latest (GCC) + packaged Qt5",
46+
os: ubuntu-latest,
47+
build_type: "Debug",
48+
cc: "gcc",
49+
cxx: "g++",
50+
build_system: "Unix Makefiles",
51+
qt_version: "native",
52+
qt_install_command: "sudo apt-get update && sudo apt-get install qtbase5-dev",
53+
}
3754
- {
38-
name: "Ubuntu latest (GCC) + latest Qt6",
39-
os: ubuntu-latest,
40-
build_type: "Debug",
41-
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
42-
qt_version: *QtLatest
43-
}
55+
name: "Ubuntu latest (GCC) + latest Qt6",
56+
os: ubuntu-latest,
57+
build_type: "Debug",
58+
cc: "gcc",
59+
cxx: "g++",
60+
build_system: "Unix Makefiles",
61+
qt_version: *QtLatest,
62+
}
4463
- {
45-
name: "Ubuntu oldest (GCC) + minimal supported Qt",
46-
os: ubuntu-22.04,
47-
build_type: "Debug",
48-
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles",
49-
qt_version: *QtMinimal
50-
}
64+
name: "Ubuntu oldest (GCC) + minimal supported Qt",
65+
os: ubuntu-22.04,
66+
build_type: "Debug",
67+
cc: "gcc",
68+
cxx: "g++",
69+
build_system: "Unix Makefiles",
70+
qt_version: *QtMinimal,
71+
}
5172
# macOS testing
5273
- {
53-
name: "macOS latest ARM64 (Clang) + Qt6",
54-
os: macos-latest,
55-
build_type: "Debug",
56-
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles",
57-
qt_version: *QtBrew
58-
# Cached aqt is faster that brew.
59-
}
74+
name: "macOS latest ARM64 (Clang) + Qt6",
75+
os: macos-latest,
76+
build_type: "Debug",
77+
cc: "clang",
78+
cxx: "clang++",
79+
build_system: "Unix Makefiles",
80+
qt_version: *QtBrew,
81+
# Cached aqt is faster that brew.
82+
}
6083
- {
61-
name: "macOS latest AMD64 (Clang) + Qt6",
62-
os: macos-15-intel,
63-
build_type: "Debug",
64-
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles",
65-
qt_version: *QtBrew
66-
# Cached aqt is faster that brew.
67-
}
84+
name: "macOS latest AMD64 (Clang) + Qt6",
85+
os: macos-15-intel,
86+
build_type: "Debug",
87+
cc: "clang",
88+
cxx: "clang++",
89+
build_system: "Unix Makefiles",
90+
qt_version: *QtBrew,
91+
# Cached aqt is faster that brew.
92+
}
6893
- {
69-
name: "macOS oldest AMD64 (Clang) + minimal supported Qt",
70-
os: macos-15-intel,
71-
build_type: "Debug",
72-
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles",
73-
qt_version: *QtMinimal
74-
# Cached aqt is faster that brew.
75-
}
94+
name: "macOS oldest AMD64 (Clang) + minimal supported Qt",
95+
os: macos-15-intel,
96+
build_type: "Debug",
97+
cc: "clang",
98+
cxx: "clang++",
99+
build_system: "Unix Makefiles",
100+
qt_version: *QtMinimal,
101+
# Cached aqt is faster that brew.
102+
}
76103
# Windows testing
77104
- {
78-
name: "Windows latest (Clang) + Qt6",
79-
os: windows-latest,
80-
build_type: "Debug",
81-
# on Windows, msbuild does not support Clang with GNU-like interface
82-
# and NMake does not support parallel builds
83-
cc: "clang", cxx: "clang++", build_system: "Ninja",
84-
qt_version: *QtLatest, qt_arch: "win64_msvc2022_64"
85-
}
105+
name: "Windows latest (Clang) + Qt6",
106+
os: windows-latest,
107+
build_type: "Debug",
108+
# on Windows, msbuild does not support Clang with GNU-like interface
109+
# and NMake does not support parallel builds
110+
cc: "clang",
111+
cxx: "clang++",
112+
build_system: "Ninja",
113+
qt_version: *QtLatest,
114+
qt_arch: "win64_msvc2022_64",
115+
}
86116
- {
87-
name: "Windows oldest (Clang) + minimal supported Qt",
88-
os: windows-2022,
89-
build_type: "Debug",
90-
# on Windows, msbuild does not support Clang with GNU-like interface
91-
# and NMake does not support parallel builds
92-
cc: "clang", cxx: "clang++", build_system: "Ninja",
93-
qt_version: *QtMinimal, qt_arch: "win64_msvc2017_64"
94-
}
117+
name: "Windows oldest (Clang) + minimal supported Qt",
118+
os: windows-2022,
119+
build_type: "Debug",
120+
# on Windows, msbuild does not support Clang with GNU-like interface
121+
# and NMake does not support parallel builds
122+
cc: "clang",
123+
cxx: "clang++",
124+
build_system: "Ninja",
125+
qt_version: *QtMinimal,
126+
qt_arch: "win64_msvc2017_64",
127+
}
95128
- {
96-
name: "Windows 2022 (MinGW) + Qt5",
97-
os: windows-2022,
98-
build_type: "Debug",
99-
cc: "gcc", cxx: "g++", build_system: "Ninja",
100-
# Older Qt releases do not have 64bit mingw release
101-
qt_version: "5.12.9", qt_arch: "win64_mingw73"
102-
}
103-
129+
name: "Windows 2022 (MinGW) + Qt5",
130+
os: windows-2022,
131+
build_type: "Debug",
132+
cc: "gcc",
133+
cxx: "g++",
134+
build_system: "Ninja",
135+
# Older Qt releases do not have 64bit mingw release
136+
qt_version: "5.12.9",
137+
qt_arch: "win64_mingw73",
138+
}
104139

105140
steps:
106141
- uses: actions/checkout@v4
@@ -125,24 +160,24 @@ jobs:
125160
if: matrix.config.qt_version == 'native'
126161
run: ${{ matrix.config.qt_install_command }}
127162

128-
- name: Setup Ninja
129-
if: matrix.config.build_system == 'Ninja'
130-
uses: seanmiddleditch/gha-setup-ninja@v6
163+
- name: Setup Ninja
164+
if: matrix.config.build_system == 'Ninja'
165+
uses: seanmiddleditch/gha-setup-ninja@v6
131166

132167
- name: Create Build Environment
133168
run: cmake -E make_directory ${{ github.workspace }}/build
134169

135170
- name: Configure CMake
136171
shell: bash
137172
working-directory: ${{github.workspace}}/build
138-
run: "cmake $GITHUB_WORKSPACE
139-
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
140-
-DCMAKE_C_COMPILER=${{ matrix.config.cc }}
141-
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
142-
-DCMAKE_C_COMPILER_LAUNCHER=ccache
143-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
144-
-DFORCE_COLORED_OUTPUT=true
145-
-G \"${{ matrix.config.build_system }}\""
173+
run: 'cmake $GITHUB_WORKSPACE
174+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
175+
-DCMAKE_C_COMPILER=${{ matrix.config.cc }}
176+
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
177+
-DCMAKE_C_COMPILER_LAUNCHER=ccache
178+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
179+
-DFORCE_COLORED_OUTPUT=true
180+
-G "${{ matrix.config.build_system }}"'
146181

147182
- name: Build
148183
working-directory: ${{ github.workspace }}/build
@@ -152,7 +187,7 @@ jobs:
152187
if: runner.os == 'Windows'
153188
working-directory: ${{ github.workspace }}/build/target
154189
shell: bash
155-
run: "windeployqt \"${{ github.workspace }}/build/target/qtrvsim_gui.exe\""
190+
run: 'windeployqt "${{ github.workspace }}/build/target/qtrvsim_gui.exe"'
156191

157192
- name: Test
158193
working-directory: ${{ github.workspace }}/build
@@ -236,13 +271,13 @@ jobs:
236271
matrix:
237272
config:
238273
- {
239-
name: "WASM Linux",
240-
os: ubuntu-latest,
241-
build_type: Release,
242-
qt_arch: wasm_32,
243-
emsdk_version: 1.39.8,
244-
qt_version: 5.15.2,
245-
}
274+
name: "WASM Linux",
275+
os: ubuntu-latest,
276+
build_type: Release,
277+
qt_arch: wasm_32,
278+
emsdk_version: 1.39.8,
279+
qt_version: 5.15.2,
280+
}
246281
steps:
247282
- uses: actions/checkout@v4
248283
with:
@@ -257,21 +292,21 @@ jobs:
257292
id: cache-system-libraries
258293
uses: actions/cache@v4
259294
with:
260-
path: 'emsdk-cache'
295+
path: "emsdk-cache"
261296
key: ${{ runner.os }}-${{ matrix.config.emsdk_version }}-${{ matrix.config.qt_version }}-emsdk
262297

263298
- name: Setup emsdk
264299
uses: mymindstorm/setup-emsdk@v14
265300
with:
266301
version: ${{ matrix.config.emsdk_version }}
267-
actions-cache-folder: 'emsdk-cache'
302+
actions-cache-folder: "emsdk-cache"
268303

269304
- name: Install Qt
270305
uses: jurplel/install-qt-action@v3
271306
with:
272307
version: ${{ matrix.config.qt_version }}
273308
cache: true
274-
cache-key-prefix: 'wasm-qt'
309+
cache-key-prefix: "wasm-qt"
275310
arch: ${{ matrix.config.qt_arch }}
276311
dir: ${{ github.workspace }}/Qt
277312

@@ -281,13 +316,13 @@ jobs:
281316
- name: Configure CMake
282317
working-directory: ${{github.workspace}}/build
283318
run: "emcmake cmake $GITHUB_WORKSPACE
284-
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
285-
-DCMAKE_PREFIX_PATH=$Qt5_DIR
286-
-DCMAKE_FIND_ROOT_PATH=$Qt5_DIR
287-
-DCMAKE_C_COMPILER_LAUNCHER=ccache
288-
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
289-
-DFORCE_COLORED_OUTPUT=true
290-
-Wno-dev"
319+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
320+
-DCMAKE_PREFIX_PATH=$Qt5_DIR
321+
-DCMAKE_FIND_ROOT_PATH=$Qt5_DIR
322+
-DCMAKE_C_COMPILER_LAUNCHER=ccache
323+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
324+
-DFORCE_COLORED_OUTPUT=true
325+
-Wno-dev"
291326

292327
- name: Build
293328
working-directory: ${{ github.workspace }}/build
@@ -359,7 +394,7 @@ jobs:
359394
- uses: actions/checkout@v4
360395
with:
361396
submodules: true
362-
397+
363398
- name: Cache stud-support tests
364399
id: cache-stud-support
365400
uses: actions/cache@v4

.github/workflows/docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "docs/user/**"
9+
- ".github/workflows/docs.yml"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Setup mdBook
29+
uses: peaceiris/actions-mdbook@v2
30+
with:
31+
mdbook-version: "latest"
32+
33+
- name: Build the book
34+
run: mdbook build docs/user
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Prepare artifact with /manual subdirectory
40+
run: |
41+
rm -rf pages
42+
mkdir -p pages/manual
43+
cp -a docs/user/book/. pages/manual/
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: pages
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)