Skip to content

Sidecar build for windows #24

Sidecar build for windows

Sidecar build for windows #24

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"