[ci] Add lint job and enable yaml linting of GH files. (#2819)

pull/2820/head
Stella Laurenzo 2024-01-27 15:48:06 -08:00 committed by GitHub
parent 28c7051ceb
commit 4a4d80a6ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 613 additions and 591 deletions

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: "Setup build environment" name: "Setup build environment"
description: "Setup the build environment. An action so that it can be shared between in-tree/out-of-tree jobs" description: "Setup the build environment. An action so that it can be shared between in-tree/out-of-tree jobs"

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: Roll PyTorch name: Roll PyTorch
on: on:
@ -14,7 +15,6 @@ jobs:
if: github.repository == 'llvm/torch-mlir' if: github.repository == 'llvm/torch-mlir'
steps: steps:
- name: Prepare workspace - name: Prepare workspace
run: | run: |
# Clear the workspace directory so that we don't run into errors about # Clear the workspace directory so that we don't run into errors about

View File

@ -1,8 +1,9 @@
# yamllint disable rule:line-length
name: Bazel Build and Test name: Bazel Build and Test
on: on:
push: push:
branches: [ main ] branches: [main]
workflow_dispatch: workflow_dispatch:
# Ensure that only a single job or workflow using the same # Ensure that only a single job or workflow using the same

View File

@ -1,10 +1,11 @@
# yamllint disable rule:line-length
name: Build and Test name: Build and Test
on: on:
pull_request: pull_request:
branches: [ main ] branches: [main]
push: push:
branches: [ main ] branches: [main]
workflow_dispatch: workflow_dispatch:
# Ensure that only a single job or workflow using the same # Ensure that only a single job or workflow using the same
@ -57,7 +58,6 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Prepare workspace - name: Prepare workspace
if: ${{ matrix.os-arch == 'ubuntu-x86_64' }} if: ${{ matrix.os-arch == 'ubuntu-x86_64' }}
run: | run: |

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: Release Build name: Release Build
on: on:
@ -16,11 +17,10 @@ jobs:
runs-on: a100 runs-on: a100
strategy: strategy:
matrix: matrix:
package: [ torch-mlir ] package: [torch-mlir]
py_version: [ cp38-cp38, cp311-cp311 ] py_version: [cp38-cp38, cp311-cp311]
steps: steps:
- name: Prepare workspace - name: Prepare workspace
run: | run: |
# Clear the workspace directory so that we don't run into errors about # Clear the workspace directory so that we don't run into errors about
@ -85,11 +85,10 @@ jobs:
runs-on: linux-arm64 runs-on: linux-arm64
strategy: strategy:
matrix: matrix:
package: [ torch-mlir ] package: [torch-mlir]
py_version: [ cp311-cp311 ] py_version: [cp311-cp311]
steps: steps:
- name: Prepare workspace - name: Prepare workspace
run: | run: |
# Clear the workspace directory so that we don't run into errors about # Clear the workspace directory so that we don't run into errors about
@ -154,7 +153,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
strategy: strategy:
matrix: matrix:
package: [ torch-mlir ] package: [torch-mlir]
steps: steps:
- name: Get torch-mlir - name: Get torch-mlir
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -214,7 +213,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
package: [ torch-mlir ] package: [torch-mlir]
steps: steps:
- name: Get torch-mlir - name: Get torch-mlir
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
# See: https://github.com/llvm/torch-mlir/issues/1374 # See: https://github.com/llvm/torch-mlir/issues/1374
name: Publish releases page name: Publish releases page

17
.github/workflows/lint.yml vendored 100644
View File

@ -0,0 +1,17 @@
name: Lint Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
static_lint_checks:
name: Static Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate GitHub Actions yaml files
run: |
yamllint ./.github/workflows/ ./.github/actions/

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: RollPyTorch Merge name: RollPyTorch Merge
on: on:

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: Release oneshot snapshot package name: Release oneshot snapshot package
on: on:

View File

@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: Release snapshot package name: Release snapshot package
on: on: