forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.5 KB
/
fbgemm_gpu_lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
name: FBGEMM_GPU Lint
on:
# PR Trigger
#
push:
branches:
- main
# Push Trigger (enable to catch errors coming out of multiple merges)
#
pull_request:
branches:
- main
concurrency:
# Cancel previous runs in the PR if a new commit is pushed
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run-lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
PRELUDE: .github/scripts/setup_env.bash
BUILD_ENV: build_binary
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Setup Miniconda
run: . $PRELUDE; setup_miniconda $HOME/miniconda
- name: Create Conda Environment
run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }}
- name: Install Lint Tools
run: . $PRELUDE; install_lint_tools $BUILD_ENV
- name: Linting the Codebase with flake8
run: . $PRELUDE; lint_fbgemm_gpu_flake8 $BUILD_ENV
- name: Linting the Codebase with ufmt
run: . $PRELUDE; lint_fbgemm_gpu_ufmt $BUILD_ENV
- name: Check Meta Copyright Headers
run: . $PRELUDE; lint_fbgemm_gpu_copyright $BUILD_ENV