-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (76 loc) · 2.1 KB
/
build.yml
File metadata and controls
92 lines (76 loc) · 2.1 KB
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
name: Build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
env:
FPC_VER: release_3_2_2
LAZ_VER: lazarus_2_2_4
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: Windows 64
os: windows-latest
build-mode: WIN64
binary: libsimpleocr64.dll
- name: Windows 32
os: windows-latest
build-mode: WIN32
binary: libsimpleocr32.dll
- name: Linux 64
os: ubuntu-latest
build-mode: LINUX64
binary: libsimpleocr64.so
- name: Linux AArch64
os: ubuntu-latest
build-mode: LINUX-AARCH64
binary: libsimpleocr64.so.aarch64
- name: MacOS 64
os: macos-latest
build-mode: MACOS
binary: libsimpleocr64.dylib
- name: MacOS AArch64
os: macos-latest
build-mode: MACOS-AARCH64
binary: libsimpleocr64.dylib.aarch64
steps:
- uses: actions/checkout@v3.5.3
- name: Install Lazarus
uses: ollydev/setup-lazarus-fpcup@v3.3
with:
laz: ${{ env.LAZ_VER }}
fpc: ${{ env.FPC_VER }}
- name: Build SimpleOCR
run: |
lazbuild --build-mode=${{ matrix.config.build-mode }} SimpleOCR.lpi
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.binary }}
path: ${{ matrix.config.binary }}
testing:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v3.5.3
- name: Install Lazarus
uses: ollydev/setup-lazarus-fpcup@v3.3
with:
laz: ${{ env.LAZ_VER }}
fpc: ${{ env.FPC_VER }}
- name: Build Tester
run: |
cd tester
lazbuild tester.lpi
- name: Run Tests
run: |
cd tester
./tester.exe