Refactor setup.py to align with CF. #3421
Workflow file for this run
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: Formatting check | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
black: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | |
python -m pip install --upgrade pip | |
pip install click==8.0.4 black | |
- uses: actions/checkout@v3 | |
- name: Run Black | |
run: black -l 100 pennylane_lightning/ tests/ --check | |
format-cpp: | |
name: Format (C++) | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Install dependencies | |
run: sudo apt update && sudo apt -y install clang-format-14 python3 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run formatter | |
run: ./bin/format --check --cfversion 14 ./pennylane_lightning/src | |
build_and_cache_Kokkos: | |
name: "Build and cache Kokkos and Kokkos Kernels" | |
uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml | |
with: | |
os: ubuntu-22.04 | |
tidy-cpp: | |
needs: [build_and_cache_Kokkos] | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
exec_model: ${{ fromJson(needs.build_and_cache_Kokkos.outputs.exec_model) }} | |
kokkos_version: ${{ fromJson(needs.build_and_cache_Kokkos.outputs.kokkos_version) }} | |
name: Tidy (C++) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout PennyLane-Lightning | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Restoring cached dependencies | |
id: kokkos-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }} | |
key: ${{ matrix.os }}-kokkos${{ matrix.kokkos_version }}-${{ matrix.exec_model }} | |
- name: Copy cached libraries | |
run: | | |
mkdir Kokkos/ | |
cp -rf ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/ | |
- name: Install dependencies | |
run: sudo apt update && sudo apt -y install clang-tidy-14 cmake g++-10 ninja-build libomp-14-dev | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Run clang-tidy compilation | |
run: | | |
cmake -BBuild -DENABLE_CLANG_TIDY=ON -DCLANG_TIDY_BINARY=clang-tidy-14 -DBUILD_TESTS=ON -DENABLE_WARNINGS=ON -DCMAKE_CXX_COMPILER="$(which g++-10)" -G Ninja . | |
cmake --build ./Build |