Skip to content

Commit

Permalink
Merge pull request #59 from lovemefan/develop
Browse files Browse the repository at this point in the history
add cann action test
  • Loading branch information
lovemefan authored Feb 14, 2025
2 parents 8c6a34e + 3054460 commit 89aa53a
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 115 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,11 @@ jobs:
yum update -y
yum install -y git gcc gcc-c++ make cmake
- name: Enable debug logging
if: ${{ inputs.debug_enabled == true }}
run: |
echo "ACTIONS_RUNNER_DEBUG=true" >> $GITHUB_ENV
echo "ACTIONS_STEP_DEBUG=true" >> $GITHUB_ENV
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
uses: lovemefan/action-tmate@v1.1
225 changes: 111 additions & 114 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push, pull_request]

env:
ubuntu_image: "ubuntu:22.04"
ubuntu_image: "tonistiigi/binfmt:qemu-v7.0.0-28"

jobs:
ubuntu-22:
Expand Down Expand Up @@ -146,111 +146,111 @@ jobs:
cmake . -DCMAKE_BUILD_TYPE=Debug -DSENSE_VOICE_SANITIZE_${{ matrix.sanitizer }}=ON
make'
# ubuntu-22-cmake-sycl:
# runs-on: ubuntu-22.04
#
# strategy:
# fail-fast: false
# matrix:
# dggml_sycl: [ON]
# dcmake_c_compiler: [icx]
# dcmake_cxx_compiler: [icpx]
# arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
#
# continue-on-error: true
#
# steps:
# - name: Clone
# uses: actions/checkout@v4
#
# - name: add oneAPI to apt
# shell: bash
# run: |
# cd /tmp
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
#
# - name: install oneAPI dpcpp compiler
# shell: bash
# run: |
# sudo apt update
# sudo apt install intel-oneapi-compiler-dpcpp-cpp git cmake -y
#
# - name: install oneAPI MKL library
# shell: bash
# run: |
# sudo apt install intel-oneapi-mkl-devel
#
# - name: Clone
# id: checkout
# uses: actions/checkout@v4
#
# - name: Build
# id: cmake_build
# run: |
# source /opt/intel/oneapi/setvars.sh
# git config --global --add safe.directory /workspace
# git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml
# git submodule sync && git submodule update --init --recursive
# mkdir build
# cd build
# cmake -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
# cmake --build . --config Release -j $(nproc)
#
# ubuntu-22-cmake-sycl-fp16:
# runs-on: ubuntu-22.04
#
# strategy:
# fail-fast: false
# matrix:
# dggml_sycl: [ON]
# dcmake_c_compiler: [icx]
# dcmake_cxx_compiler: [icpx]
# arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
#
# continue-on-error: true
#
# steps:
# - name: Clone
# uses: actions/checkout@v4
#
# - name: add oneAPI to apt
# shell: bash
# run: |
# cd /tmp
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
#
# - name: install oneAPI dpcpp compiler
# shell: bash
# run: |
# sudo apt update
# sudo apt install intel-oneapi-compiler-dpcpp-cpp cmake git -y
#
# - name: install oneAPI MKL library
# shell: bash
# run: |
# sudo apt install intel-oneapi-mkl-devel
#
# - name: Clone
# id: checkout
# uses: actions/checkout@v4
#
# - name: Build
# id: cmake_build
# run: |
# source /opt/intel/oneapi/setvars.sh
# git config --global --add safe.directory /workspace
# git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml
# git submodule sync && git submodule update --init --recursive
# mkdir build
# cd build
# cmake -DGGML_SYCL_F16=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
# cmake --build . --config Release -j $(nproc)
# ubuntu-22-cmake-sycl:
# runs-on: ubuntu-22.04
#
# strategy:
# fail-fast: false
# matrix:
# dggml_sycl: [ON]
# dcmake_c_compiler: [icx]
# dcmake_cxx_compiler: [icpx]
# arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
#
# continue-on-error: true
#
# steps:
# - name: Clone
# uses: actions/checkout@v4
#
# - name: add oneAPI to apt
# shell: bash
# run: |
# cd /tmp
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
#
# - name: install oneAPI dpcpp compiler
# shell: bash
# run: |
# sudo apt update
# sudo apt install intel-oneapi-compiler-dpcpp-cpp git cmake -y
#
# - name: install oneAPI MKL library
# shell: bash
# run: |
# sudo apt install intel-oneapi-mkl-devel
#
# - name: Clone
# id: checkout
# uses: actions/checkout@v4
#
# - name: Build
# id: cmake_build
# run: |
# source /opt/intel/oneapi/setvars.sh
# git config --global --add safe.directory /workspace
# git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml
# git submodule sync && git submodule update --init --recursive
# mkdir build
# cd build
# cmake -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
# cmake --build . --config Release -j $(nproc)
#
# ubuntu-22-cmake-sycl-fp16:
# runs-on: ubuntu-22.04
#
# strategy:
# fail-fast: false
# matrix:
# dggml_sycl: [ON]
# dcmake_c_compiler: [icx]
# dcmake_cxx_compiler: [icpx]
# arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
#
# continue-on-error: true
#
# steps:
# - name: Clone
# uses: actions/checkout@v4
#
# - name: add oneAPI to apt
# shell: bash
# run: |
# cd /tmp
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
#
# - name: install oneAPI dpcpp compiler
# shell: bash
# run: |
# sudo apt update
# sudo apt install intel-oneapi-compiler-dpcpp-cpp cmake git -y
#
# - name: install oneAPI MKL library
# shell: bash
# run: |
# sudo apt install intel-oneapi-mkl-devel
#
# - name: Clone
# id: checkout
# uses: actions/checkout@v4
#
# - name: Build
# id: cmake_build
# run: |
# source /opt/intel/oneapi/setvars.sh
# git config --global --add safe.directory /workspace
# git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml
# git submodule sync && git submodule update --init --recursive
# mkdir build
# cd build
# cmake -DGGML_SYCL_F16=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
# cmake --build . --config Release -j $(nproc)

windows-msys2:
runs-on: windows-latest
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
- name: Build using CMake
shell: msys2 {0}
run: |
export PATH="$PATH:/c/Program\ Files/Git/cmd"
export PATH="$PATH:/c/Program Files/Git/bin:/c/Program Files/Git/cmd"
/c/Program\ Files/Git/cmd/git.exe submodule sync
/c/Program\ Files/Git/cmd/git.exe submodule update --init --recursive
cmake -B build
Expand All @@ -293,6 +293,7 @@ jobs:
- name: Build using CMake w/ OpenBLAS
shell: msys2 {0}
run: |
export PATH="$PATH:/c/Program Files/Git/bin:/c/Program Files/Git/cmd"
git submodule sync && git submodule update --init --recursive
cmake -B build -DGGML_OPENBLAS=ON -DGGML_NATIVE=OFF
cmake --build build --config ${{ matrix.build }} -j $(nproc)
Expand Down Expand Up @@ -327,7 +328,7 @@ jobs:
run: |
git submodule sync && git submodule update --init --recursive
cmake -S . -B ./build -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=${{ matrix.build }}
- name: Build
run: |
Expand Down Expand Up @@ -476,20 +477,16 @@ jobs:
- 'Release'
container: ascendai/cann:${{ matrix.cann }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Dependencies
run: |
yum update -y
yum install -y git gcc gcc-c++ make cmake
- name: Build
run: |
cd $GITHUB_WORKSPACE && ls -al
git submodule sync
git submodule update --init --recursive
export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
git clone https://github.com/lovemefan/SenseVoice.cpp.git
cd SenseVoice.cpp && git submodule sync && git submodule update --init --recursive
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DGGML_CANN=on \
Expand Down

0 comments on commit 89aa53a

Please sign in to comment.