summaryrefslogtreecommitdiff
path: root/.github/workflows/build_cmake.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build_cmake.yml')
-rw-r--r--.github/workflows/build_cmake.yml208
1 files changed, 125 insertions, 83 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 82c27be..e2e446b 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -4,6 +4,9 @@ on: [push, pull_request]
jobs:
build:
+ permissions:
+ contents: write # to push pages branch (peaceiris/actions-gh-pages)
+
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
@@ -15,28 +18,28 @@ jobs:
os: ubuntu-20.04,
build_type: "Release", cc: "gcc", cxx: "g++",
build_gen: "Unix Makefiles",
- cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES -Duse_sqlite3=ON"
+ cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES"
}
- {
name: "Ubuntu Latest GCC Debug",
os: ubuntu-20.04,
build_type: "Debug", cc: "gcc", cxx: "g++",
build_gen: "Unix Makefiles",
- cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES -Duse_sqlite3=ON"
+ cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES"
}
- {
name: "Ubuntu Latest Clang Release",
os: ubuntu-20.04,
build_type: "Release", cc: "clang", cxx: "clang++",
build_gen: "Unix Makefiles",
- cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO -Duse_sqlite3=ON"
+ cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO"
}
- {
name: "Ubuntu Latest Clang Debug",
os: ubuntu-20.04,
build_type: "Debug", cc: "clang", cxx: "clang++",
build_gen: "Unix Makefiles",
- cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO -Duse_sqlite3=ON"
+ cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO"
}
- {
name: "macOS Latest Release",
@@ -51,13 +54,13 @@ jobs:
build_gen: "Unix Makefiles"
}
- {
- name: "Windows Latest MSVC Debug",
+ name: "Windows Latest MSVC Debug",
os: windows-latest,
build_type: "Debug", cc: "cl", cxx: "cl",
build_gen: "NMake Makefiles"
}
- {
- name: "Windows Latest MSVC Release",
+ name: "Windows Latest MSVC Release",
os: windows-latest,
build_type: "Release", cc: "cl", cxx: "cl",
build_gen: "NMake Makefiles"
@@ -65,32 +68,36 @@ jobs:
steps:
- name: Checkout doxygen
uses: actions/checkout@v3
-
- - name: Download MikTex (Windows)
- run: |
- $wc = New-Object System.Net.WebClient;
- $maxAttempts=5;
- $attemptCount=0;
- Do {
- $attemptCount++;
- Try {
- $wc.DownloadFile("https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.2-x64.zip","miktexsetup-4.2-x64.zip")
- } Catch [Exception] {
- Write-Host $_.Exception | format-list -force
- }
- } while (((Test-Path "miktexsetup-4.2-x64.zip") -eq $false) -and ($attemptCount -le $maxAttempts))
- shell: pwsh
- if: matrix.config.os == 'windows-latest'
-
+ with:
+ fetch-depth: 0
+
+# - name: Download MikTex (Windows)
+# run: |
+# $wc = New-Object System.Net.WebClient;
+# $maxAttempts=5;
+# $attemptCount=0;
+# Do {
+# $attemptCount++;
+# Try {
+# $wc.DownloadFile("https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-5.2.0+b8f430f-x64.zip","miktexsetup-5.2.0+b8f430f-x64.zip")
+# } Catch [Exception] {
+# Write-Host $_.Exception | format-list -force
+# }
+# } while (((Test-Path "miktexsetup-5.2.0+b8f430f-x64.zip") -eq $false) -and ($attemptCount -le $maxAttempts))
+# shell: pwsh
+# if: matrix.config.os == 'windows-latest'
+
- name: Install libiconv (Windows)
uses: suisei-cn/actions-download-file@v1
- with:
+ with:
url: "https://github.com/pffang/libiconv-for-Windows/releases/download/v1.16/libiconv-for-Windows_1.16.7z"
- target: .
+ target: .
if: matrix.config.os == 'windows-latest'
- name: Install LaTeX (Linux)
run: |
+ sudo apt update --fix-missing
+ sudo apt upgrade
sudo apt update
sudo apt-get install texlive texlive-latex-recommended texlive-extra-utils texlive-latex-extra texlive-font-utils
if: startsWith(matrix.config.os,'ubuntu-')
@@ -101,18 +108,18 @@ jobs:
brew install --cask mactex;
echo "/Library/TeX/texbin/" >> $GITHUB_PATH
if: matrix.config.os == 'macos-latest'
-
+
- name: Install libclang (Ubuntu 20.04)
run: |
sudo apt update
sudo apt remove llvm-8 clang-8 libclang-common-8-dev clang-format-8 libllvm8
sudo apt remove llvm-9 llvm-9-dev llvm-9-tools llvm-9-runtime clang-9 libclang-common-9-dev clang-format-9 libllvm9
- #sudo apt remove llvm-10 llvm-10-dev llvm-10-tools llvm-10-runtime clang-10 clang-format-10 libclang-common-10-dev libclang-cpp10 libclang1-10 libllvm10
- sudo apt remove llvm-11 llvm-11-dev llvm-11-tools llvm-11-runtime clang-11 clang-format-11 libclang-common-11-dev libclang-cpp11 libclang1-11 libllvm11
- sudo apt remove llvm-12 llvm-12-dev llvm-12-tools llvm-12-runtime clang-12 clang-format-12 libclang-common-12-dev libclang-cpp12 libclang1-12 libllvm12
+ #sudo apt remove llvm-10 llvm-10-dev llvm-10-tools llvm-10-runtime clang-10 clang-format-10 libclang-common-10-dev libclang-cpp10 libclang1-10 libllvm10
+ sudo apt remove llvm-11 llvm-11-dev llvm-11-tools llvm-11-runtime clang-11 clang-format-11 libclang-common-11-dev libclang-cpp11 libclang1-11 libllvm11
+ sudo apt remove llvm-12 llvm-12-dev llvm-12-tools llvm-12-runtime clang-12 clang-format-12 libclang-common-12-dev libclang-cpp12 libclang1-12 libllvm12
sudo apt-get autoremove
sudo apt-get clean
- sudo apt install libclang-common-10-dev libclang-10-dev
+ sudo apt install libclang-common-10-dev libclang-10-dev
apt list --installed | egrep '(clang|llvm)'
ls -d /usr/lib/llvm-*/include/
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100
@@ -122,46 +129,58 @@ jobs:
which clang++
clang++ -v
if: matrix.config.os == 'ubuntu-20.04'
-
+
- name: Install libxapian (Ubuntu 20.04)
run: |
sudo apt update
sudo apt install libxapian-dev
if: matrix.config.os == 'ubuntu-20.04'
-
- - name: Extract MikTex zip (Windows)
- shell: bash
- run: |
- unzip miktexsetup-4.2-x64.zip
- if: matrix.config.os == 'windows-latest'
-
- - name: Download MikTex packages (Windows)
- shell: bash
- run: |
- ./miktexsetup_standalone --verbose \
- --local-package-repository=C:/miktex-repository \
- --remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
- --package-set=essential \
- download
- if: matrix.config.os == 'windows-latest'
- - name: Install MikTex packages (Windows)
- shell: bash
- run: |
- ./miktexsetup_standalone --local-package-repository=C:/miktex-repository \
- --package-set=essential \
- --shared \
- install
- if: matrix.config.os == 'windows-latest'
+# - name: Extract MikTex zip (Windows)
+# shell: bash
+# run: |
+# unzip miktexsetup-5.2.0+b8f430f-x64.zip
+# if: matrix.config.os == 'windows-latest'
+#
+# - name: Download MikTex packages (Windows)
+# shell: bash
+# run: |
+# ./miktexsetup_standalone --verbose \
+# --local-package-repository="C:/miktex-repository" \
+# --remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
+# --package-set=essential \
+# download
+# if: matrix.config.os == 'windows-latest'
+#
+# - name: Install MikTex packages (Windows)
+# shell: bash
+# run: |
+# ./miktexsetup_standalone --local-package-repository="C:/miktex-repository" \
+# --verbose \
+# --package-set=essential \
+# --shared \
+# install
+# if: matrix.config.os == 'windows-latest'
+#
+# - name: Setting MikTex paths (Windows)
+# shell: bash
+# run: |
+# echo "C:/Program Files/MiKTeX/miktex/bin/x64/" >> $GITHUB_PATH
+# export PATH="/c/Program Files/MiKTeX/miktex/bin/x64/:$PATH"
+#
+# echo "Configuring MiKTeX to install missing packages on the fly"
+# initexmf --admin --verbose --set-config-value='[MPM]AutoInstall=1'
+# if: matrix.config.os == 'windows-latest'
- - name: Setting MikTex paths (Windows)
- shell: bash
- run: |
- echo "C:/Program Files/MiKTeX/miktex/bin/x64/" >> $GITHUB_PATH
- export PATH="/c/Program Files/MiKTeX/miktex/bin/x64/:$PATH"
-
- echo "Configuring MiKTeX to install missing packages on the fly"
- initexmf --admin --verbose --set-config-value='[MPM]AutoInstall=1'
+ - name: Install LaTeX (Windows)
+ uses: teatimeguest/setup-texlive-action@v2
+ with:
+ packages: >-
+ scheme-medium
+ collection-latexextra
+ babel-dutch
+ cjk
+ bibtex
if: matrix.config.os == 'windows-latest'
- name: Install Ghostscript (Linux)
@@ -169,7 +188,7 @@ jobs:
sudo apt update
sudo apt-get install ghostscript
if: startsWith(matrix.config.os,'ubuntu-')
-
+
- name: Install Ghostscript (Windows)
run:
choco install ghostscript
@@ -183,7 +202,7 @@ jobs:
export GSpath=`echo "$GSpath" | sed -e "s%/c%C:%"`
echo "$GSpath" >> $GITHUB_PATH
if: matrix.config.os == 'windows-latest'
-
+
- name: Install xmllint (Linux)
run: |
sudo apt-get update
@@ -191,18 +210,21 @@ jobs:
if: startsWith(matrix.config.os,'ubuntu-')
- name: Install xmllint (MacOS)
- run: brew install libxml2
+ run: |
+ brew update
+ brew install libxml2
if: matrix.config.os == 'macos-latest'
- name: Install bison (MacOS)
run: |
+ brew update
brew install bison;
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
if: matrix.config.os == 'macos-latest'
-
+
- name: Install bison/flex (Windows)
run: |
- Choco-Install -PackageName winflexbison
+ Choco-Install -PackageName winflexbison
#choco install winflexbison
if: matrix.config.os == 'windows-latest'
@@ -213,7 +235,15 @@ jobs:
if: startsWith(matrix.config.os,'ubuntu-')
- name: Install Graphviz (MacOS)
- run: brew install graphviz
+ run: |
+ if ! brew install graphviz; then
+ # Workaround issue with unexpected symlinks: https://github.com/actions/runner-images/issues/6817
+ for f in 2to3 idle3 pydoc3 python3 python3-config; do
+ rm /usr/local/bin/$f || true
+ done
+ # Try again
+ brew install graphviz
+ fi
if: matrix.config.os == 'macos-latest'
- name: Install Graphviz (Windows)
@@ -231,13 +261,14 @@ jobs:
if: matrix.config.os == 'windows-latest'
- name: Refresh Env (Windows)
- run:
+ run: |
+ Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
if: matrix.config.os == 'windows-latest'
-
+
- name: Install Qt
- uses: jurplel/install-qt-action@v2
-
+ uses: jurplel/install-qt-action@v3
+
- name: Check tool versions (Linux / MacOS)
shell: bash
run: |
@@ -302,7 +333,7 @@ jobs:
-G "${{ matrix.config.build_gen }}"
-Dbuild_doc=YES
-Dbuild_wizard=YES
- ${{ matrix.config.cmake_extra_opts }}
+ ${{ matrix.config.cmake_extra_opts }}
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
@@ -315,7 +346,7 @@ jobs:
include(ProcessorCount)
ProcessorCount(N)
execute_process(
- COMMAND cmake --build build --parallel ${N}
+ COMMAND cmake --build build --parallel ${N}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE output
@@ -340,7 +371,9 @@ jobs:
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
execute_process(
- COMMAND cmake --build build --target tests TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf"
+ COMMAND
+ cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf"
+ cmake --build build --target tests
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
@@ -354,7 +387,9 @@ jobs:
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
execute_process(
- COMMAND cmake --build build --target tests TEST_FLAGS="--xml --xmlxsd"
+ COMMAND
+ cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --pdf"
+ cmake --build build --target tests
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
@@ -372,7 +407,6 @@ jobs:
if (NOT result EQUAL 0)
message(FATAL_ERROR "Building documentation failed")
endif()
- if: matrix.config.os != 'windows-latest'
- name: Archive html documentation artifacts
uses: actions/upload-artifact@v3
@@ -388,17 +422,25 @@ jobs:
name: "Latex documentation artifacts"
path: build/latex/doxygen_manual.pdf
if: matrix.config.name == 'Ubuntu Latest GCC Release'
-
+
- name: Generate Internal documentation
- shell: bash
+ shell: cmake -P {0}
run: |
- build/bin/doxygen Doxyfile
+ execute_process(
+ COMMAND cmake --build build --target docs_internal
+ RESULT_VARIABLE result
+ )
+ if (NOT result EQUAL 0)
+ message(FATAL_ERROR "Building internal documentation failed")
+ endif()
if: matrix.config.name == 'Ubuntu Latest GCC Release'
- name: Publish Internal documentation to Github pages
uses: peaceiris/actions-gh-pages@v3
with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: doxygen_docs/html
+ deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ external_repository: doxygen/doxygen-docs
+ publish_dir: build/doxygen_docs/html
+ force_orphan: true
if: ${{ github.event_name == 'push' && matrix.config.name == 'Ubuntu Latest GCC Release' }}