-
Notifications
You must be signed in to change notification settings - Fork 2
134 lines (128 loc) · 5.4 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
name: "Build packages"
on:
# release:
# types: [created]
push:
env:
DSS_CAPI_VERSION: '0.13.4'
DSS_MATLAB_VERSION: '0.13.4'
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@v2"
with:
name: 'packages'
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@v3"
with:
name: 'packages'
path: '${{ github.workspace }}/dss_matlab/release'
darwin_x64:
runs-on: 'macos-12'
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@v3"
with:
name: 'packages'
path: '${{ github.workspace }}/dss_matlab/release'