Skip to content

Commit 24b509d

Browse files
authored
style: enable pre-commit to format GitHub Actions YAML files (#5189)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Standardized formatting and YAML structure across GitHub Actions workflows. * Expanded code formatting tool configuration to include additional file types in the formatting automation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 8995b25 commit 24b509d

11 files changed

Lines changed: 354 additions & 354 deletions

.github/workflows/build_cc.yml

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,69 @@ jobs:
1818
strategy:
1919
matrix:
2020
include:
21-
- variant: cpu
22-
dp_variant: cpu
23-
- variant: cuda120
24-
dp_variant: cuda
25-
- variant: rocm
26-
dp_variant: rocm
27-
- variant: clang
28-
dp_variant: clang
21+
- variant: cpu
22+
dp_variant: cpu
23+
- variant: cuda120
24+
dp_variant: cuda
25+
- variant: rocm
26+
dp_variant: rocm
27+
- variant: clang
28+
dp_variant: clang
2929
steps:
30-
- uses: actions/checkout@v6
31-
- uses: actions/setup-python@v6
32-
with:
33-
python-version: '3.11'
34-
- uses: lukka/get-cmake@latest
35-
- run: python -m pip install uv
36-
- run: source/install/uv_with_retry.sh pip install --system --group pin_tensorflow_cpu --group pin_pytorch_cpu --torch-backend cpu
37-
- run: |
38-
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
39-
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
40-
&& sudo apt-get update \
41-
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
42-
if: matrix.variant == 'cuda120'
43-
env:
44-
DEBIAN_FRONTEND: noninteractive
45-
- run: |
46-
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/6.3/ jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list \
47-
&& printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 \
48-
&& curl -s https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add - \
49-
&& sudo apt-get update \
50-
&& sudo apt-get install -y rocm-dev hipcub-dev
51-
if: matrix.variant == 'rocm'
52-
- run: |
53-
source/install/build_cc.sh
54-
env:
55-
DP_VARIANT: ${{ matrix.dp_variant }}
56-
DOWNLOAD_TENSORFLOW: "FALSE"
57-
CMAKE_GENERATOR: Ninja
58-
if: matrix.variant != 'clang'
59-
- run: |
60-
source/install/build_cc.sh
61-
env:
62-
DP_VARIANT: cpu
63-
DOWNLOAD_TENSORFLOW: "FALSE"
64-
CC: clang
65-
CXX: clang++
66-
CMAKE_GENERATOR: Ninja
67-
if: matrix.variant == 'clang'
68-
- name: Test files exist
69-
run: |
70-
test -f dp/bin/dp_ipi &&
71-
test -f dp/lib/libdeepmd_cc.so &&
72-
test -f dp/lib/libdeepmd_c.so &&
73-
test -f dp/lib/libdeepmd_op.so &&
74-
test -f dp/lib/libdeepmd_ipi.so &&
75-
test -f dp/lib/libdeepmd_lmp.so &&
76-
test -f dp/lib/libdeepmd.so
30+
- uses: actions/checkout@v6
31+
- uses: actions/setup-python@v6
32+
with:
33+
python-version: "3.11"
34+
- uses: lukka/get-cmake@latest
35+
- run: python -m pip install uv
36+
- run: source/install/uv_with_retry.sh pip install --system --group pin_tensorflow_cpu --group pin_pytorch_cpu --torch-backend cpu
37+
- run: |
38+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
39+
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
40+
&& sudo apt-get update \
41+
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
42+
if: matrix.variant == 'cuda120'
43+
env:
44+
DEBIAN_FRONTEND: noninteractive
45+
- run: |
46+
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/6.3/ jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list \
47+
&& printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 \
48+
&& curl -s https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add - \
49+
&& sudo apt-get update \
50+
&& sudo apt-get install -y rocm-dev hipcub-dev
51+
if: matrix.variant == 'rocm'
52+
- run: |
53+
source/install/build_cc.sh
54+
env:
55+
DP_VARIANT: ${{ matrix.dp_variant }}
56+
DOWNLOAD_TENSORFLOW: "FALSE"
57+
CMAKE_GENERATOR: Ninja
58+
if: matrix.variant != 'clang'
59+
- run: |
60+
source/install/build_cc.sh
61+
env:
62+
DP_VARIANT: cpu
63+
DOWNLOAD_TENSORFLOW: "FALSE"
64+
CC: clang
65+
CXX: clang++
66+
CMAKE_GENERATOR: Ninja
67+
if: matrix.variant == 'clang'
68+
- name: Test files exist
69+
run: |
70+
test -f dp/bin/dp_ipi &&
71+
test -f dp/lib/libdeepmd_cc.so &&
72+
test -f dp/lib/libdeepmd_c.so &&
73+
test -f dp/lib/libdeepmd_op.so &&
74+
test -f dp/lib/libdeepmd_ipi.so &&
75+
test -f dp/lib/libdeepmd_lmp.so &&
76+
test -f dp/lib/libdeepmd.so
7777
pass:
7878
name: Pass building C++
7979
needs: [buildcc]
8080
runs-on: ubuntu-latest
8181
if: always()
8282
steps:
83-
- name: Decide whether the needed jobs succeeded or failed
84-
uses: re-actors/alls-green@release/v1
85-
with:
86-
jobs: ${{ toJSON(needs) }}
83+
- name: Decide whether the needed jobs succeeded or failed
84+
uses: re-actors/alls-green@release/v1
85+
with:
86+
jobs: ${{ toJSON(needs) }}

.github/workflows/build_wheel.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
DP_VARIANT: ${{ matrix.dp_variant }}
6868
CUDA_VERSION: ${{ matrix.cuda_version }}
6969
DP_PKG_NAME: ${{ matrix.dp_pkg_name }}
70-
CIBW_BUILD_FRONTEND: 'build[uv]'
70+
CIBW_BUILD_FRONTEND: "build[uv]"
7171
- uses: actions/upload-artifact@v6
7272
with:
7373
name: cibw-cp${{ matrix.python }}-${{ matrix.platform_id }}-cu${{ matrix.cuda_version }}-${{ strategy.job-index }}
@@ -157,7 +157,7 @@ jobs:
157157
- uses: actions/setup-python@v6
158158
name: Install Python
159159
with:
160-
python-version: '3.11'
160+
python-version: "3.11"
161161
- run: pip install dumb-pypi
162162
- run: |
163163
ls dist/packages > package_list.txt
@@ -187,7 +187,7 @@ jobs:
187187
runs-on: ubuntu-latest
188188
if: always()
189189
steps:
190-
- name: Decide whether the needed jobs succeeded or failed
191-
uses: re-actors/alls-green@release/v1
192-
with:
193-
jobs: ${{ toJSON(needs) }}
190+
- name: Decide whether the needed jobs succeeded or failed
191+
uses: re-actors/alls-green@release/v1
192+
with:
193+
jobs: ${{ toJSON(needs) }}

.github/workflows/codeql.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "pre-commit-ci-update-config"
1010
pull_request:
1111
schedule:
12-
- cron: '45 2 * * 2'
12+
- cron: "45 2 * * 2"
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
1515
cancel-in-progress: true
@@ -26,42 +26,42 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
language: [ 'c-cpp', 'javascript-typescript', 'python' ]
29+
language: ["c-cpp", "javascript-typescript", "python"]
3030

3131
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v6
34-
- uses: actions/setup-python@v6
35-
with:
36-
python-version: '3.11'
37-
cache: 'pip'
38-
if: matrix.language == 'c-cpp'
39-
- name: "Setup dependencies"
40-
if: matrix.language == 'c-cpp'
41-
run: |
42-
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
43-
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
44-
&& sudo apt-get update \
45-
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
46-
python -m pip install uv
47-
uv pip install --system --group pin_tensorflow_cpu --group pin_pytorch_cpu --torch-backend cpu
48-
env:
49-
DEBIAN_FRONTEND: noninteractive
50-
# Initializes the CodeQL tools for scanning.
51-
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@v4
53-
with:
54-
languages: ${{ matrix.language }}
55-
queries: security-extended,security-and-quality
56-
- name: "Run, Build Application using script"
57-
run: |
58-
source/install/build_cc.sh
59-
env:
60-
DP_VARIANT: cuda
61-
DOWNLOAD_TENSORFLOW: "FALSE"
62-
if: matrix.language == 'c-cpp'
32+
- name: Checkout repository
33+
uses: actions/checkout@v6
34+
- uses: actions/setup-python@v6
35+
with:
36+
python-version: "3.11"
37+
cache: "pip"
38+
if: matrix.language == 'c-cpp'
39+
- name: "Setup dependencies"
40+
if: matrix.language == 'c-cpp'
41+
run: |
42+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
43+
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
44+
&& sudo apt-get update \
45+
&& sudo apt-get -y install cuda-cudart-dev-12-2 cuda-nvcc-12-2
46+
python -m pip install uv
47+
uv pip install --system --group pin_tensorflow_cpu --group pin_pytorch_cpu --torch-backend cpu
48+
env:
49+
DEBIAN_FRONTEND: noninteractive
50+
# Initializes the CodeQL tools for scanning.
51+
- name: Initialize CodeQL
52+
uses: github/codeql-action/init@v4
53+
with:
54+
languages: ${{ matrix.language }}
55+
queries: security-extended,security-and-quality
56+
- name: "Run, Build Application using script"
57+
run: |
58+
source/install/build_cc.sh
59+
env:
60+
DP_VARIANT: cuda
61+
DOWNLOAD_TENSORFLOW: "FALSE"
62+
if: matrix.language == 'c-cpp'
6363

64-
- name: Perform CodeQL Analysis
65-
uses: github/codeql-action/analyze@v4
66-
with:
67-
category: "/language:${{matrix.language}}"
64+
- name: Perform CodeQL Analysis
65+
uses: github/codeql-action/analyze@v4
66+
with:
67+
category: "/language:${{matrix.language}}"

.github/workflows/labeler.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: "Pull Request Labeler"
2-
on:
3-
- pull_request_target
4-
5-
jobs:
6-
triage:
7-
permissions:
8-
contents: read
9-
pull-requests: write
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/labeler@v6
13-
with:
14-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
triage:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/labeler@v6
13+
with:
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/package_c.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
runs-on: ubuntu-latest
8181
if: always()
8282
steps:
83-
- name: Decide whether the needed jobs succeeded or failed
84-
uses: re-actors/alls-green@release/v1
85-
with:
86-
jobs: ${{ toJSON(needs) }}
83+
- name: Decide whether the needed jobs succeeded or failed
84+
uses: re-actors/alls-green@release/v1
85+
with:
86+
jobs: ${{ toJSON(needs) }}

.github/workflows/remove_test_cuda_label.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test CUDA'
1414
steps:
15-
- uses: actions-ecosystem/action-remove-labels@v1
16-
with:
17-
labels: Test CUDA
18-
number: ${{ github.event.pull_request.number }}
15+
- uses: actions-ecosystem/action-remove-labels@v1
16+
with:
17+
labels: Test CUDA
18+
number: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)