-
-
Notifications
You must be signed in to change notification settings - Fork 26
81 lines (72 loc) · 2.22 KB
/
ci.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
81
name: CI
on:
# on each push and manual trigger
push:
branches: [ master ]
paths-ignore: [ "**/Readme.md" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
# currently stable="Lazarus 3.0 / FPC 3.2.2" with [email protected]
lazarus-versions: [stable]
steps:
- uses: actions/checkout@v4
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: ${{ matrix.lazarus-versions }}
- name: Print info
shell: bash
run: |
echo "Lazarus:" $(lazbuild --version)
echo "FPC:" $(fpc -iWTPTO)
echo "OS:" $(uname -a)
- name: Build Deskew CLI
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
lazbuild --build-mode=Release-macOS "deskew.lpi"
else
lazbuild --build-mode=Release "deskew.lpi"
fi
- name: Build Deskew GUI
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
lazbuild --build-mode=Release-macOS "Gui/deskewgui.lpi"
else
lazbuild --build-mode=Release "Gui/deskewgui.lpi"
fi
- name: List Bin directory
shell: bash
run: ls Bin
- name: Run tests
shell: bash
run: |
cd Bin
if [ "$RUNNER_OS" == "Linux" ]; then
./runtests.sh
elif [ "$RUNNER_OS" == "Windows" ]; then
./RunTests.bat
elif [ "$RUNNER_OS" == "macOS" ]; then
./runtests.sh deskew-mac --no-tiff
fi
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: deskew-binaries-${{ matrix.operating-system }}
path: |
Bin/deskew*
if-no-files-found: error
- name: Upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: deskew-artifacts-${{ matrix.operating-system }}
path: |
Bin
if-no-files-found: error