Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit a208285

Browse files
committed
package cuda dependencies to github release
1 parent 872363f commit a208285

File tree

2 files changed

+145
-8
lines changed

2 files changed

+145
-8
lines changed

.github/workflows/build.yml

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,18 @@ jobs:
509509
result: "${{ steps.read.outputs.result }}"
510510

511511
create-checksum-file:
512-
runs-on: ubuntu-latest
513-
needs: [read, create-draft-release]
512+
runs-on: ubuntu-20-04
514513
permissions:
515514
contents: write
515+
needs: [read, create-draft-release]
516516
steps:
517-
- name: Create checksum.yml
517+
- name: Download cuda dependencies from s3 and create checksum
518518
run: |
519+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/12.0/linux/cuda.tar.gz -O /tmp/cuda-12-0-linux-amd64.tar.gz
520+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/11.7/linux/cuda.tar.gz -O /tmp/cuda-11-7-linux-amd64.tar.gz
521+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/12.0/windows/cuda.tar.gz -O /tmp/cuda-12-0-windows-amd64.tar.gz
522+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/11.7/windows/cuda.tar.gz -O /tmp/cuda-11-7-windows-amd64.tar.gz
523+
519524
version=${{ needs.create-draft-release.outputs.version }}
520525
outputs=${{ toJson(needs.read.outputs.result) }}
521526
@@ -531,15 +536,78 @@ jobs:
531536
"- url: cortex.llamacpp-\($version)-\($key).tar.gz\n sha512: >-\n \($sha512[$key])\n size: \($size[$key])"
532537
' >> checksum.yml
533538
539+
echo "- url: cuda-12-0-linux-amd64.tar.gz" >> checksum.yml
540+
echo " sha512: >-" >> checksum.yml
541+
echo " $(sha512sum /tmp/cuda-12-0-linux-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
542+
echo " size: $(stat -c%s /tmp/cuda-12-0-linux-amd64.tar.gz)" >> checksum.yml
543+
544+
echo "- url: cuda-11-7-linux-amd64.tar.gz" >> checksum.yml
545+
echo " sha512: >-" >> checksum.yml
546+
echo " $(sha512sum /tmp/cuda-11-7-linux-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
547+
echo " size: $(stat -c%s /tmp/cuda-11-7-linux-amd64.tar.gz)" >> checksum.yml
548+
549+
echo "- url: cuda-11-7-windows-amd64.tar.gz" >> checksum.yml
550+
echo " sha512: >-" >> checksum.yml
551+
echo " $(sha512sum /tmp/cuda-11-7-windows-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
552+
echo " size: $(stat -c%s /tmp/cuda-11-7-windows-amd64.tar.gz)" >> checksum.yml
553+
554+
echo "- url: cuda-12-0-windows-amd64.tar.gz" >> checksum.yml
555+
echo " sha512: >-" >> checksum.yml
556+
echo " $(sha512sum /tmp/cuda-12-0-windows-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
557+
echo " size: $(stat -c%s /tmp/cuda-12-0-windows-amd64.tar.gz)" >> checksum.yml
534558
cat checksum.yml
535559
536560
- name: Upload checksum.yml to GitHub Release
561+
uses: actions/upload-release-asset@v1
537562
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
538563
env:
539564
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
540-
uses: actions/upload-release-asset@v1
541565
with:
542566
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
543567
asset_path: ./checksum.yml
544568
asset_name: checksum.yml
545-
asset_content_type: text/yaml
569+
asset_content_type: text/yaml
570+
571+
- name: upload cuda-12-0-linux-amd64.tar.gz to Github Release
572+
uses: actions/upload-release-asset@v1
573+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
574+
env:
575+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
576+
with:
577+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
578+
asset_path: /tmp/cuda-12-0-linux-amd64.tar.gz
579+
asset_name: cuda-12-0-linux-amd64.tar.gz
580+
asset_content_type: application/gzip
581+
582+
- name: upload cuda-11-7-linux-amd64.tar.gz to Github Release
583+
uses: actions/upload-release-asset@v1
584+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
585+
env:
586+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
587+
with:
588+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
589+
asset_path: /tmp/cuda-11-7-linux-amd64.tar.gz
590+
asset_name: cuda-11-7-linux-amd64.tar.gz
591+
asset_content_type: application/gzip
592+
593+
- name: upload cuda-12-0-windows-amd64.tar.gz to Github Release
594+
uses: actions/upload-release-asset@v1
595+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
596+
env:
597+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
598+
with:
599+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
600+
asset_path: /tmp/cuda-12-0-windows-amd64.tar.gz
601+
asset_name: cuda-12-0-windows-amd64.tar.gz
602+
asset_content_type: application/gzip
603+
604+
- name: upload cuda-11-7-windows-amd64.tar.gz to Github Release
605+
uses: actions/upload-release-asset@v1
606+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
607+
env:
608+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
609+
with:
610+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
611+
asset_path: /tmp/cuda-11-7-windows-amd64.tar.gz
612+
asset_name: cuda-11-7-windows-amd64.tar.gz
613+
asset_content_type: application/gzip

.github/workflows/nightly-build.yml

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,13 +507,18 @@ jobs:
507507
result: "${{ steps.read.outputs.result }}"
508508

509509
create-checksum-file:
510-
runs-on: ubuntu-latest
510+
runs-on: ubuntu-20-04
511511
permissions:
512512
contents: write
513513
needs: [read, create-draft-release]
514514
steps:
515-
- name: Create checksum.yml
515+
- name: Download cuda dependencies from s3 and create checksum
516516
run: |
517+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/12.0/linux/cuda.tar.gz -O /tmp/cuda-12-0-linux-amd64.tar.gz
518+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/11.7/linux/cuda.tar.gz -O /tmp/cuda-11-7-linux-amd64.tar.gz
519+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/12.0/windows/cuda.tar.gz -O /tmp/cuda-12-0-windows-amd64.tar.gz
520+
wget http://minio.jan.ai:9000/cicd/dist/cuda-dependencies/11.7/windows/cuda.tar.gz -O /tmp/cuda-11-7-windows-amd64.tar.gz
521+
517522
version=${{ needs.create-draft-release.outputs.version }}
518523
outputs=${{ toJson(needs.read.outputs.result) }}
519524
@@ -529,6 +534,26 @@ jobs:
529534
"- url: cortex.llamacpp-\($version)-\($key).tar.gz\n sha512: >-\n \($sha512[$key])\n size: \($size[$key])"
530535
' >> checksum.yml
531536
537+
echo "- url: cuda-12-0-linux-amd64.tar.gz" >> checksum.yml
538+
echo " sha512: >-" >> checksum.yml
539+
echo " $(sha512sum /tmp/cuda-12-0-linux-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
540+
echo " size: $(stat -c%s /tmp/cuda-12-0-linux-amd64.tar.gz)" >> checksum.yml
541+
542+
echo "- url: cuda-11-7-linux-amd64.tar.gz" >> checksum.yml
543+
echo " sha512: >-" >> checksum.yml
544+
echo " $(sha512sum /tmp/cuda-11-7-linux-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
545+
echo " size: $(stat -c%s /tmp/cuda-11-7-linux-amd64.tar.gz)" >> checksum.yml
546+
547+
echo "- url: cuda-11-7-windows-amd64.tar.gz" >> checksum.yml
548+
echo " sha512: >-" >> checksum.yml
549+
echo " $(sha512sum /tmp/cuda-11-7-windows-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
550+
echo " size: $(stat -c%s /tmp/cuda-11-7-windows-amd64.tar.gz)" >> checksum.yml
551+
552+
echo "- url: cuda-12-0-windows-amd64.tar.gz" >> checksum.yml
553+
echo " sha512: >-" >> checksum.yml
554+
echo " $(sha512sum /tmp/cuda-12-0-windows-amd64.tar.gz | awk '{ print $1 }')" >> checksum.yml
555+
echo " size: $(stat -c%s /tmp/cuda-12-0-windows-amd64.tar.gz)" >> checksum.yml
556+
532557
cat checksum.yml
533558
534559
- name: Upload checksum.yml to GitHub Release
@@ -540,4 +565,48 @@ jobs:
540565
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
541566
asset_path: ./checksum.yml
542567
asset_name: checksum.yml
543-
asset_content_type: text/yaml
568+
asset_content_type: text/yaml
569+
570+
- name: upload cuda-12-0-linux-amd64.tar.gz to Github Release
571+
uses: actions/upload-release-asset@v1
572+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
573+
env:
574+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
575+
with:
576+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
577+
asset_path: /tmp/cuda-12-0-linux-amd64.tar.gz
578+
asset_name: cuda-12-0-linux-amd64.tar.gz
579+
asset_content_type: application/gzip
580+
581+
- name: upload cuda-11-7-linux-amd64.tar.gz to Github Release
582+
uses: actions/upload-release-asset@v1
583+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
584+
env:
585+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
586+
with:
587+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
588+
asset_path: /tmp/cuda-11-7-linux-amd64.tar.gz
589+
asset_name: cuda-11-7-linux-amd64.tar.gz
590+
asset_content_type: application/gzip
591+
592+
- name: upload cuda-12-0-windows-amd64.tar.gz to Github Release
593+
uses: actions/upload-release-asset@v1
594+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
595+
env:
596+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
597+
with:
598+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
599+
asset_path: /tmp/cuda-12-0-windows-amd64.tar.gz
600+
asset_name: cuda-12-0-windows-amd64.tar.gz
601+
asset_content_type: application/gzip
602+
603+
- name: upload cuda-11-7-windows-amd64.tar.gz to Github Release
604+
uses: actions/upload-release-asset@v1
605+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
606+
env:
607+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
608+
with:
609+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
610+
asset_path: /tmp/cuda-11-7-windows-amd64.tar.gz
611+
asset_name: cuda-11-7-windows-amd64.tar.gz
612+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)