-
Notifications
You must be signed in to change notification settings - Fork 5
126 lines (109 loc) · 3.89 KB
/
cpu.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: cpu_release
on:
push:
tags:
- "v*.*.*"
env:
libtorch_version: 2.5.0
jobs:
release_linux_glibc232:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: make
working-directory: ./lib
run: |
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${{ env.libtorch_version }}%2Bcpu.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.so libgotorch_cpu.glibc232.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_cpu.glibc232.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true
release_linux_glibc231:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: make
working-directory: ./lib
run: |
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${{ env.libtorch_version }}%2Bcpu.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.so libgotorch_cpu.glibc231.so
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_cpu.glibc231.so
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true
# release_macos_x86_64:
# runs-on: macos-11
# steps:
# - uses: actions/checkout@v4
# - name: make
# working-directory: ./lib
# run: |
# wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-macos-x86_64-${{ env.libtorch_version }}.zip
# unzip -qq libtorch.zip
# cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
# make -j
# mv libgotorch.dylib libgotorch_cpu_x86_64.dylib
# - name: upload
# uses: ncipollo/release-action@v1
# with:
# artifacts: ./lib/libgotorch_cpu_x86_64.dylib
# allowUpdates: true
# generateReleaseNotes: true
# token: ${{ secrets.MY_GITHUB_TOKEN }}
# omitBody: true
release_macos_arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: make
working-directory: ./lib
run: |
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-${{ env.libtorch_version }}.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=./libtorch -DCMAKE_BUILD_TYPE=Release .
make -j
mv libgotorch.dylib libgotorch_cpu_arm64.dylib
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/libgotorch_cpu_arm64.dylib
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true
release_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: make
working-directory: ./lib
run: |
curl -o libtorch.zip https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-${{ env.libtorch_version }}%2Bcpu.zip
unzip -qq libtorch.zip
cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}\lib\libtorch .
msbuild gotorch.sln -p:Configuration=Release
mv Release\gotorch.dll Release\gotorch_cpu.dll
- name: upload
uses: ncipollo/release-action@v1
with:
artifacts: ./lib/Release/gotorch_cpu.dll
allowUpdates: true
generateReleaseNotes: true
token: ${{ secrets.MY_GITHUB_TOKEN }}
omitBody: true