-
Notifications
You must be signed in to change notification settings - Fork 52
79 lines (65 loc) · 2.31 KB
/
sidecar-windows.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Sidecar build for windows
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-2019 # Run this job on a windows environment
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Install 7-Zip
run: choco install 7zip.install
- name: Demo run for 7zip
run: |
./package_windows.sh
- name: Run 7z action
run: |
7z a -t7z "sidecar_test.7z" "onnxruntime/" "qdrant/" "models/" "src\\agent\\llm_funcs.rs"
# Install gcp skcd
- name: Setup GCP SDK
uses: 'google-github-actions/setup-gcloud@v0'
with:
project_id: '${{ env.GCP_PROJECT_ID }}'
service_account_key: '${{ secrets.GCP_SA_KEY }}'
# Setup auth for gcp
- name: GPC Auth
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_GAE_SA_KEY }}'
- name: Upload to GCP for testing
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_BUCKET_NAME: ${{ secrets.GCP_BUCKET_NAME }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: |
# Set your GCP project
gcloud config set project ${{ env.GCP_PROJECT_ID }}
# Copy the built binary to the GCP bucket
gsutil cp sidecar_test.7z "gs://sidecar-bin/windows/sidecar_test.zip"
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
cargo build --release
# Now run the .sh script which does the building and packaging
- name: Build and package
run: |
./package_windows_bin.sh
# Github action parser for sure, something to test it out too quickly
- name: Compile the 7z
run: |
7z a -t7z "sidecar.7z" "onnxruntime/" "qdrant/" "target\\release\\webserver" "models/"
- name: Upload to GCP bucket generated zip file
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_BUCKET_NAME: ${{ secrets.GCP_BUCKET_NAME }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: |
# Set your GCP project
gcloud config set project ${{ env.GCP_PROJECT_ID }}
# Copy the built binary to the GCP bucket
gsutil cp sidecar.zip "gs://sidecar-bin/windows/sidecar.zip"