-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (91 loc) · 2.97 KB
/
build.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build
on:
push: {branches: [main]}
pull_request: {branches: [main]}
env:
CARGO_TERM_COLOR: always
LIBTORCH_URL: https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.9.0%2Bcpu.zip
LIBTORCH_DST: libtorch-cxx11-abi-shared-with-deps-1.9.0+cpu.zip
HYPE_URL: https://github.com/grasevski/hype/releases/download/latest/hype
jobs:
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: cargo build --release
- uses: actions/upload-artifact@v2
with: {name: fat-mac, path: target/release/fat}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- run: cargo build --release
- uses: actions/upload-artifact@v2
with: {name: fat.exe, path: target/release/fat.exe}
build:
needs: [mac, windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: wget "$LIBTORCH_URL"
- run: unzip "$LIBTORCH_DST"
- run: LIBTORCH="$(pwd)/libtorch" LD_LIBRARY_PATH="$(pwd)/libtorch/lib:$LD_LIBRARY_PATH" ./build.sh
- uses: actions/upload-artifact@v2
with: {name: fat, path: target/release/fat}
- uses: actions/upload-artifact@v2
with: {name: score.json, path: score.json}
tune:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: wget "$LIBTORCH_URL"
- run: unzip "$LIBTORCH_DST"
- run: wget "$HYPE_URL"
- run: chmod +x hype
- run: LIBTORCH="$(pwd)/libtorch" LD_LIBRARY_PATH="$(pwd)/libtorch/lib:$LD_LIBRARY_PATH" ./hype -m "$(cat hype.json)" -- ./hype.sh -d 1s | tee tune.csv
- uses: actions/upload-artifact@v2
with: {name: tune.csv, path: tune.csv}
delay:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: wget "$LIBTORCH_URL"
- run: unzip "$LIBTORCH_DST"
- run: wget "$HYPE_URL"
- run: chmod +x hype
- run: LIBTORCH="$(pwd)/libtorch" LD_LIBRARY_PATH="$(pwd)/libtorch/lib:$LD_LIBRARY_PATH" ./hype -m "$(cat hype.json)" -- ./hype.sh -d 1d | tee delay.csv
- uses: actions/upload-artifact@v2
with: {name: delay.csv, path: delay.csv}
release:
needs: [tune, delay]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with: {name: fat-mac}
- run: mv fat fat-mac
- uses: actions/download-artifact@v2
with: {name: fat}
- uses: actions/download-artifact@v2
with: {name: fat.exe}
- uses: actions/download-artifact@v2
with: {name: score.json}
- uses: actions/download-artifact@v2
with: {name: tune.csv}
- uses: actions/download-artifact@v2
with: {name: delay.csv}
- uses: marvinpinto/action-automatic-releases@latest
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
files: |
LICENSE
fat
fat-mac
fat.exe
score.json
tune.csv
delay.csv