Move libcufft to other installer arg #310
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: pre-commit | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
linting: | |
name: run | |
runs-on: ubuntu-latest | |
env: | |
# gcc and clang are the latest supported by the CI runner, | |
# ubuntu 22.04 at the time of writing | |
gcc-version: 12 # = 12.1.0 | |
clang-version: 14 # = 14.0.0 | |
# cuda version to install with separate action | |
cuda-version: "12.2.0" | |
steps: | |
- name: Show git version | |
run: | | |
which git | |
git --version | |
- name: Check out a copy of the repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Show some relevant env vars | |
run: | | |
echo "GITHUB_BASE_REF = $GITHUB_BASE_REF" | |
echo "GITHUB_HEAD_REF = $GITHUB_HEAD_REF" | |
echo "GITHUB_REF_NAME = $GITHUB_REF_NAME" | |
- name: Set the target and source refs if the trigger was a pull request | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
echo "precommit_from_ref=$GITHUB_BASE_REF" >> $GITHUB_ENV | |
echo "precommit_to_ref=$GITHUB_HEAD_REF" >> $GITHUB_ENV | |
- name: Set the target and source refs if the trigger was not a pull request | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
echo "precommit_from_ref=main" >> $GITHUB_ENV | |
echo "precommit_to_ref=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
- name: Avoid problems with missing refs later | |
run: | | |
git checkout ${{ env.precommit_from_ref }} | |
git checkout ${{ env.precommit_to_ref }} | |
- name: Install cuda | |
uses: Jimver/[email protected] | |
with: | |
cuda: ${{ env.cuda-version }} | |
method: "network" | |
sub-packages: '["nvcc", "nvrtc", "nvtx"]' | |
non-cuda-sub-packages: '["libcufft"]' | |
linux-local-args: '["--toolkit"]' | |
- name: Generate compilation database | |
shell: bash -el {0} | |
run: | | |
cmake -DCMAKE_CXX_COMPILER=g++-${{ env.gcc-version }} -DCUDAWRAPPERS_BUILD_TESTING=True -DCUDAWRAPPERS_BUILD_EXAMPLES=True -S . -B build | |
- name: Run pre-commit on all files changed in this branch using project standard configuration | |
shell: bash -el {0} | |
run: | | |
git diff --name-only ${{ env.precommit_from_ref }}...${{ env.precommit_to_ref }} | |
pre-commit run --from-ref ${{ env.precommit_from_ref }} --to-ref ${{ env.precommit_to_ref }} |