Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition to GitHub actions #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions .github/workflows/benchmark-backends.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Run benchmarks

on:
schedule:
- cron: '0 0 * * *'

jobs:
onnxruntime_stable:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be updated to the v4 for all of the jobs in this file?

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v4


- name: Build docker image
run: docker build -t scoreboard/onnx -f runtimes/onnx-runtime/stable/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name onnx-runtime --env-file setup/env.list -v ${{ github.workspace }}/results/onnx-runtime/stable:/root/results scoreboard/onnx || true

- name: Deploy results
run: . setup/git-deploy-results.sh


onnxruntime_dev:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build docker image
run: docker build -t scoreboard/ort-dev -f runtimes/onnx-runtime/development/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name onnx-runtime --env-file setup/env.list -v ${{ github.workspace }}/results/onnx-runtime/development:/root/results scoreboard/ort-dev || true

- name: Deploy results
run: . setup/git-deploy-results.sh


onnx_tf_stable:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build docker image
run: docker build -t scoreboard/onnxtf -f runtimes/onnx-tf/stable/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name onnxtf --env-file setup/env.list -v ${{ github.workspace }}/results/onnx-tf/stable:/root/results scoreboard/onnxtf || true

- name: Deploy results
run: . setup/git-deploy-results.sh


onnx_tf_dev:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build docker image
run: docker build -t scoreboard/onnxtf-dev -f runtimes/onnx-tf/development/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name onnxtf --env-file setup/env.list -v ${{ github.workspace }}/results/onnx-tf/development:/root/results scoreboard/onnxtf-dev || true

- name: Deploy results
run: . setup/git-deploy-results.sh


jaxonnxruntime_stable:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build docker image
run: docker build -t scoreboard/jaxonnxruntime -f runtimes/jaxonnxruntime/stable/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name jaxonnxruntime --env-file setup/env.list -v ${{ github.workspace }}/results/jaxonnxruntime/stable:/root/results scoreboard/jaxonnxruntime || true

- name: Deploy results
run: . setup/git-deploy-results.sh

jaxonnxruntime_dev:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: true
fetch-depth: 0
clean: true

- name: Build docker image
run: docker build -t scoreboard/jaxonnxruntime-dev -f runtimes/jaxonnxruntime/development/Dockerfile .

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Run docker container
run: docker run --name jaxonnxruntime --env-file setup/env.list -v ${{ github.workspace }}/results/jaxonnxruntime/development:/root/results scoreboard/jaxonnxruntime-dev || true

- name: Deploy results
run: . setup/git-deploy-results.sh
40 changes: 40 additions & 0 deletions .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Website Update

on:
schedule:
- cron: '0 6 * * *'

jobs:
generate_website:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
clean: true

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade -r requirements_web.txt

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.DEPLOY_KEY }}

- name: Git setup
run: . setup/git-setup.sh

- name: Generate website
run: python3 website-generator/generator.py --config ./setup/config.json

- name: Deploy website
run: . setup/git-deploy-website.sh
45 changes: 24 additions & 21 deletions ADD-BACKEND.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,40 @@ For `development` version the `core_packages` list is optional:
}
```

### 3. Add new job to Azure pipelines
### 3. Add new job to GitHub Actions workflow

* Edit [azure-pipelines.yml](azure-pipelines.yml) file.
* Edit [benchmark-backends.yml](.github/workflows/benchmark-backends.yml) file.
* Copy and paste this [job template](examples/job.yml) to the end of file.
* Fill `new_backend` with the new backend unique name.
* Change the `docker build` and `docker run` commands to match your backend.

```yml

- job: new_backend
timeoutInMinutes: 90
steps:
- checkout: self
persistCredentials: true
clean: true
jobs:
... # other jobs

- task: InstallSSHKey@0
inputs:
knownHostsEntry: ~/.ssh/known_hosts
sshPublicKey: $(public_deploy_key)
sshKeySecureFile: deploy_key
new_backend:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v2

- script: docker build -t scoreboard/new_backend -f runtimes/new_backend/stable/Dockerfile .
displayName: 'Build docker image'
- name: Build docker image
run: docker build -t scoreboard/new_backend -f runtimes/new_backend/stable/Dockerfile .

- script: . setup/git-setup.sh
displayName: 'Git setup'
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.DEPLOY_KEY }}

- script: docker run --name new_backend --env-file setup/env.list -v `pwd`/results/new_backend/stable:/root/results scoreboard/new_backend || true
displayName: 'Run docker container'
- name: Git setup
run: . setup/git-setup.sh

- script: . setup/git-deploy-results.sh
displayName: 'Deploy results'
- name: Run docker container
run: docker run --name new_backend --env-file setup/env.list -v `pwd`/results/new_backend/stable:/root/results scoreboard/new_backend || true

- name: Deploy results
run: . setup/git-deploy-results.sh
```
45 changes: 0 additions & 45 deletions azure-pipelines-website.yml

This file was deleted.

Loading