Update ci.yml #7
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: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build-linux: | |
| name: Linux (x86_64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake build-essential libopenblas-dev | |
| - name: Configure CMake (CPU only) | |
| run: | | |
| mkdir -p build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
| -DUSE_CPU=ON \ | |
| -DUSE_OPENCL=OFF \ | |
| -DUSE_METAL=OFF \ | |
| -DUSE_CUDA=OFF \ | |
| -DUSE_VULKAN=OFF \ | |
| -DUSE_BLAS=ON | |
| - name: Build | |
| run: cmake --build build -- -j$(nproc) | |
| - name: Quick test | |
| run: ./build/flash_moe --info | |
| build-macos: | |
| name: macOS (x86_64 + arm64) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install cmake | |
| - name: Configure CMake (CPU only) | |
| run: | | |
| mkdir -p build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
| -DUSE_CPU=ON \ | |
| -DUSE_OPENCL=OFF \ | |
| -DUSE_METAL=OFF \ | |
| -DUSE_CUDA=OFF \ | |
| -DUSE_VULKAN=OFF \ | |
| -DUSE_BLAS=OFF | |
| - name: Build | |
| run: cmake --build build -- -j$(sysctl -n hw.logicalcpu) | |
| - name: Quick test | |
| run: ./build/flash_moe --info | |
| build-windows: | |
| name: Windows (x86_64) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake (CPU only) | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -G "Visual Studio 17 2022" -A x64 \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DUSE_CPU=ON \ | |
| -DUSE_OPENCL=OFF \ | |
| -DUSE_METAL=OFF \ | |
| -DUSE_CUDA=OFF \ | |
| -DUSE_VULKAN=OFF \ | |
| -DUSE_BLAS=OFF | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Quick test | |
| run: .\build\Release\flash_moe.exe --info |