forked from jinlife/Synology_Photos_Face_Patch
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 2.17 KB
/
ci_SynoSDK.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
name: CI SynoSDK
on:
workflow_dispatch:
jobs:
build:
runs-on: jinlife-ubuntu-18.04
env:
SYNO_MAIN_VERSION: 7.1.1
SYNO_VERSION: 42962
steps:
- name: Clean folder
run: |
sudo rm -rf *
- name: Check out the repo
uses: actions/checkout@v3
with:
ref: main
path: './repo'
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: x64
- name: Compile
working-directory: ./repo/src
run: |
gcc -s -fPIC -shared -o prelibsynophoto.so prelibsynophoto.c
gcc -s -fPIC -shared -o prelibsynosdk.so prelibsynosdk.c
strip -s prelibsynophoto.so
strip -s prelibsynosdk.so
mv prelibsynophoto.so x86/prelibsynophoto.so
mv prelibsynosdk.so x86/prelibsynosdk.so
cd ../../
cp -r ./repo ./repoPatch
- name: Patch
run: |
cd repoPatch
sudo chmod -R 777 ./
cd lazy
sudo ./auto_patch_SynoSDK.sh "${SYNO_MAIN_VERSION}" "${SYNO_VERSION}"
cd ../../
sudo cp -v ./repoPatch/libsynosdk.so.7 ./repo/libsynosdk.so.7
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update Synology V${{env.SYNO_VERSION}}"
repository: './repo'
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: PreloadLibrary
path: ./repo/src/x86/*.so
if-no-files-found: error
- name: Delete old workflow
uses: Mattraks/delete-workflow-runs@v2
with:
retain_days: 1
keep_minimum_runs: 3
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
body: "Synology V${{ env.SYNO_VERSION }} only"
name: "Patch SYNO V${{ env.SYNO_VERSION }}"
tag_name: "${{ env.SYNO_VERSION }}"
files: |
./repo/libsynosdk.so.7