Skip to content

changed examples demo, also trigger all basics #90

changed examples demo, also trigger all basics

changed examples demo, also trigger all basics #90

Workflow file for this run

name: gcp-auth-script
on:
push:
branches:
- ci-testing
- main
- release/* #ToDo: add a release branch
pull_request:
workflow_dispatch:
jobs:
activate-vm:
runs-on: ubuntu-latest
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Install clients
run: |
pip3 install pymongo google-api-python-client paramiko==2.7.1
- name: Start GPU VM
run: |
cd demos/.github/auth
mkdir -p ~/.ssh
touch ~/.ssh/id_rsa
echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa
chmod 600 $HOME/.ssh/id_rsa
python3 db_auth.py ${{ secrets.DB_ENDPOINT }} ${{ secrets.DB_OBJ_ID }}
python3 vm_auth.py ${{ secrets.SSH_USERNAME }} ${{ secrets.SSH_PASSPHRASE }} "false"
run-test:
needs: activate-vm
runs-on: self-hosted
steps:
- name: Clean repository
run:
sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Run Demo Testing
run: |
cd demos
docker run -v `pwd`:/ivy/demos unifyai/multicuda:base_and_requirements demos/tests/test_demos.sh ${{ secrets.USER_API_KEY }} resnet_demo.ipynb "examples"
deactivate-vm:
needs: run-test
runs-on: ubuntu-latest
if: always() # Run this job always, regardless of the status of run-test
steps:
- name: Checkout Demos🛎
uses: actions/checkout@v2
with:
path: demos
persist-credentials: false
submodules: "recursive"
fetch-depth: 1
- name: Install clients
run: |
pip3 install pymongo google-api-python-client paramiko==2.7.1
- name: Stop GPU VM
run: |
cd demos/.github/auth
python3 db_auth.py ${{ secrets.DB_ENDPOINT }} ${{ secrets.DB_OBJ_ID }}
python3 vm_auth.py ${{ secrets.SSH_USERNAME }} ${{ secrets.SSH_PASSPHRASE }} "true"