-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (50 loc) · 1.96 KB
/
python-app.yml
File metadata and controls
60 lines (50 loc) · 1.96 KB
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
name: Short Time Test
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
execute-on-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for git operations later
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Add SSH key and configure known hosts
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "Host server-host
HostName ${{ secrets.SERVER_HOST }}
User ${{ secrets.SSH_USERNAME }}
Port ${{ secrets.SSH_PORT || '22' }}
IdentityFile ~/.ssh/id_rsa" > ~/.ssh/config
ssh-keyscan -p ${{ secrets.SSH_PORT || '22' }} ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Copy files to server
run: |
rsync -avz -e "ssh -p ${{ secrets.SSH_PORT || '22' }}" --delete \
--exclude='.git' ./ ${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_HOST }}:/tmp/Roller/
- name: Execute using LatestTVM
run: |
ssh -p ${{ secrets.SSH_PORT || '22' }} ${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_HOST }} \
"cd /tmp/Roller && chmod +x ./tests/short-time-LatestTVM.sh && \
export TVM_LIBRARY_PATH=${{ secrets.LATEST_TVM_LIBRARY_PATH }} && ./tests/short-time-LatestTVM.sh"
- name: Execute using OldTVM
run: |
ssh -p ${{ secrets.SSH_PORT || '22' }} ${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_HOST }} \
"cd /tmp/Roller && chmod +x ./tests/short-time-OldTVM.sh && \
export TVM_LIBRARY_PATH=${{ secrets.OLD_TVM_LIBRARY_PATH }} && ./tests/short-time-OldTVM.sh"
- name: Cleanup server
run: |
ssh -p ${{ secrets.SSH_PORT || '22' }} \
${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_HOST }} \
"rm -rf /tmp/Roller"