-
-
Notifications
You must be signed in to change notification settings - Fork 3
259 lines (224 loc) · 7.42 KB
/
Copy pathpull-request.yml
File metadata and controls
259 lines (224 loc) · 7.42 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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: Pull Request
on:
pull_request:
branches:
- main
jobs:
clang-format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Check clang-format
run: |
./check-format.sh
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
autoconf \
autoconf-archive \
automake \
libtool \
libtool-bin \
doxygen \
graphviz \
ninja-build \
libtommath1 \
libtomcrypt1
- name: Install Firebird
run: |
wget -nv -O Firebird-5.0.3.1683-0-linux-x64.tar.gz \
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/Firebird-5.0.3.1683-0-linux-x64.tar.gz"
tar xzf Firebird-5.0.3.1683-0-linux-x64.tar.gz
(cd Firebird-5.0.3.1683-0-linux-x64 && sudo ./install.sh -silent)
- name: Configure Firebird
run: |
sudo systemctl stop firebird
echo "alter user SYSDBA password 'masterkey';" | \
sudo /opt/firebird/bin/isql employee -user SYSDBA -q
sudo systemctl start firebird
- name: Bootstrap vcpkg
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure CMake
run: |
./gen-linux-x64-release.sh
- name: Show vcpkg failure logs
if: failure()
shell: bash
run: |
echo "VCPKG failure detected. Dumping logs..."
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
while IFS= read -r -d '' file; do
echo "::group::$file"
cat "$file"
echo "::endgroup::"
done
- name: Build Release targets
run: |
cmake --build build/Release
- name: Run tests
run: |
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
export FBCPP_TEST_DIR=/tmp
./build/Release/out/bin/fb-cpp-test --log_level=all
- name: Build documentation
run: |
cmake --build build/Release --target docs
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install Firebird
shell: cmd
run: |
set FB_ZIP=Firebird-5.0.3.1683-0-windows-x64.zip
powershell Invoke-WebRequest ^
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/$env:FB_ZIP" -OutFile "$env:FB_ZIP"
7z x -oC:\Firebird %FB_ZIP%
- name: Configure Firebird
shell: cmd
run: |
echo create user SYSDBA password 'masterkey'; ^
| "C:\Firebird\isql.exe" employee -user SYSDBA -q
- name: Start Firebird Server
shell: cmd
working-directory: C:\Firebird
run: |
call install_service.bat
- name: Bootstrap vcpkg
shell: cmd
run: |
vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Configure CMake
shell: cmd
run: |
.\gen-windows.bat
- name: Show vcpkg failure logs
if: failure()
shell: pwsh
run: |
Write-Host "VCPKG failure detected. Dumping logs..."
Get-ChildItem "vcpkg\buildtrees" -Recurse -Filter *.log | ForEach-Object {
Write-Host "::group::$($_.FullName)"
Get-Content $_.FullName
Write-Host "::endgroup::"
}
- name: Build Release targets
shell: cmd
run: |
cmake --build build --config Release
- name: Run tests
shell: cmd
run: |
set ISC_USER=sysdba
set ISC_PASSWORD=masterkey
set FBCPP_TEST_SERVER=localhost
build\out\bin\Release\fb-cpp-test.exe --log_level=all
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
path: |
vcpkg/downloads
vcpkg/buildtrees
vcpkg/packages
build/Release/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install system dependencies
run: |
brew install \
autoconf \
autoconf-archive \
automake \
libtool
- name: Install Firebird
run: |
wget -nv -O Firebird-5.0.3.1683-0-macos-arm64.pkg \
"https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/Firebird-5.0.3.1683-0-macos-arm64.pkg"
sudo installer -verbose -pkg Firebird-5.0.3.1683-0-macos-arm64.pkg -target /
- name: Configure Firebird
run: |
sudo launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist
echo "alter user SYSDBA password 'masterkey';" | \
sudo /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/isql employee -user SYSDBA -q
sudo launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
- name: Bootstrap vcpkg
run: |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure CMake
run: |
./gen-osx-arm64-release.sh
- name: Show vcpkg failure logs
if: failure()
shell: bash
run: |
echo "VCPKG failure detected. Dumping logs..."
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
while IFS= read -r -d '' file; do
echo "::group::$file"
cat "$file"
echo "::endgroup::"
done
- name: Build Release targets
run: |
cmake --build build/Release
- name: Run tests
run: |
export ISC_USER=sysdba
export ISC_PASSWORD=masterkey
export FBCPP_TEST_SERVER=localhost
./build/Release/out/bin/fb-cpp-test --log_level=all