diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cef349c9..7bb556afd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -153,7 +153,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-linux-amd64 path: ./nitro @@ -210,7 +210,7 @@ jobs: ldd --version ./install_deps.sh mkdir build && cd build - cmake -DLLAMA_NATIVE=OFF -DLLAMA_VULKAN=OFF -DNITRO_VERSION=${{ needs.set-nitro-version.outputs.version }} .. + cmake -DLLAMA_NATIVE=OFF -DLLAMA_VULKAN=ON -DNITRO_VERSION=${{ needs.set-nitro-version.outputs.version }} .. make -j $(nproc) ls -la @@ -223,26 +223,26 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: - name: nitro-linux-amd64 + name: nitro-linux-amd64-vulkan path: ./nitro - - name: Run e2e testing - LLama.CPP - shell: bash - run: | - # run e2e testing - cd nitro - chmod +x ../.github/scripts/e2e-test-llama-linux-and-mac.sh && ../.github/scripts/e2e-test-llama-linux-and-mac.sh ./nitro ${{ env.LLM_MODEL_URL }} - rm -rf uploads/ - - - name: Run e2e testing - Whisper.CPP - shell: bash - run: | - # run e2e testing - cd nitro - chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }} - rm -rf uploads/ + # - name: Run e2e testing - LLama.CPP + # shell: bash + # run: | + # # run e2e testing + # cd nitro + # chmod +x ../.github/scripts/e2e-test-llama-linux-and-mac.sh && ../.github/scripts/e2e-test-llama-linux-and-mac.sh ./nitro ${{ env.LLM_MODEL_URL }} + # rm -rf uploads/ + + # - name: Run e2e testing - Whisper.CPP + # shell: bash + # run: | + # # run e2e testing + # cd nitro + # chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }} + # rm -rf uploads/ - uses: actions/upload-release-asset@v1.0.1 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') @@ -289,7 +289,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-linux-amd64-cuda-${{ matrix.cuda }} path: ./nitro @@ -359,7 +359,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-mac-arm64 path: ./nitro @@ -436,7 +436,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-mac-amd64 path: ./nitro @@ -467,81 +467,81 @@ jobs: asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64.tar.gz asset_content_type: application/gzip - macOS-amd64-vulkan-build: - runs-on: macos-latest - needs: [create-draft-release, set-nitro-version] - if: always() && (needs.create-draft-release.result == 'success' || needs.create-draft-release.result == 'skipped') && needs.set-nitro-version.result == 'success' - permissions: - contents: write - steps: - - name: Clone - id: checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Dependencies - id: depends - continue-on-error: true - run: | - brew update - brew install sdl2 - - - name: Prepare Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - name: Build - id: cmake_build - run: | - ./install_deps.sh - mkdir build && cd build - cmake -DNITRO_VERSION=${{ needs.set-nitro-version.outputs.version }} -DLLAMA_VULKAN=OFF -DLLAMA_METAL=OFF .. - CC=gcc-8 make -j $(sysctl -n hw.ncp) - ls -la - - - name: Package - shell: bash - run: | - mkdir -p nitro - cp build/nitro nitro/ - tar -czvf nitro.tar.gz nitro - - - name: Upload Artifact - uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - with: - name: nitro-mac-amd64 - path: ./nitro - - - name: Run e2e testing - LLama.CPP - shell: bash - run: | - # run e2e testing - cd nitro - chmod +x ../.github/scripts/e2e-test-llama-linux-and-mac.sh && ../.github/scripts/e2e-test-llama-linux-and-mac.sh ./nitro ${{ env.LLM_MODEL_URL }} - rm -rf uploads/ - - - name: Run e2e testing - Whisper.CPP - shell: bash - run: | - # run e2e testing - cd nitro - chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }} - rm -rf uploads/ - - - uses: actions/upload-release-asset@v1.0.1 - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create-draft-release.outputs.upload_url }} - asset_path: ./nitro.tar.gz - asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64-vulkan.tar.gz - asset_content_type: application/gzip + # macOS-amd64-vulkan-build: + # runs-on: macos-latest + # needs: [create-draft-release, set-nitro-version] + # if: always() && (needs.create-draft-release.result == 'success' || needs.create-draft-release.result == 'skipped') && needs.set-nitro-version.result == 'success' + # permissions: + # contents: write + # steps: + # - name: Clone + # id: checkout + # uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - name: Dependencies + # id: depends + # continue-on-error: true + # run: | + # brew update + # brew install sdl2 + + # - name: Prepare Vulkan SDK + # uses: humbletim/setup-vulkan-sdk@v1.2.0 + # with: + # vulkan-query-version: 1.3.204.0 + # vulkan-components: Vulkan-Headers, Vulkan-Loader + # vulkan-use-cache: true + + # - name: Build + # id: cmake_build + # run: | + # ./install_deps.sh + # mkdir build && cd build + # cmake -DNITRO_VERSION=${{ needs.set-nitro-version.outputs.version }} -DLLAMA_VULKAN=ON -DLLAMA_METAL=OFF .. + # CC=gcc-8 make -j $(sysctl -n hw.ncp) + # ls -la + + # - name: Package + # shell: bash + # run: | + # mkdir -p nitro + # cp build/nitro nitro/ + # tar -czvf nitro.tar.gz nitro + + # - name: Upload Artifact + # uses: actions/upload-artifact@v2 + # if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' + # with: + # name: nitro-mac-amd64 + # path: ./nitro + + # - name: Run e2e testing - LLama.CPP + # shell: bash + # run: | + # # run e2e testing + # cd nitro + # chmod +x ../.github/scripts/e2e-test-llama-linux-and-mac.sh && ../.github/scripts/e2e-test-llama-linux-and-mac.sh ./nitro ${{ env.LLM_MODEL_URL }} + # rm -rf uploads/ + + # - name: Run e2e testing - Whisper.CPP + # shell: bash + # run: | + # # run e2e testing + # cd nitro + # chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }} + # rm -rf uploads/ + + # - uses: actions/upload-release-asset@v1.0.1 + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ needs.create-draft-release.outputs.upload_url }} + # asset_path: ./nitro.tar.gz + # asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64-vulkan.tar.gz + # asset_content_type: application/gzip windows-amd64-build: runs-on: windows-latest @@ -621,7 +621,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-win-amd64 path: ./build/Release @@ -707,9 +707,9 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: - name: nitro-win-amd64 + name: nitro-win-amd64-vulkan path: ./build/Release - uses: actions/upload-release-asset@v1.0.1 @@ -802,7 +802,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' with: name: nitro-win-amd64-cuda-${{ matrix.cuda }} path: ./build/Release @@ -827,7 +827,7 @@ jobs: macOS-amd64-build, windows-amd64-build, windows-amd64-cuda-build, - macOS-amd64-vulkan-build, + # macOS-amd64-vulkan-build, ubuntu-amd64-vulkan-build, windows-amd64-vulkan-build, ] @@ -851,7 +851,7 @@ jobs: macOS-amd64-build, windows-amd64-build, windows-amd64-cuda-build, - macOS-amd64-vulkan-build, + # macOS-amd64-vulkan-build, ubuntu-amd64-vulkan-build, windows-amd64-vulkan-build, ] @@ -890,7 +890,7 @@ jobs: macOS-amd64-build, windows-amd64-build, windows-amd64-cuda-build, - macOS-amd64-vulkan-build, + # macOS-amd64-vulkan-build, ubuntu-amd64-vulkan-build, windows-amd64-vulkan-build, ]