fixed #33 #102
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
name: ci | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.py" | |
- "**.css" | |
- "**.js" | |
- "**.json" | |
- "**.xml" | |
- "**/poxy/data/*" | |
- "**/workflows/**.yaml" | |
- "pyproject.toml" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "**.py" | |
- "**.css" | |
- "**.js" | |
- "**.json" | |
- "**.xml" | |
- "**/poxy/data/*" | |
- "**/workflows/**.yaml" | |
- "pyproject.toml" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
clang_version: "15" | |
gcc_version: "12" | |
jobs: | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- "clang" | |
linker: | |
- "lld" | |
doxygen_tag: | |
#- "Release_1_8_17" | |
#- "Release_1_8_18" | |
#- "Release_1_8_19" | |
#- "Release_1_8_20" | |
#- "Release_1_9_0" | |
#- "Release_1_9_1" | |
#- "Release_1_9_2" | |
#- "Release_1_9_3" | |
#- "Release_1_9_4" | |
#- "Release_1_9_5" | |
#- "Release_1_9_6" | |
- "none" | |
os: | |
- "ubuntu-latest" | |
- "ubuntu-20.04" | |
runs-on: "${{ matrix.os }}" | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Install base dependencies | |
run: | | |
sudo apt -y update | |
sudo apt -y install --no-install-recommends git python3 python3-pip | |
- name: Install python dependencies | |
run: | | |
sudo python3 -m pip install --upgrade pip build | |
- name: Install compiler dependencies | |
if: ${{ matrix.doxygen_tag != 'none' }} | |
run: | | |
sudo apt -y install --no-install-recommends cmake flex bison libstdc++-${{ env.gcc_version }}-dev | |
- name: Install lld | |
if: ${{ matrix.doxygen_tag != 'none' && startsWith(matrix.linker, 'lld') }} | |
run: | | |
sudo apt -y install --no-install-recommends lld-${{ env.clang_version }} | |
sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${{ env.clang_version }} 1000 | |
- name: Install clang | |
if: ${{ matrix.doxygen_tag != 'none' && startsWith(matrix.compiler, 'clang') }} | |
run: | | |
sudo apt -y install --no-install-recommends clang-${{ env.clang_version }} | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ env.clang_version }} 1000 | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ env.clang_version }} 1000 | |
- name: Install gcc | |
if: ${{ matrix.doxygen_tag != 'none' && startsWith(matrix.compiler, 'gcc') }} | |
run: | | |
sudo apt -y install --no-install-recommends gcc-${{ env.gcc_version }} g++-${{ env.gcc_version }} | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${{ env.gcc_version }} 1000 | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ env.gcc_version }} 1000 | |
- uses: actions/checkout@v3 | |
with: | |
path: repo | |
- name: Install poxy | |
run: | | |
cd "${{ github.workspace }}/repo" | |
sudo python3 -m pip install --upgrade . | |
- name: Print poxy help and version | |
run: | | |
poxy --help | |
poxy --version | |
- name: Build and install doxygen from source | |
if: ${{ matrix.doxygen_tag != 'none' }} | |
run: | | |
cd "${{ github.workspace }}" | |
git clone --depth 1 --branch ${{ matrix.doxygen_tag }} https://github.com/doxygen/doxygen.git | |
cd doxygen | |
mkdir build | |
cd build | |
CC=cc CC_LD=${{ matrix.linker }} CXX=c++ CXX_LD=${{ matrix.linker }} cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel .. | |
CC=cc CC_LD=${{ matrix.linker }} CXX=c++ CXX_LD=${{ matrix.linker }} make -j | |
CC=cc CC_LD=${{ matrix.linker }} CXX=c++ CXX_LD=${{ matrix.linker }} sudo make install | |
- name: Install doxygen from apt | |
if: ${{ matrix.doxygen_tag == 'none' }} | |
run: | | |
sudo apt -y install doxygen | |
doxygen --version | |
poxy --doxygen-version | |
- name: Run poxy on test_project | |
run: | | |
cd "${{ github.workspace }}/repo/tests/test_project" | |
poxy | |
poxy --xml | |
poxy --verbose | |
poxy --bug-report |