This repository was archived by the owner on Jan 2, 2025. It is now read-only.
File tree 2 files changed +57
-0
lines changed
2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Go Build for Windows and Linux
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+
9
+ jobs :
10
+ build-windows :
11
+ runs-on : windows-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v4
18
+ with :
19
+ go-version : ' 1.21'
20
+
21
+ - name : Build Go shared library (.dll)
22
+ run : |
23
+ cd go_spammer
24
+ go build -o ../shared/spammer.dll -buildmode=c-shared main.go
25
+
26
+ - name : Upload DLL artifact
27
+ uses : actions/upload-artifact@v3
28
+ with :
29
+ name : spammer-dll
30
+ path : ./shared/spammer.dll
31
+
32
+ build-linux :
33
+ runs-on : ubuntu-latest
34
+ steps :
35
+ - name : Checkout code
36
+ uses : actions/checkout@v3
37
+
38
+ - name : Set up Go
39
+ uses : actions/setup-go@v4
40
+ with :
41
+ go-version : ' 1.21'
42
+
43
+ - name : Install GCC
44
+ run : |
45
+ sudo apt-get update
46
+ sudo apt-get install -y build-essential # نصب GCC و ابزارهای ضروری برای بیلد
47
+
48
+ - name : Build Go shared library (.so)
49
+ run : |
50
+ cd go_spammer # به پوشهی go_spammer بروید
51
+ go build -o ../shared/spammer.so -buildmode=c-shared main.go # بیلد کتابخانه بهصورت shared برای لینوکس
52
+
53
+ - name : Upload SO artifact
54
+ uses : actions/upload-artifact@v3
55
+ with :
56
+ name : spammer-so
57
+ path : ./shared/spammer.so
You can’t perform that action at this time.
0 commit comments