Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/enflame-gcu300-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Enflame-GCU300-Build-And-Test

on:
push:
branches: [ "triton_v3.3.x", "triton_v3.5.x" ]
pull_request:
branches: [ "triton_v3.3.x" , "triton_v3.5.x"]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
enflame-gcu300-build-and-test:
runs-on: enflame-gcu300
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: 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
pip uninstall -y triton
pip uninstall -y triton_gcu
export FLAGTREE_BACKEND=enflame
cd python
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Build on Enflame (triton_v3.5.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }}
shell: bash
run: |
set -x
python3 -m pip uninstall -y triton
python3 -m pip uninstall -y triton_gcu
export FLAGTREE_BACKEND=enflame
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Enflame-Build-And-Test
name: Enflame-GCU400-Build-And-Test

on:
push:
Expand All @@ -11,8 +11,8 @@ concurrency:
cancel-in-progress: true

jobs:
enflame-build-and-test:
runs-on: enflame-3.5
enflame-gcu400-build-and-test:
runs-on: enflame-gcu400
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
Expand All @@ -23,7 +23,9 @@ jobs:

- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before checkout2
Expand All @@ -35,7 +37,9 @@ jobs:
- name: Checkout code (attempt 2)
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before final checkout
Expand All @@ -46,13 +50,20 @@ jobs:

- name: Checkout code (final attempt)
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
uses: actions/checkout@v5
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: FlagTree Build on Enflame
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
Expand All @@ -62,6 +73,7 @@ jobs:
MAX_JOBS=32 python3 -m pip install . --no-build-isolation --break-system-packages

- name: FlagTree Test on Enflame
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
Expand Down
Loading