1
- name : Build
1
+ name : build
2
2
3
3
on :
4
4
push :
7
7
pull_request :
8
8
branches :
9
9
- ' **'
10
-
11
- env :
12
- FPC_VER : release_3_2_2
13
- LAZ_VER : lazarus_2_2_4
14
10
15
11
jobs :
16
12
build :
17
13
name : ${{ matrix.config.name }}
18
- runs-on : ${{ matrix.config.os }}
14
+ runs-on : ${{ matrix.config.runs-on }}
15
+ defaults :
16
+ run :
17
+ shell : bash
19
18
strategy :
20
19
fail-fast : false
21
- matrix :
22
- config :
20
+ matrix :
21
+ config :
23
22
- name : Windows 64
24
- os : windows-latest
23
+ runs-on : windows-latest
25
24
build-mode : WIN64
26
25
binary : libsimpleocr64.dll
27
26
28
27
- name : Windows 32
29
- os : windows-latest
28
+ runs-on : windows-latest
30
29
build-mode : WIN32
31
30
binary : libsimpleocr32.dll
32
31
33
32
- name : Linux 64
34
- os : ubuntu-latest
33
+ runs-on : ubuntu-22.04
35
34
build-mode : LINUX64
36
35
binary : libsimpleocr64.so
37
-
38
- - name : Linux AArch64
39
- os : ubuntu-latest
40
- build-mode : LINUX-AARCH64
41
- binary : libsimpleocr64.so.aarch64
42
36
43
37
- name : MacOS 64
44
- os : macos-latest
38
+ runs-on : macos-13
45
39
build-mode : MACOS
46
40
binary : libsimpleocr64.dylib
47
41
48
42
- name : MacOS AArch64
49
- os : macos-latest
43
+ runs-on : macos-13
50
44
build-mode : MACOS-AARCH64
51
45
binary : libsimpleocr64.dylib.aarch64
52
46
53
47
steps :
54
-
55
-
56
- - name : Install Lazarus
57
-
48
+
49
+ with :
50
+ submodules : true
51
+
52
+ - name : Install Lazarus (MacOS)
53
+ if : startsWith(matrix.config.name, 'MacOS') == true
54
+
58
55
with :
59
- laz : ${{ env.LAZ_VER }}
60
- fpc : ${{ env.FPC_VER }}
61
-
62
- - name : Build SimpleOCR
63
- run : |
64
- lazbuild --build-mode=${{ matrix.config.build-mode }} SimpleOCR.lpi
56
+ laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%203.6/Lazarus-3.6-macosx-x86_64.pkg
57
+ fpc-url : |
58
+ https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%203.6/fpc-3.2.2.intelarm64-macosx.dmg
59
+ https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%203.6/fpc-src-3.2.2-20210709-macosx.dmg
65
60
66
- - name : Upload Binary
67
-
61
+ - name : Install Lazarus (Linux)
62
+ if : startsWith(matrix.config.name, 'Linux') == true
63
+
68
64
with :
69
- name : ${{ matrix.config.binary }}
70
- path : ${{ matrix.config.binary }}
65
+ laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%203.6/lazarus-project_3.6.0-0_amd64.deb
66
+ fpc-url : |
67
+ https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%203.6/fpc-laz_3.2.2-210709_amd64.deb
68
+ https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%203.6/fpc-src_3.2.2-210709_amd64.deb
71
69
72
- testing :
73
- runs-on : windows-latest
74
- needs : build
75
- steps :
76
-
70
+ - name : Install Lazarus (Windows 32)
71
+ if : startsWith(matrix.config.name, 'Windows 32') == true
72
+
73
+ with :
74
+ laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%203.6/lazarus-3.6-fpc-3.2.2-win32.exe
77
75
78
- - name : Install Lazarus
79
-
76
+ - name : Install Lazarus (Windows 64)
77
+ if : startsWith(matrix.config.name, 'Windows 64') == true
78
+
80
79
with :
81
- laz : ${{ env.LAZ_VER }}
82
- fpc : ${{ env.FPC_VER }}
80
+ laz-url : https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%203.6/lazarus-3.6-fpc-3.2.2-win64.exe
81
+
82
+ - name : Build SimpleOCR
83
+ run : lazbuild --build-mode=${{ matrix.config.build-mode }} SimpleOCR.lpi
83
84
84
85
- name : Build Tester
85
- run : |
86
- cd tester
87
- lazbuild tester.lpi
86
+ working-directory : tester
87
+ run : lazbuild tester.lpi
88
88
89
89
- name : Run Tests
90
- run : |
91
- cd tester
92
- ./tester.exe
90
+ working-directory : tester
91
+ run : ./tester
92
+
93
+ - name : Upload Binary
94
+
95
+ with :
96
+ name : ${{ matrix.config.binary }}
97
+ path : ${{ matrix.config.binary }}
0 commit comments