Skip to content

fixing read-the-docs build #38

fixing read-the-docs build

fixing read-the-docs build #38

Workflow file for this run

name: Doxygen Sphinx
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.os }}@${{ matrix.cfg.python-version }}
strategy:
matrix:
cfg:
- {os: ubuntu-latest, cc: gcc, cxx: g++, cpp-version: 10, python-version: 3.8, generator: Ninja}
- {os: ubuntu-latest, cc: gcc, cxx: g++, cpp-version: 10, python-version: 3.9, generator: Ninja}
- {os: ubuntu-latest, cc: gcc, cxx: g++, cpp-version: 10, python-version: '3.10', generator: Ninja}
- {os: ubuntu-latest, cc: gcc, cxx: g++, cpp-version: 10, python-version: '3.11', generator: Ninja}
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Set up Python ${{ matrix.cfg.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.cfg.python-version }}
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8 pytest
python3 -m pip install -r requirements.txt
- name: Install testing dependencies
run: |
python3 -m pip install codecov pytest-cov
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python3 -m flake8 ./DNetPRO --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# python3 -m flake8 ./DNetPRO --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install docs dependencies
run: |
python3 -m pip install -r docs/requirements.txt
- name: Install Doxygen
run: |
sudo apt install doxygen
- name: Install compiler and dependencies
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y ${{ matrix.cfg.cxx }}-${{ matrix.cfg.cpp-version }}
if [[ "${{ matrix.cfg.cxx }}" == "clang" ]]; then
sudo apt-get install -y lld-${{ matrix.cfg.cpp-version }} libc++-${{ matrix.cfg.cpp-version }}-dev libc++abi-${{ matrix.cfg.cpp-version }}-dev clang-tools-${{ matrix.cfg.cpp-version }}
fi
echo "CC=${{ matrix.cfg.cc }}-${{ matrix.cfg.cpp-version }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.cfg.cxx }}-${{ matrix.cfg.cpp-version }}" >> $GITHUB_ENV
- name: Build with CMake
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: false
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-G\"${{ matrix.cfg.generator }}\" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_DOCS:BOOL=ON -DPYWRAP:BOOL=ON -DOMP:BOOL=OFF -DFORCE_USE_SUBMODULES:BOOL=ON"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'