forked from intel/cicd-repo-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 📚 Fix mermaid diagram generation on Ubuntu
Problem: - Ubuntu 23.10 and later has security rules around running chrome, which means mermaid-cli can't generate diagrams without a workaround. - See mermaid-js/mermaid-cli#730 Solution: - Provide a puppeteer_config.json file in the docs directory which can be passed to mmdc by specifying an attribute in AsciiDoctor markdown. - See https://docs.asciidoctor.org/diagram-extension/latest/diagram_types/mermaid/
- Loading branch information
Showing
11 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ jobs: | |
node-version: 20 | ||
- name: Install Mermaid | ||
run: | | ||
sudo npm install -g @mermaid-js/[email protected].0 | ||
sudo npm install -g @mermaid-js/[email protected].1 | ||
- name: Install asciidoctor | ||
run: | | ||
sudo apt update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
|
||
- name: Install Mermaid | ||
run: | | ||
sudo npm install -g @mermaid-js/[email protected].0 | ||
sudo npm install -g @mermaid-js/[email protected].1 | ||
- name: Install asciidoctor | ||
run: | | ||
|
@@ -75,32 +75,36 @@ jobs: | |
run: | | ||
pip install mypy black | ||
- name: Restore CPM cache | ||
env: | ||
cache-name: cpm-cache-0 | ||
id: cpm-cache-restore | ||
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ~/cpm-cache | ||
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} | ||
restore-keys: | | ||
${{runner.os}}-${{env.cache-name}}- | ||
- name: Configure cmake for lib | ||
env: | ||
CC: "/usr/lib/llvm-${{env.TARGET_LLVM_VERSION}}/bin/clang" | ||
CXX: "/usr/lib/llvm-${{env.TARGET_LLVM_VERSION}}/bin/clang++" | ||
PR_TARGET_BRANCH: ${{ steps.target_branch.outputs.branch }} | ||
working-directory: ${{github.workspace}}/test/library | ||
run: cmake -Bbuild -DCPM_SOURCE_CACHE=~/cpm-cache | ||
run: cmake -Bbuild | ||
|
||
- name: Check lib quality | ||
working-directory: ${{github.workspace}}/test/library | ||
run: cmake --build build -t ci-quality | ||
|
||
- name: Build lib docs | ||
working-directory: ${{github.workspace}}/test/library | ||
run: cmake --build build -t docs | ||
run: | | ||
ls -laR | ||
cmake --build build -v -t docs | ||
cmake --build build clean | ||
test $(cmake --build build -v -t docs | grep -c ERROR) == 0 | ||
- name: Restore CPM cache | ||
env: | ||
cache-name: cpm-cache-0 | ||
id: cpm-cache-restore | ||
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ~/cpm-cache | ||
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} | ||
restore-keys: | | ||
${{runner.os}}-${{env.cache-name}}- | ||
- name: Configure cmake for app | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ jobs: | |
node-version: 20 | ||
- name: Install Mermaid | ||
run: | | ||
sudo npm install -g @mermaid-js/[email protected].0 | ||
sudo npm install -g @mermaid-js/[email protected].1 | ||
- name: Install asciidoctor | ||
run: | | ||
sudo apt update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"args": ["--no-sandbox"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Ben Deane <[email protected]> | |
:rouge-style: base16.solarized | ||
:source-language: c++ | ||
:toc: left | ||
:mermaid-puppeteer-config: puppeteer_config.json | ||
|
||
== Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters