[BACKEND] KUNLUNXIN xpu update to Commit da0ac6a(20251202) (#166) #195
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Hcu-Build-And-Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| hcu-build-and-test: | |
| runs-on: hcu | |
| 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@v5 | |
| 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@v5 | |
| 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@v5 | |
| - name: Verify checkout success | |
| if: success() | |
| run: echo "Checkout completed successfully" | |
| - name: FlagTree Build on Hcu | |
| shell: bash | |
| run: | | |
| set -x | |
| pip uninstall -y triton | |
| export FLAGTREE_BACKEND=hcu | |
| cd python | |
| MAX_JOBS=32 python3 -m pip install . --no-build-isolation | |
| - name: FlagTree Test on Hcu | |
| shell: bash | |
| run: | | |
| set -x | |
| cd third_party/hcu/python/test/unit | |
| sh flagtree_test.sh |