Skip to content

[TLE] Move TLE distributed API under language namespace (#448) #7

[TLE] Move TLE distributed API under language namespace (#448)

[TLE] Move TLE distributed API under language namespace (#448) #7

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