Update pip packages and doc fixes
#298
This file contains hidden or 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: Lint checks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled' | |
| required: false | |
| default: false | |
| env: | |
| NOMP_CONDA_ENV: /usr/share/miniconda/envs/libnomp-dev | |
| NOMP_INSTALL_DIR: ${{ github.workspace }}/install | |
| NOMP_CACHE_NUMBER: 0 # Increase to reset cache manually. | |
| jobs: | |
| lint-check: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Setup GitHub actions | |
| uses: actions/checkout@v3 | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3.13 | |
| if: ${{ inputs.debug_enabled }} | |
| - name: Setup conda environment | |
| id: setup_conda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: libnomp-dev | |
| use-mamba: false | |
| - name: Cache conda environment | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.NOMP_CONDA_ENV }} | |
| key: conda-${{ runner.os }}-${{ hashFiles('environment-dev.yml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ env.NOMP_CACHE_NUMBER }} | |
| id: cache | |
| - name: Update conda environment | |
| id: update_env | |
| run: | | |
| conda env update -n libnomp-dev -f environment-dev.yml | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Run clang-format check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| ./lnbuild --format-check | |
| - name: Run clang-tidy check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| # FIXME: Skipping the clang-tidy checks for now. | |
| # ./lnbuild --tidy-check | |
| - name: Run pylint check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| ./lnbuild --pylint-check | |
| - name: Run black check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| ./lnbuild --black-check | |
| - name: Run isort check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| ./lnbuild --isort-check | |
| - name: Run flake8 check | |
| run: | | |
| ./lncfg --install-prefix ${NOMP_INSTALL_DIR} --prefix-path ${CONDA_PREFIX} | |
| ./lnbuild --flake8-check |