Team Ai
Modelpublic

Felipe97/llama-cpp-compiled

sourceHugging Faceupdated 21d agoView on Hugging Face
0likes1.2kdownloads
build-wasm.yml111 linesDownload Raw Back to workflows
1name: CI (wasm)2 3on:4  workflow_dispatch: # allows manual triggering5  push:6    branches:7      - master8    paths: [9      '.github/workflows/build-wasm.yml',10      '**/CMakeLists.txt',11      '**/.cmake',12      '**/*.h',13      '**/*.hpp',14      '**/*.c',15      '**/*.cpp',16      '**/*.wgsl',17      '**/*.tmpl',18      'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py'19    ]20 21  pull_request:22    types: [opened, synchronize, reopened]23    paths: [24      '.github/workflows/build-wasm.yml',25      '**/CMakeLists.txt',26      '**/.cmake',27      '**/*.h',28      '**/*.hpp',29      '**/*.c',30      '**/*.cpp',31      '**/*.wgsl',32      '**/*.tmpl',33      'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py'34    ]35 36concurrency:37  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}38  cancel-in-progress: true39 40env:41  GGML_NLOOP: 342  GGML_N_THREADS: 143  LLAMA_ARG_LOG_COLORS: 144  LLAMA_ARG_LOG_PREFIX: 145  LLAMA_ARG_LOG_TIMESTAMPS: 146 47jobs:48  ubuntu-webgpu:49    runs-on: ubuntu-24.04-arm50 51    steps:52      - name: Clone53        id: checkout54        uses: actions/checkout@v655 56      - name: ccache57        uses: ggml-org/ccache-action@v1.2.2458        with:59          key: webgpu-ubuntu-24.04-arm-wasm60          save: false61 62      - name: Install Emscripten63        run: |64          git clone https://github.com/emscripten-core/emsdk.git65          cd emsdk66          ./emsdk install latest67          ./emsdk activate latest68 69      - name: Fetch emdawnwebgpu70        run: |71          DAWN_TAG="v20260908.214631"72          EMDAWN_PKG="emdawnwebgpu_pkg-${DAWN_TAG}.zip"73          echo "Downloading ${EMDAWN_PKG}"74          curl -L -o emdawn.zip \75            "https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}"76          unzip emdawn.zip77 78      - name: ccache-buckets-restore79        uses: ./.github/actions/ccache-buckets80        env:81          HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}82        with:83          key: webgpu-ubuntu-24.04-arm-wasm84          folder: llama.cpp85          hf_bucket: ggml-org/cache86 87      - name: Build WASM WebGPU88        run: |89          source emsdk/emsdk_env.sh90          emcmake cmake -B build-wasm \91            -G "Ninja" \92            -DCMAKE_BUILD_TYPE=Release \93            -DGGML_WEBGPU=ON \94            -DGGML_OPENMP=OFF \95            -DLLAMA_OPENSSL=OFF \96            -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg97 98          time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc)99 100      - name: ccache-buckets-save101        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}102        uses: ./.github/actions/ccache-buckets103        env:104          HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}105        with:106          key: webgpu-ubuntu-24.04-arm-wasm107          folder: llama.cpp108          evict-old-files: 1d109          hf_bucket: ggml-org/cache110          save: true111