Skip to content

Commit

Permalink
Add tar gz to nitro release
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-service-account committed Nov 22, 2023
1 parent 9dbe4e6 commit 8a338df
Showing 1 changed file with 67 additions and 3 deletions.
70 changes: 67 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
mkdir -p nitro
cp build/nitro nitro/
zip -r nitro.zip nitro
tar -czvf nitro.tar.gz nitro
# run e2e testing
cd nitro
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
Expand All @@ -88,6 +89,16 @@ jobs:
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-linux-amd64.zip
asset_content_type: application/zip

- uses: actions/[email protected]
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 }}-linux-amd64.tar.gz
asset_content_type: application/gzip

ubuntu-amd64-cuda-build:
runs-on: linux-gpu
needs: create-draft-release
Expand Down Expand Up @@ -122,7 +133,7 @@ jobs:
mkdir -p nitro
cp build/nitro nitro/
zip -r nitro.zip nitro
tar -czvf nitro.tar.gz nitro
# run e2e testing
cd nitro
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
Expand All @@ -137,6 +148,16 @@ jobs:
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-linux-amd64-cuda.zip
asset_content_type: application/zip

- uses: actions/[email protected]
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 }}-linux-amd64-cuda.tar.gz
asset_content_type: application/gzip

macOS-M-build:
runs-on: mac-silicon
needs: create-draft-release
Expand Down Expand Up @@ -173,7 +194,7 @@ jobs:
cp llama.cpp/ggml-metal.metal nitro/
cp build/nitro nitro/
zip -r nitro.zip nitro
tar -czvf nitro.tar.gz nitro
# run e2e testing
cd nitro
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
Expand All @@ -188,6 +209,16 @@ jobs:
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-arm64.zip
asset_content_type: application/zip

- uses: actions/[email protected]
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-arm64.tar.gz
asset_content_type: application/gzip

macOS-Intel-build:
runs-on: macos-latest
needs: create-draft-release
Expand Down Expand Up @@ -222,7 +253,7 @@ jobs:
mkdir -p nitro
cp build/nitro nitro/
zip -r nitro.zip nitro
tar -czvf nitro.tar.gz nitro
# run e2e testing
cd nitro
chmod +x ../.github/scripts/e2e-test-linux-and-mac.sh && ../.github/scripts/e2e-test-linux-and-mac.sh ./nitro ${{ env.MODEL_URL }}
Expand All @@ -236,6 +267,15 @@ jobs:
asset_path: ./nitro.zip
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64.zip
asset_content_type: application/zip
- uses: actions/[email protected]
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.tar.gz
asset_content_type: application/gzip

windows-amd64-build:
runs-on: windows-latest
Expand Down Expand Up @@ -293,6 +333,8 @@ jobs:
robocopy build_deps\_install\bin .\build\Release zlib.dll
robocopy build\bin\Release .\build\Release llama.dll
7z a nitro.zip .\build\Release\*
7z a -ttar temp.tar .\build\Release\*
7z a -tgzip nitro.tar.gz temp.tar
cd .\build\Release
..\..\.github\scripts\e2e-test-windows.bat .\nitro.exe ${{ env.MODEL_URL }}
Expand All @@ -305,6 +347,17 @@ jobs:
asset_path: ./nitro.zip
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-win-amd64.zip
asset_content_type: application/zip


- uses: actions/[email protected]
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 }}-win-amd64.tar.gz
asset_content_type: application/gzip

windows-amd64-cuda-build:
runs-on: windows-nvidia
Expand Down Expand Up @@ -352,6 +405,8 @@ jobs:
robocopy build_deps\_install\bin .\build\Release zlib.dll
robocopy build\bin\Release .\build\Release llama.dll
7z a nitro.zip .\build\Release\*
7z a -ttar temp.tar .\build\Release\*
7z a -tgzip nitro.tar.gz temp.tar
cd .\build\Release
..\..\.github\scripts\e2e-test-windows.bat .\nitro.exe ${{ env.MODEL_URL }}
Expand All @@ -364,6 +419,15 @@ jobs:
asset_path: ./nitro.zip
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-win-amd64-cuda.zip
asset_content_type: application/zip
- uses: actions/[email protected]
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 }}-win-amd64-cuda.tar.gz
asset_content_type: application/gzip

update_release_draft:
needs: [ubuntu-amd64-build, ubuntu-amd64-cuda-build, macOS-M-build, macOS-Intel-build, windows-amd64-build, windows-amd64-cuda-build]
Expand Down

0 comments on commit 8a338df

Please sign in to comment.