@@ -693,6 +693,51 @@ jobs:
693693 path : llama-${{ steps.tag.outputs.name }}-xcframework.zip
694694 name : llama-${{ steps.tag.outputs.name }}-xcframework
695695
696+ openEuler-cann :
697+ strategy :
698+ matrix :
699+ arch : [x86, aarch64]
700+ chip_type : ['910b', '310p']
701+ build : ['Release']
702+ runs-on : ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
703+ container : ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc1.alpha001-910b-openeuler22.03-py3.11' || '8.2.rc1-310p-openeuler22.03-py3.11' }}
704+ steps :
705+ - name : Checkout
706+ uses : actions/checkout@v4
707+ with :
708+ fetch-depth : 0
709+
710+ - name : Dependencies
711+ run : |
712+ yum update -y
713+ yum install -y git gcc gcc-c++ make cmake libcurl-devel
714+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
715+
716+ - name : Build
717+ run : |
718+ export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
719+
720+ cmake -S . -B build \
721+ -DCMAKE_BUILD_TYPE=${{ matrix.build }} \
722+ -DGGML_CANN=on \
723+ -DSOC_TYPE=ascend${{ matrix.chip_type }}
724+ cmake --build build -j $(nproc)
725+
726+ - name : Determine tag name
727+ id : tag
728+ uses : ./.github/actions/get-tag-name
729+
730+ - name : Pack artifacts
731+ run : |
732+ cp LICENSE ./build/bin/
733+ zip -r llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.zip ./build/bin/*
734+
735+ - name : Upload artifacts
736+ uses : actions/upload-artifact@v4
737+ with :
738+ path : llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.zip
739+ name : llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.zip
740+
696741 release :
697742 if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
698743
@@ -714,6 +759,7 @@ jobs:
714759 - macOS-arm64
715760 - macOS-x64
716761 - ios-xcode-build
762+ - openEuler-cann
717763
718764 steps :
719765 - name : Clone
0 commit comments