Skip to content

Commit 5cf5333

Browse files
authored
[CI/CD] Update doc workflow to triton_v3.3.x (#233)
1 parent 2ab4f39 commit 5cf5333

7 files changed

Lines changed: 141 additions & 18 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Setup
99
# --------
1010
python/setup.py @Galaxy1458
11-
python/setup_tools/* @Galaxy1458
11+
python/setup_tools/** @Galaxy1458
1212

1313
# -----------
1414
# third_party
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 🚀 Feature request
2+
description: Submit a proposal/request for a new FlagTree feature
3+
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: >
8+
#### Note: Please write your feature request in English to ensure it can be understood and addressed by the development team.
9+
- type: textarea
10+
attributes:
11+
label: 🚀 The feature, motivation and pitch
12+
description: >
13+
A clear and concise description of the feature proposal. Please outline the motivation for the proposal. Is your feature request related to a specific problem? e.g., *"I'm working on X and would like Y to be possible"*. If this is related to another GitHub issue, please link here too.
14+
validations:
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Alternatives
19+
description: >
20+
A description of any alternative solutions or features you've considered, if any.
21+
- type: textarea
22+
attributes:
23+
label: Additional context
24+
description: >
25+
Add any other context or screenshots about the feature request.
26+
- type: markdown
27+
attributes:
28+
value: >
29+
Thanks for contributing 🎉!
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 'Check if only docs changed'
2+
description: 'Check if only documentation files were modified'
3+
outputs:
4+
only_docs_changed:
5+
description: 'Whether only documentation files were changed'
6+
value: ${{ steps.check_files.outputs.only_docs_changed }}
7+
8+
runs:
9+
using: 'composite'
10+
steps:
11+
- name: Check if only docs files changed
12+
id: check_files
13+
shell: bash
14+
run: |
15+
# Extract current workflow file path from github.workflow_ref
16+
# Format: owner/repo/.github/workflows/file.yml@ref
17+
WORKFLOW_REF="${{ github.workflow_ref }}"
18+
CURRENT_WORKFLOW=$(echo "$WORKFLOW_REF" | sed 's/.*\/\(\.github\/workflows\/[^@]*\)@.*/\1/')
19+
echo "Current workflow file: $CURRENT_WORKFLOW"
20+
21+
if [ "${{ github.event_name }}" == "pull_request" ]; then
22+
FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
23+
else
24+
FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
25+
fi
26+
27+
ONLY_DOCS_CHANGED=true
28+
if [ -z "$FILES" ]; then
29+
echo "No files changed"
30+
ONLY_DOCS_CHANGED=false
31+
else
32+
while IFS= read -r file; do
33+
# Skip empty lines
34+
if [ -z "$file" ]; then
35+
continue
36+
fi
37+
if [[ "$file" == "$CURRENT_WORKFLOW" ]]; then
38+
echo "'$file' -> This workflow file changed, need to run build/test"
39+
ONLY_DOCS_CHANGED=false
40+
break
41+
fi
42+
if [[ ! "$file" =~ (\.(md|yml|txt)$|CODEOWNERS$) ]]; then
43+
echo "'$file' -> Not a docs file, need to run build/test"
44+
ONLY_DOCS_CHANGED=false
45+
break
46+
fi
47+
done <<< "$FILES"
48+
fi
49+
50+
echo "only_docs_changed=$ONLY_DOCS_CHANGED" >> $GITHUB_OUTPUT
51+
if [ "$ONLY_DOCS_CHANGED" == "true" ]; then
52+
echo "✅ Only documentation files were modified. Will skip build and test."
53+
fi

.github/workflows/aipu-build-and-test.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
2424
- name: Checkout code (attempt 1)
2525
id: checkout1
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
2729
continue-on-error: true
2830

2931
- name: Sleep before checkout2
@@ -35,7 +37,9 @@ jobs:
3537
- name: Checkout code (attempt 2)
3638
id: checkout2
3739
if: steps.checkout1.outcome == 'failure'
38-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
41+
with:
42+
fetch-depth: 0
3943
continue-on-error: true
4044

4145
- name: Sleep before final checkout
@@ -46,23 +50,31 @@ jobs:
4650
4751
- name: Checkout code (final attempt)
4852
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
49-
uses: actions/checkout@v5
53+
uses: actions/checkout@v6
54+
with:
55+
fetch-depth: 0
5056

5157
- name: Verify checkout success
5258
if: success()
5359
run: echo "Checkout completed successfully"
5460

61+
- name: Check if only docs files changed
62+
id: check_files
63+
uses: ./.github/actions/check-docs-only
64+
5565
- name: FlagTree Build on AIPU
66+
if: steps.check_files.outputs.only_docs_changed != 'true'
5667
shell: bash
5768
run: |
5869
set -x
5970
pip uninstall -y triton
6071
source ~/env_setup.sh
6172
export FLAGTREE_BACKEND=aipu
6273
cd python
63-
MAX_JOBS=32 python3.10 -m pip install . --no-build-isolation -v
74+
MAX_JOBS=32 python3.10 -m pip install . --no-build-isolation
6475
6576
- name: FlagTree Test on AIPU
77+
if: steps.check_files.outputs.only_docs_changed != 'true'
6678
shell: bash
6779
run: |
6880
set -x

.github/workflows/enflame-build-and-test.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
2424
- name: Checkout code (attempt 1)
2525
id: checkout1
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
2729
continue-on-error: true
2830

2931
- name: Sleep before checkout2
@@ -35,7 +37,9 @@ jobs:
3537
- name: Checkout code (attempt 2)
3638
id: checkout2
3739
if: steps.checkout1.outcome == 'failure'
38-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
41+
with:
42+
fetch-depth: 0
3943
continue-on-error: true
4044

4145
- name: Sleep before final checkout
@@ -46,13 +50,20 @@ jobs:
4650
4751
- name: Checkout code (final attempt)
4852
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
49-
uses: actions/checkout@v5
53+
uses: actions/checkout@v6
54+
with:
55+
fetch-depth: 0
5056

5157
- name: Verify checkout success
5258
if: success()
5359
run: echo "Checkout completed successfully"
5460

61+
- name: Check if only docs files changed
62+
id: check_files
63+
uses: ./.github/actions/check-docs-only
64+
5565
- name: FlagTree Build on Enflame
66+
if: steps.check_files.outputs.only_docs_changed != 'true'
5667
shell: bash
5768
run: |
5869
set -x
@@ -63,6 +74,7 @@ jobs:
6374
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
6475
6576
- name: FlagTree Test on Enflame
77+
if: steps.check_files.outputs.only_docs_changed != 'true'
6678
shell: bash
6779
run: |
6880
set -x

.github/workflows/nv-build-and-test.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
- name: Checkout code (attempt 1)
2727
id: checkout1
28-
uses: actions/checkout@v5
28+
uses: actions/checkout@v6
2929
continue-on-error: true
3030

3131
- name: Sleep before checkout2
@@ -37,7 +37,7 @@ jobs:
3737
- name: Checkout code (attempt 2)
3838
id: checkout2
3939
if: steps.checkout1.outcome == 'failure'
40-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
4141
continue-on-error: true
4242

4343
- name: Sleep before final checkout
@@ -48,12 +48,16 @@ jobs:
4848
4949
- name: Checkout code (final attempt)
5050
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
51-
uses: actions/checkout@v5
51+
uses: actions/checkout@v6
5252

5353
- name: Verify checkout success
5454
if: success()
5555
run: echo "Checkout completed successfully"
5656

57+
- name: Check if only docs files changed
58+
id: check_files
59+
uses: ./.github/actions/check-docs-only
60+
5761
- name: Detect Target Branch
5862
shell: bash
5963
run: |
@@ -66,8 +70,8 @@ jobs:
6670
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
6771
echo "TARGET_BRANCH=$TARGET_BRANCH"
6872
69-
- name: FlagTree Build on NVidia (Main branch)
70-
if: ${{ env.TARGET_BRANCH == 'main' }}
73+
- name: FlagTree Build on NVidia (main branch)
74+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'main' }}
7175
shell: bash
7276
run: |
7377
set -x
@@ -77,7 +81,7 @@ jobs:
7781
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
7882
7983
- name: FlagTree Build on NVidia (triton_v3.2.x branch)
80-
if: ${{ env.TARGET_BRANCH == 'triton_v3.2.x' }}
84+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.2.x' }}
8185
shell: bash
8286
run: |
8387
set -x
@@ -87,7 +91,7 @@ jobs:
8791
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
8892
8993
- name: FlagTree Build on NVidia (triton_v3.3.x branch)
90-
if: ${{ env.TARGET_BRANCH == 'triton_v3.3.x' }}
94+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.3.x' }}
9195
shell: bash
9296
run: |
9397
set -x
@@ -97,6 +101,7 @@ jobs:
97101
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
98102
99103
- name: FlagTree Test on NVidia
104+
if: steps.check_files.outputs.only_docs_changed != 'true'
100105
shell: bash
101106
run: |
102107
set -x

.github/workflows/tsingmicro-build-and-test.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
steps:
1818
- name: Checkout code (attempt 1)
1919
id: checkout1
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 0
2123
continue-on-error: true
2224

2325
- name: Sleep before checkout2
@@ -29,7 +31,9 @@ jobs:
2931
- name: Checkout code (attempt 2)
3032
id: checkout2
3133
if: steps.checkout1.outcome == 'failure'
32-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
35+
with:
36+
fetch-depth: 0
3337
continue-on-error: true
3438

3539
- name: Sleep before final checkout
@@ -40,13 +44,20 @@ jobs:
4044
4145
- name: Checkout code (final attempt)
4246
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
43-
uses: actions/checkout@v5
47+
uses: actions/checkout@v6
48+
with:
49+
fetch-depth: 0
4450

4551
- name: Verify checkout success
4652
if: success()
4753
run: echo "Checkout completed successfully"
4854

55+
- name: Check if only docs files changed
56+
id: check_files
57+
uses: ./.github/actions/check-docs-only
58+
4959
- name: FlagTree Build on Tsingmicro
60+
if: steps.check_files.outputs.only_docs_changed != 'true'
5061
shell: bash
5162
run: |
5263
set -x
@@ -57,6 +68,7 @@ jobs:
5768
python3.11 -m pip install . --no-build-isolation -v
5869
5970
- name: FlagTree Test on Tsingmicro
71+
if: steps.check_files.outputs.only_docs_changed != 'true'
6072
shell: bash
6173
run: |
6274
set -x

0 commit comments

Comments
 (0)