-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathenflame-gcu300-3.3-build-and-test.yml
More file actions
93 lines (80 loc) · 2.96 KB
/
enflame-gcu300-3.3-build-and-test.yml
File metadata and controls
93 lines (80 loc) · 2.96 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Enflame-GCU300-3.3-Build-And-Test
on:
push:
branches: [ "triton_v3.3.x" ]
pull_request:
branches: [ "triton_v3.3.x"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
enflame-gcu300-33x-build-and-test:
runs-on: enflame-gcu300-33x
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
shell: bash
run: |
source ~/env.sh
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before checkout2
if: steps.checkout1.outcome == 'failure'
run: |
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
sleep 120
- name: Checkout code (attempt 2)
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before final checkout
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
run: |
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
sleep 180
- name: Checkout code (final attempt)
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Verify checkout success
if: success()
run: echo "Checkout completed successfully"
- name: Check if only docs files changed
id: check_files
uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main
- name: Detect Target Branch
shell: bash
run: |
set -x
if [ "${{ github.event_name }}" = "pull_request" ]; then
TARGET_BRANCH="${{ github.base_ref }}"
else
TARGET_BRANCH="${{ github.ref_name }}"
fi
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
echo "TARGET_BRANCH=$TARGET_BRANCH"
- name: FlagTree Build on Enflame (triton_v3.3.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.3.x' }}
shell: bash
run: |
set -x
python3 -m pip uninstall -y triton
python3 -m pip uninstall -y triton_gcu
export FLAGTREE_BACKEND=enflame
cd python
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
- name: FlagTree Test on Enflame
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
python3 -m pytest -s third_party/enflame/python/test/unit