-
Notifications
You must be signed in to change notification settings - Fork 13
196 lines (190 loc) · 7.66 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
185
186
187
188
189
190
191
192
193
194
195
196
name: Builds
on:
# release:
# types: [created]
push:
jobs:
build_linux_x64:
name: 'Linux x64'
runs-on: ubuntu-latest
container:
image: 'docker://pmeira/manylinux_wheel_fpc322_x86_64'
env:
KLUSOLVE_URL: 'https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_linux_x64.tar.gz'
DSS_CAPI_BUILD_ODDIE: '1'
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_capi
cd dss_capi
git checkout $GITHUB_SHA
- name: 'Download/extract KLUSolve(X)'
run: |
curl -s -L "${KLUSOLVE_URL}" -o klusolve.tar.gz
tar zxf klusolve.tar.gz
mkdir -p dss_capi/lib/linux_x64
cp -r klusolvex/lib/* dss_capi/lib/
- name: Build
run: |
cd dss_capi
export PATH=/opt/python/cp38-cp38/bin/:$PATH
source ./build/make_metadata.sh
./build/build_linux_x64.sh
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'
build_linux_x86:
name: 'Linux x86'
runs-on: ubuntu-latest
env:
KLUSOLVE_URL: 'https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_linux_x86.tar.gz'
DOCKER_IMAGE: 'pmeira/manylinux_wheel_fpc322_i686'
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_capi
cd dss_capi
git checkout $GITHUB_SHA
- name: 'Setup Docker'
run: |
docker pull $DOCKER_IMAGE
- name: 'Download/extract KLUSolve(X)'
run: |
curl -s -L "${KLUSOLVE_URL}" -o klusolve.tar.gz
tar zxf klusolve.tar.gz
mkdir -p dss_capi/lib/linux_x86
cp -r klusolvex/lib/* dss_capi/lib/
- name: Build
run: |
cd dss_capi
source ./build/make_metadata.sh
docker run -e DSS_CAPI_VERSION -v "${PWD}/..:/build" $DOCKER_IMAGE bash -c 'cd /build/dss_capi; PATH=/opt/python/cp38-cp38/bin/:$PATH bash build/build_linux_x86.sh'
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'
build_macos_x64:
name: 'macOS x64 and ARM64'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: 'dss_capi'
- name: 'Install FreePascal'
run: |
wget https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.2.2/fpc-3.2.2.intelarm64-macosx.dmg/download -Ofpc.dmg -q
sudo hdiutil attach fpc.dmg
sudo installer -package /Volumes/fpc-3.2.2.intelarm64-macosx/fpc-3.2.2-intelarm64-macosx.mpkg -target /
- name: 'Download/extract KLUSolve(X)'
run: |
wget "https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_darwin_x64.tar.gz" -Oklusolve_x64.tar.gz -q
wget "https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_darwin_arm64.tar.gz" -Oklusolve_arm64.tar.gz -q
tar zxf klusolve_x64.tar.gz
tar zxf klusolve_arm64.tar.gz
mkdir -p dss_capi/lib/darwin_x64
mkdir -p dss_capi/lib/darwin_arm64
cp -r klusolvex/lib/* dss_capi/lib/
- name: Build x64
run: |
cd dss_capi
source ./build/make_metadata.sh
./build/build_macos_x64.sh
ls -lR lib
- name: Build ARM64
run: |
cd dss_capi
source ./build/make_metadata.sh
./build/build_macos_arm64.sh
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'
build_win_x64:
name: 'Windows x64'
runs-on: windows-2019
env:
DSS_CAPI_BUILD_ODDIE: '1'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: 'dss_capi'
- name: 'Install FreePascal'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://sourceforge.net/projects/freepascal/files/Win32/3.2.2/fpc-3.2.2.i386-win32.exe/download -o fpc-win32.exe
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://sourceforge.net/projects/freepascal/files/Win32/3.2.2/fpc-3.2.2.i386-win32.cross.x86_64-win64.exe/download -o fpc-win32.cross.x86_64-win64.exe
fpc-win32.exe /VERYSILENT
fpc-win32.cross.x86_64-win64.exe /VERYSILENT
- name: 'Download/extract KLUSolve(X)'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_win_x64-gcc8.1.zip -o klusolve_x64.zip
7z x -y -o. klusolve_x64.zip
mkdir dss_capi\lib
mkdir dss_capi\lib\win_x64
xcopy /E klusolvex\lib dss_capi\lib
- name: Build
#TODO? cv2pdb (generate PDB for MSVC) and dlltool (generate lib compatible with GCC)
shell: cmd
run: |
cd dss_capi
"c:\Program Files\Git\bin\bash" -c "bash ./build/make_metadata.sh write"
set PATH=%PATH%;C:\FPC\3.2.2\bin\i386-win32
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
call build/generated/set_version.bat
call build/build_win_x64.bat
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
path: '${{ github.workspace }}/dss_capi/release/*.zip'
build_win:
name: 'Windows x86'
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: 'dss_capi'
- name: 'Install FreePascal'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://sourceforge.net/projects/freepascal/files/Win32/3.2.2/fpc-3.2.2.i386-win32.exe/download -o fpc-win32.exe
fpc-win32.exe /VERYSILENT
- name: 'Download/extract KLUSolve(X)'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_win_x86-msvc2017.zip -o klusolve_x86.zip
7z x -y -o. klusolve_x86.zip
mkdir dss_capi\lib
mkdir dss_capi\lib\win_x86
xcopy /E klusolvex\lib dss_capi\lib
- name: Build
#TODO? cv2pdb (generate PDB for MSVC) and dlltool (generate lib compatible with GCC)
shell: cmd
run: |
cd dss_capi
"c:\Program Files\Git\bin\bash" -c "bash ./build/make_metadata.sh write"
set PATH=%PATH%;C:\FPC\3.2.2\bin\i386-win32
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
call build/generated/set_version.bat
call build/build_win_x86.bat
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
path: '${{ github.workspace }}/dss_capi/release/*.zip'