forked from PascalGameDevelopment/SDL2-for-Pascal
-
Notifications
You must be signed in to change notification settings - Fork 0
178 lines (176 loc) · 5.12 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: CI
on:
push:
branches: [ master, new-tests ]
pull_request:
branches: [ master ]
jobs:
macos-11-big-sur:
# skip job temporarily
if: false
runs-on: macos-11
steps:
- name: Install FPC
run: |
brew update
brew install fpc
- name: Checkout code
uses: actions/checkout@v2
- name: Compile SDL2 unit
uses: suve/[email protected]
with:
source: units/sdl2.pas
verbosity: ewnh
- name: Compile SDL2_gfx unit
uses: suve/[email protected]
with:
source: units/sdl2_gfx.pas
verbosity: ewnh
- name: Compile SDL2_image unit
uses: suve/[email protected]
with:
source: units/sdl2_image.pas
verbosity: ewnh
- name: Compile SDL2_mixer unit
uses: suve/[email protected]
with:
source: units/sdl2_mixer.pas
verbosity: ewnh
- name: Compile SDL2_net unit
uses: suve/[email protected]
with:
source: units/sdl2_net.pas
verbosity: ewnh
- name: Compile SDL2_ttf unit
uses: suve/[email protected]
with:
source: units/sdl2_ttf.pas
verbosity: ewnh
- name: Install SDL2 library
run: brew install sdl2
- name: Get SDL2 library version and path(s)
run: |
sdl2-config --version
sdl2-config --libs
- name: Test 1 - Compile Init Test
uses: suve/[email protected]
with:
source: tests/testinit.pas
flags: Fl/usr/local/lib
verbosity: ewnh
- name: Test 1 - Run Init Test
run: |
./tests/testinit
- name: Test 2 - Compile Version Test
uses: suve/[email protected]
with:
source: tests/testversion.pas
flags: Fl/usr/local/lib
verbosity: ewnh
- name: Test 2 - Run Version Test
run: |
./tests/testversion
ubuntu-20-04:
runs-on: ubuntu-20.04
steps:
- name: Install FPC
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt update
sudo apt install fpc
- name: Checkout code
uses: actions/checkout@v4
with:
ref: new-tests
- name: Compile SDL2 unit
uses: suve/[email protected]
with:
source: units/sdl2.pas
verbosity: ewnh
- name: Compile SDL2_gfx unit
uses: suve/[email protected]
with:
source: units/sdl2_gfx.pas
verbosity: ewnh
- name: Compile SDL2_image unit
uses: suve/[email protected]
with:
source: units/sdl2_image.pas
verbosity: ewnh
- name: Compile SDL2_mixer unit
uses: suve/[email protected]
with:
source: units/sdl2_mixer.pas
verbosity: ewnh
- name: Compile SDL2_net unit
uses: suve/[email protected]
with:
source: units/sdl2_net.pas
verbosity: ewnh
- name: Compile SDL2_ttf unit
uses: suve/[email protected]
with:
source: units/sdl2_ttf.pas
verbosity: ewnh
- name: Install SDL2 library
run: sudo apt-get install libsdl2-dev
- name: Compile SDL2-for-Pascal Test Framework and Tests
uses: suve/[email protected]
with:
source: tests/sdl2forpascaltests.pas
flags: Fuunits Futests/fptest/src Futests/fptest/3rdparty/epiktimer
verbosity: ewnh
- name: Run SDL2-for-Pascal Tests
run: |
./tests/sdl2forpascaltests
windows-2022:
# skip job temporarily
if: false
runs-on: windows-2022
steps:
- name: Install Lazarus
run: |
choco install lazarus
- name: Checkout code
uses: actions/checkout@v2
- name: Compile SDL2 unit
uses: suve/[email protected]
with:
source: units/sdl2.pas
verbosity: ewnh
- name: Compile SDL2_gfx unit
uses: suve/[email protected]
with:
source: units/sdl2_gfx.pas
verbosity: ewnh
- name: Compile SDL2_image unit
uses: suve/[email protected]
with:
source: units/sdl2_image.pas
verbosity: ewnh
- name: Compile SDL2_mixer unit
uses: suve/[email protected]
with:
source: units/sdl2_mixer.pas
verbosity: ewnh
- name: Compile SDL2_net unit
uses: suve/[email protected]
with:
source: units/sdl2_net.pas
verbosity: ewnh
- name: Compile SDL2_ttf unit
uses: suve/[email protected]
with:
source: units/sdl2_ttf.pas
verbosity: ewnh
- name: Test 1 - Compile Init Test
uses: suve/[email protected]
with:
source: tests/testinit.pas
flags: Flunits
verbosity: ewnh
# !!! Since no SDL2.DLL is available via chocolatey, the run will fail.
# TODO: Find solution to install SDL2 binary.
# - name: Test 1 - Run Init Test
# run: |
# ./tests/testinit.exe