Skip to content

[SpacemiT][SPEC][CI] Spec spacemit backend and fix ci workflow #1069

[SpacemiT][SPEC][CI] Spec spacemit backend and fix ci workflow

[SpacemiT][SPEC][CI] Spec spacemit backend and fix ci workflow #1069

# Copyright 2025- FlagOS Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Thrive3.6-Build-And-Test
on:
push:
branches: [ "main", "triton_v3.6.x" ]
pull_request:
branches: [ "main", "triton_v3.6.x" ]
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
thrive36x-unit-test:
runs-on: thrive3.6
if: ${{ github.repository == 'flagos-ai/flagtree' && github.event.pull_request.draft == false }}
steps:
- name: Smart Checkout
uses: flagos-ai/FlagTree/.github/actions/smart-checkout@main
with:
checkout_version: 'v6'
- name: Check if backend-relevant files changed
id: check_backend
uses: flagos-ai/FlagTree/.github/actions/check-backend-changed@main
with:
backend: thrive
- name: Cleanup FlagTree Environment
if: steps.check_backend.outputs.should_skip != 'true'
uses: flagos-ai/FlagTree/.github/actions/cleanup-flagtree-env@main
- name: Build FlagTree
if: steps.check_backend.outputs.should_skip != 'true'
shell: bash
run: |
set -x
export FLAGTREE_BACKEND=thrive
MAX_JOBS=32 python3 setup.py bdist_wheel
ssh -p 1024 root@localhost "rm -f /work/flagtree-*.whl"
scp -P 1024 dist/flagtree-*.whl root@localhost:/work
ssh -p 1024 root@localhost "pip3 install /work/flagtree-*.whl --force-reinstall"
- name: Clear cache if ClearCache label present
if: steps.check_backend.outputs.should_skip != 'true'
id: clear_cache
uses: flagos-ai/FlagTree/.github/actions/clear-cache-if-labeled@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
backend: thrive
- name: Unit Test
if: steps.check_backend.outputs.should_skip != 'true'
shell: bash
run: |
set -x
ssh -p 1024 root@localhost "cd /usr/local/lib/python3.10/dist-packages/triton/backends/thrive/test && \
python3 -m pytest unit/language/test_standard.py --device thrive -v -s"