-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·387 lines (381 loc) · 15.1 KB
/
cubesqlplugin.yaml
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
name: CubeSQLPlugin
on:
workflow_dispatch:
inputs:
do_commit_and_push:
description: Commit and Push
required: true
default: true
type: boolean
env:
MSBUILD_EXE: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe
jobs:
build-cubesqlplugin-linux-arm64:
name: Build CubeSQLPlugin Linux ARM64
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
run: |
docker run \
--rm \
-v "$PWD":/usr/src/cubesqlplugin \
-w /usr/src/cubesqlplugin \
arm64v8/gcc:8.1 \
/bin/bash -c "cd gcc && export LINUX_LIBPATH=../libs/linux-arm64 && make"
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ arm64/
mkdir -p ./CubeSQLPlugin/Build\ Resources/Linux\ arm64/
cp ./gcc/CubeSQLPlugin.so ./CubeSQLPlugin/Build\ Resources/Linux\ arm64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-linux-arm64
retention-days: 2
path: |
CubeSQLPlugin/Build Resources/Linux arm64/CubeSQLPlugin.so
if-no-files-found: error
build-cubesqlplugin-linux-arm32:
name: Build CubeSQLPlugin Linux ARM32
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
run: |
docker run \
--platform linux/arm/v7 \
--rm \
-v "$PWD":/usr/src/cubesqlplugin \
-w /usr/src/cubesqlplugin \
gcc:8.1 \
/bin/bash -c "cd gcc && export LINUX_LIBPATH=../libs/linux-arm && make"
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ arm/
mkdir -p ./CubeSQLPlugin/Build\ Resources/Linux\ arm/
cp ./gcc/CubeSQLPlugin.so ./CubeSQLPlugin/Build\ Resources/Linux\ ARM
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-linux-arm
retention-days: 2
path: |
CubeSQLPlugin/Build Resources/Linux ARM/CubeSQLPlugin.so
if-no-files-found: error
build-cubesqlplugin-linux-i386:
name: Build CubeSQLPlugin Linux i386
runs-on: ubuntu-latest
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
run: |
docker run \
--rm \
-v "$PWD":/usr/src/cubesqlplugin \
-w /usr/src/cubesqlplugin \
i386/gcc:6.1 \
/bin/bash -c "cd gcc && export LINUX_LIBPATH=../libs/linux && make"
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ X86/
mkdir -p ./CubeSQLPlugin/Build\ Resources/Linux\ X86/
cp ./gcc/CubeSQLPlugin.so ./CubeSQLPlugin/Build\ Resources/Linux\ X86
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-linux
retention-days: 2
path: |
CubeSQLPlugin/Build Resources/Linux X86/CubeSQLPlugin.so
if-no-files-found: error
build-cubesqlplugin-linux-x86-64:
name: Build CubeSQLPlugin Linux x86-64
runs-on: ubuntu-latest
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
run: |
docker run \
--platform linux/amd64 \
--rm \
-v "$PWD":/usr/src/cubesqlplugin \
-w /usr/src/cubesqlplugin \
gcc:8.1 \
/bin/bash -c "cd gcc && export LINUX_LIBPATH=../libs/linux-64 && make"
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ X86-64/
mkdir -p ./CubeSQLPlugin/Build\ Resources/Linux\ X86-64/
cp ./gcc/CubeSQLPlugin.so ./CubeSQLPlugin/Build\ Resources/Linux\ x86-64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-linux-64
retention-days: 2
path: |
CubeSQLPlugin/Build Resources/Linux x86-64/CubeSQLPlugin.so
if-no-files-found: error
build-cubesqlplugin-windows-ARM64:
name: Build CubeSQLPlugin Windows ARM64
runs-on: windows-2019
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
shell: powershell
run: |
& '${{ env.MSBUILD_EXE }}' .\VisualC\CubeSQLPlugin\CubeSQLPlugin.sln /p:Configuration=Release /p:Platform=ARM64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-win-ARM64
retention-days: 2
path: |
./VisualC/CubeSQLPlugin/ARM64/Release/cubeSQL_ARM64.dll
if-no-files-found: error
build-cubesqlplugin-windows-x64:
name: Build CubeSQLPlugin Windows x64
runs-on: windows-2019
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
shell: powershell
run: |
& '${{ env.MSBUILD_EXE }}' .\VisualC\CubeSQLPlugin\CubeSQLPlugin.sln /p:Configuration=Release /p:Platform=x64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-win-64bit
retention-days: 2
path: |
./VisualC/CubeSQLPlugin/x64/Release/cubeSQL_64bit.dll
if-no-files-found: error
build-cubesqlplugin-windows-win32:
name: Build CubeSQLPlugin Windows Win32
runs-on: windows-2019
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Build
shell: powershell
run: |
& '${{ env.MSBUILD_EXE }}' .\VisualC\CubeSQLPlugin\CubeSQLPlugin.sln /p:Configuration=Release /p:Platform=Win32
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-win-32bit
retention-days: 2
path: |
./VisualC/CubeSQLPlugin/Release/cubeSQL_32bit.dll
if-no-files-found: error
build-cubesqlplugin-macOS:
name: Build CubeSQLPlugin macOS
runs-on: macos-latest
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: Install CodeSign Certificate
env:
MACOS_CODESIGN_CERTIFICATE: ${{ secrets.MACOS_CODESIGN_CERTIFICATE }}
MACOS_CODESIGN_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_PASSWORD }}
MACOS_CODESIGN_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_CODESIGN_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$MACOS_CODESIGN_CERTIFICATE" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
# create temporary keychain
security create-keychain -p "$MACOS_CODESIGN_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$MACOS_CODESIGN_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$MACOS_CODESIGN_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$MACOS_CODESIGN_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Build Universal
env:
MACOS_CODESIGN_DEVELOPMENT_TEAM: ${{ secrets.MACOS_CODESIGN_DEVELOPMENT_TEAM }}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run: |
cd XCode
xcrun xcodebuild archive \
-project ./CubeSQLPlugin.xcodeproj \
-scheme CubeSQLPlugin \
-archivePath ./macOS-Universal.xcarchive \
MACOSX_DEPLOYMENT_TARGET=10.14 \
SKIP_INSTALL=NO \
ONLY_ACTIVE_ARCH=NO \
ARCHS="x86_64 arm64" \
CODE_SIGN_STYLE="Manual" \
DEVELOPMENT_TEAM="$MACOS_CODESIGN_DEVELOPMENT_TEAM" \
CODE_SIGN_IDENTITY="$MACOS_CODESIGN_IDENTITY" \
CODE_SIGNING_REQUIRED=YES
- name: Upload Artifact macOS Universal
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-macOS-Universal
retention-days: 2
path: |
XCode/macOS-Universal.xcarchive/Products/usr/local/lib/CubeSQLPlugin.dylib
if-no-files-found: error
- name: Build x86_64
env:
MACOS_CODESIGN_DEVELOPMENT_TEAM: ${{ secrets.MACOS_CODESIGN_DEVELOPMENT_TEAM }}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run: |
cd XCode
xcrun xcodebuild archive \
-project ./CubeSQLPlugin.xcodeproj \
-scheme CubeSQLPlugin \
-archivePath ./macOS-x86_64.xcarchive \
MACOSX_DEPLOYMENT_TARGET=10.14 \
SKIP_INSTALL=NO \
ONLY_ACTIVE_ARCH=NO \
ARCHS="x86_64" \
CODE_SIGN_STYLE="Manual" \
DEVELOPMENT_TEAM="$MACOS_CODESIGN_DEVELOPMENT_TEAM" \
CODE_SIGN_IDENTITY="$MACOS_CODESIGN_IDENTITY" \
CODE_SIGNING_REQUIRED=YES
- name: Upload Artifact macOS x86_64
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-macOS-x86_64
retention-days: 2
path: |
XCode/macOS-x86_64.xcarchive/Products/usr/local/lib/CubeSQLPlugin.dylib
if-no-files-found: error
- name: Build arm64
env:
MACOS_CODESIGN_DEVELOPMENT_TEAM: ${{ secrets.MACOS_CODESIGN_DEVELOPMENT_TEAM }}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run: |
cd XCode
xcrun xcodebuild archive \
-project ./CubeSQLPlugin.xcodeproj \
-scheme CubeSQLPlugin \
-archivePath ./macOS-arm64.xcarchive \
MACOSX_DEPLOYMENT_TARGET=10.14 \
SKIP_INSTALL=NO \
ONLY_ACTIVE_ARCH=NO \
ARCHS="arm64" \
CODE_SIGN_STYLE="Manual" \
DEVELOPMENT_TEAM="$MACOS_CODESIGN_DEVELOPMENT_TEAM" \
CODE_SIGN_IDENTITY="$MACOS_CODESIGN_IDENTITY" \
CODE_SIGNING_REQUIRED=YES
- name: Upload Artifact macOS arm64
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-macOS-arm64
retention-days: 2
path: |
XCode/macOS-arm64.xcarchive/Products/usr/local/lib/CubeSQLPlugin.dylib
if-no-files-found: error
push-to-repository:
name: Push to Repository
runs-on: ubuntu-latest
needs: [build-cubesqlplugin-linux-arm64, build-cubesqlplugin-linux-arm32, build-cubesqlplugin-linux-i386, build-cubesqlplugin-linux-x86-64, build-cubesqlplugin-windows-ARM64, build-cubesqlplugin-windows-x64, build-cubesqlplugin-windows-win32, build-cubesqlplugin-macOS]
steps:
- name: Check out Repository
uses: actions/checkout@v4
- name: CubeSQLPlugin Version
run: |
CUBESQLPLUGIN_VERSION=$(grep -o "#define PLUGIN_VERSION.*" sources/CubeSQLPlugin.h | awk -F'"' '{print $2}')
echo "CubeSQLPlugin Version: $CUBESQLPLUGIN_VERSION"
echo "CUBESQLPLUGIN_VERSION=$CUBESQLPLUGIN_VERSION" >> $GITHUB_ENV
- name: Remove old CubeSQLPlugin Builds
run: |
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ arm64
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ ARM
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ X86
rm -r -f ./CubeSQLPlugin/Build\ Resources/Linux\ x86-64
rm -r -f ./CubeSQLPlugin/Build\ Resources/Windows
rm -r -f ./CubeSQLPlugin/Build\ Resources/Windows x86-64
rm -r -f ./CubeSQLPlugin/Build\ Resources/Windows arm64
rm -r -f ./CubeSQLPlugin/Build\ Resources/Mac\ Universal
rm -r -f ./CubeSQLPlugin/Build\ Resources/Mac\ arm64
rm -r -f ./CubeSQLPlugin/Build\ Resources/Mac\ x86-64
- name: Download Artifacts linux
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-linux
path: CubeSQLPlugin/Build Resources/Linux X86
- name: Download Artifacts linux-64
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-linux-64
path: CubeSQLPlugin/Build Resources/Linux x86-64
- name: Download Artifacts linux-arm
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-linux-arm
path: CubeSQLPlugin/Build Resources/Linux ARM
- name: Download Artifacts linux-arm64
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-linux-arm64
path: CubeSQLPlugin/Build Resources/Linux arm64
- name: Download Artifacts win-ARM64
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-win-ARM64
path: CubeSQLPlugin/Build Resources/Windows arm64
- name: Download Artifacts win-64bit
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-win-64bit
path: CubeSQLPlugin/Build Resources/Windows x86-64
- name: Download Artifacts win-32bit
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-win-32bit
path: CubeSQLPlugin/Build Resources/Windows
- name: Download Artifacts macOS-Universal
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-macOS-Universal
path: CubeSQLPlugin/Build Resources/Mac Universal
- name: Download Artifacts macOS-x86_64
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-macOS-x86_64
path: CubeSQLPlugin/Build Resources/Mac x86-64
- name: Download Artifacts macOS-arm64
uses: actions/download-artifact@v4
with:
name: CubeSQLPlugin-macOS-arm64
path: CubeSQLPlugin/Build Resources/Mac arm64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin-Build-Resources
retention-days: 2
path: |
CubeSQLPlugin/Build Resources/
if-no-files-found: error
- name: Build CubeSQLPlugin.xojo_plugin
run: |
rm -r -f ./CubeSQLPlugin.xojo_plugin
zip -r ./CubeSQLPlugin.xojo_plugin ./CubeSQLPlugin
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CubeSQLPlugin
retention-days: 7
path: |
CubeSQLPlugin.xojo_plugin
if-no-files-found: error
- name: Commit and Push
if: "${{ inputs.do_commit_and_push == true }}"
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git pull
git add ./CubeSQLPlugin
git add ./CubeSQLPlugin.xojo_plugin
git commit -m "CubeSQLPlugin ${{ env.CUBESQLPLUGIN_VERSION }}"
git push