-
Notifications
You must be signed in to change notification settings - Fork 2
184 lines (176 loc) · 7.42 KB
/
builds.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: "Build packages"
on:
# release:
# types: [created]
push:
env:
DSS_CAPI_VERSION: '0.14.3'
DSS_MATLAB_VERSION: '0.14.3-1'
jobs:
linux_x64:
runs-on: ubuntu-latest
env:
TRAVIS_JOB_NAME: "linux_x64"
steps:
- name: Install requirements
run: |
sudo apt-get install patchelf
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_matlab
cd dss_matlab
git checkout $GITHUB_SHA
- name: Package
run: |
cd dss_matlab
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/dss_capi_${DSS_CAPI_VERSION}_${TRAVIS_JOB_NAME}.tar.gz" -Odss_capi.tar.gz -q
tar zxf dss_capi.tar.gz
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/messages.tar.gz" -Omessages.tar.gz -q
tar zxf messages.tar.gz
mkdir -p release/dss_matlab
cp -R "+DSS_MATLAB" "release/dss_matlab/+DSS_MATLAB"
mv messages "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capi.so "release/dss_matlab/+DSS_MATLAB/dss_capi.so"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capid.so "release/dss_matlab/+DSS_MATLAB/dss_capid.so"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libklusolvex.so "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/LICENSE "release/dss_matlab/DSS_C-API_LICENSE"
mv dss_capi/*LICENSE "release/dss_matlab/"
mv LICENSE release/dss_matlab/
mv README.md release/dss_matlab/
mv examples release/dss_matlab/
cd "release/dss_matlab/+DSS_MATLAB"
patchelf --set-rpath '$ORIGIN/.' dss_capi.so
patchelf --set-rpath '$ORIGIN/.' dss_capid.so
cd ../..
tar zcf dss_matlab_v${DSS_MATLAB_VERSION}_${TRAVIS_JOB_NAME}.tar.gz dss_matlab
rm -rf dss_matlab
ls -l
cd ..
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v4"
with:
name: 'package-linux_x64'
path: '${{ github.workspace }}/dss_matlab/release'
win_x64:
runs-on: ubuntu-latest
env:
TRAVIS_JOB_NAME: "win_x64"
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_matlab
cd dss_matlab
git checkout $GITHUB_SHA
- name: Package
run: |
cd dss_matlab
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/dss_capi_${DSS_CAPI_VERSION}_${TRAVIS_JOB_NAME}.zip" -Odss_capi.zip -q
unzip dss_capi.zip
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/messages.tar.gz" -Omessages.tar.gz -q
tar zxf messages.tar.gz
rm -f dss_capi/lib/${TRAVIS_JOB_NAME}/*_v8.dll
mkdir -p release/dss_matlab
cp -R "+DSS_MATLAB" "release/dss_matlab/+DSS_MATLAB"
mv messages "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/*.dll "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/LICENSE "release/dss_matlab/DSS_C-API_LICENSE"
mv dss_capi/*LICENSE "release/dss_matlab/"
mv LICENSE release/dss_matlab/
mv README.md release/dss_matlab/
mv examples release/dss_matlab/
cd release
zip -r dss_matlab_v${DSS_MATLAB_VERSION}_${TRAVIS_JOB_NAME}.zip dss_matlab
rm -rf dss_matlab
ls -l
cd ..
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v4"
with:
name: 'package-win_x64'
path: '${{ github.workspace }}/dss_matlab/release'
darwin_x64:
runs-on: 'macos-13'
env:
TRAVIS_JOB_NAME: "darwin_x64"
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_matlab
cd dss_matlab
git checkout $GITHUB_SHA
- name: Package
run: |
cd dss_matlab
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/dss_capi_${DSS_CAPI_VERSION}_${TRAVIS_JOB_NAME}.tar.gz" -Odss_capi.tar.gz -q
tar zxf dss_capi.tar.gz
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/messages.tar.gz" -Omessages.tar.gz -q
tar zxf messages.tar.gz
mkdir -p release/dss_matlab
cp -R "+DSS_MATLAB" "release/dss_matlab/+DSS_MATLAB"
mv messages "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capi.dylib "release/dss_matlab/+DSS_MATLAB/dss_capi.dylib"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capid.dylib "release/dss_matlab/+DSS_MATLAB/dss_capid.dylib"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libklusolvex.dylib "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/LICENSE "release/dss_matlab/DSS_C-API_LICENSE"
mv dss_capi/*LICENSE "release/dss_matlab/"
mv LICENSE release/dss_matlab/
mv README.md release/dss_matlab/
mv examples release/dss_matlab/
cd release
tar zcf dss_matlab_v${DSS_MATLAB_VERSION}_macos_x64.tar.gz dss_matlab
rm -rf dss_matlab
ls -l
cd ..
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v4"
with:
name: 'package-darwin_x64'
path: '${{ github.workspace }}/dss_matlab/release'
darwin_arm64:
runs-on: 'macos-13'
env:
TRAVIS_JOB_NAME: "darwin_arm64"
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_matlab
cd dss_matlab
git checkout $GITHUB_SHA
- name: Package
run: |
cd dss_matlab
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/dss_capi_${DSS_CAPI_VERSION}_${TRAVIS_JOB_NAME}.tar.gz" -Odss_capi.tar.gz -q
tar zxf dss_capi.tar.gz
wget "https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_VERSION}/messages.tar.gz" -Omessages.tar.gz -q
tar zxf messages.tar.gz
mkdir -p release/dss_matlab
cp -R "+DSS_MATLAB" "release/dss_matlab/+DSS_MATLAB"
mv messages "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capi.dylib "release/dss_matlab/+DSS_MATLAB/dss_capi.dylib"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libdss_capid.dylib "release/dss_matlab/+DSS_MATLAB/dss_capid.dylib"
mv dss_capi/lib/${TRAVIS_JOB_NAME}/libklusolvex.dylib "release/dss_matlab/+DSS_MATLAB/"
mv dss_capi/LICENSE "release/dss_matlab/DSS_C-API_LICENSE"
mv dss_capi/*LICENSE "release/dss_matlab/"
mv LICENSE release/dss_matlab/
mv README.md release/dss_matlab/
mv examples release/dss_matlab/
cd release
tar zcf dss_matlab_v${DSS_MATLAB_VERSION}_macos_arm64.tar.gz dss_matlab
rm -rf dss_matlab
ls -l
cd ..
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v4"
with:
name: 'package-darwin_arm64'
path: '${{ github.workspace }}/dss_matlab/release'
merge:
runs-on: ubuntu-latest
needs: [linux_x64, win_x64, darwin_x64, darwin_arm64]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: 'dss_matlab-packages'
pattern: '*'
delete-merged: true