Skip to content

563 add dependency info #2272

563 add dependency info

563 add dependency info #2272

Workflow file for this run

name: QA
on:
push:
branches:
- main
- 'v*.*'
pull_request:
branches:
- main
- 'v*.*'
concurrency:
# cancel any in-progress runs for the same group (branch/tag) {{github.ref}}
# if a new run is triggered, except for the main branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions: {} # Global security baseline added to completely disable all unmentioned token permissions
jobs:
checks:
name: Code Quality
permissions:
contents: read # Requires read access to fetch source files
runs-on: ubuntu-24.04
strategy:
max-parallel: 4
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
# This step does not need a GA cache
- name: Setup Compiler
run: |
sudo apt-get update -y
sudo apt-get install -y clang libclang-dev gcc gfortran
LLVM_VN=$(clang --version | head -n 1 | sed -E 's/.*version ([0-9]+)\..*/\1/')
echo "LD_LIBRARY_PATH=/usr/lib/llvm-${LLVM_VN}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
# xxxx (for reference only)
# Uncomment the following lines to install LLVM 20
# wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s -- 20
# sudo apt-get update -y
# sudo apt-get install -y gcc gfortran clang-20 libclang-20-dev
# ALT_LLVM_PATH=/usr/lib/llvm-20
# sudo update-alternatives --install \
# /usr/bin/clang clang "${ALT_LLVM_PATH}/bin/clang-20" 200
# sudo update-alternatives --config clang
# echo "LD_LIBRARY_PATH=${ALT_LLVM_PATH}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
# xxxx
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
# The clang binding version has to match the version in the Ubuntu being used.
- name: Install Python libraries
run: |
python -m pip install --upgrade pip
pip install .
pip install clang==18.1.8
# pip install clang==20.1.5
pip install .[dev,docs]
- name: Type check with mypy
run: python -m mypy source tests run_configs
- name: Code style check with flake8
if: always()
# see https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#always
run: flake8 . --count --show-source --statistics
- name: Unit tests with Pytest
if: always()
run: python -m pytest --cov=fab tests/unit_tests
- name: System tests with Pytest
if: always()
run: python -m pytest --cov=fab tests/system_tests
# Sphinx linkcheck can potentially detect false negatives due to network
# issues or slow responses. To avoid failing the build due to these
# issues, we set continue-on-error to true. Review the output for any
# actual issues.
- name: Link Checks
if: always()
working-directory: Documentation
run: |
sphinx-build -q -b linkcheck \
-d build/doctrees source build/linkcheck || true
echo "== Ignored and Redirected links, if any =="
jq -c 'select([.status] | inside(["ignored", "redirected"]))' \
build/linkcheck/output.json
continue-on-error: true