Skip to content

Commit 644f8be

Browse files
committed
Adjust GHA workflows to use installed Firebird and vcpkg client
1 parent 6b13f17 commit 644f8be

2 files changed

Lines changed: 156 additions & 32 deletions

File tree

.github/workflows/main.yml

Lines changed: 78 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ jobs:
5858
run: |
5959
sudo apt-get update
6060
sudo apt-get install --no-install-recommends -y \
61+
autoconf \
62+
autoconf-archive \
63+
automake \
64+
libtool \
65+
libtool-bin \
6166
doxygen \
6267
graphviz \
6368
ninja-build \
@@ -73,26 +78,41 @@ jobs:
7378
7479
- name: Configure Firebird
7580
run: |
76-
{
77-
echo "FIREBIRD=/opt/firebird"
78-
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
79-
echo "LD_LIBRARY_PATH=/opt/firebird/lib:${LD_LIBRARY_PATH}"
80-
} >> "$GITHUB_ENV"
81+
sudo systemctl stop firebird
82+
echo "alter user SYSDBA password 'masterkey';" | \
83+
sudo /opt/firebird/bin/isql employee -user SYSDBA -q
84+
sudo systemctl start firebird
8185
8286
- name: Bootstrap vcpkg
8387
run: |
8488
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
8589
8690
- name: Configure CMake
8791
run: |
88-
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
92+
./gen-linux-x64-release.sh
93+
94+
- name: Show vcpkg failure logs
95+
if: failure()
96+
shell: bash
97+
run: |
98+
echo "VCPKG failure detected. Dumping logs..."
99+
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
100+
while IFS= read -r -d '' file; do
101+
echo "::group::$file"
102+
cat "$file"
103+
echo "::endgroup::"
104+
done
89105
90106
- name: Build Release targets
91107
run: |
92108
cmake --build build/Release
93109
94110
- name: Run tests
95111
run: |
112+
export ISC_USER=sysdba
113+
export ISC_PASSWORD=masterkey
114+
export FBCPP_TEST_SERVER=localhost
115+
export FBCPP_TEST_DIR=/tmp
96116
./build/Release/out/bin/fb-cpp-test --log_level=all
97117
98118
- name: Build documentation
@@ -136,7 +156,14 @@ jobs:
136156
- name: Configure Firebird
137157
shell: cmd
138158
run: |
139-
echo C:\Firebird>>%GITHUB_PATH%
159+
echo create user SYSDBA password 'masterkey'; ^
160+
| "C:\Firebird\isql.exe" employee -user SYSDBA -q
161+
162+
- name: Start Firebird Server
163+
shell: cmd
164+
working-directory: C:\Firebird
165+
run: |
166+
call install_service.bat
140167
141168
- name: Bootstrap vcpkg
142169
shell: cmd
@@ -146,7 +173,18 @@ jobs:
146173
- name: Configure CMake
147174
shell: cmd
148175
run: |
149-
cmake -S . -B build -G "Visual Studio 17 2022"
176+
.\gen-windows.bat
177+
178+
- name: Show vcpkg failure logs
179+
if: failure()
180+
shell: pwsh
181+
run: |
182+
Write-Host "VCPKG failure detected. Dumping logs..."
183+
Get-ChildItem "vcpkg\buildtrees" -Recurse -Filter *.log | ForEach-Object {
184+
Write-Host "::group::$($_.FullName)"
185+
Get-Content $_.FullName
186+
Write-Host "::endgroup::"
187+
}
150188
151189
- name: Build Release targets
152190
shell: cmd
@@ -156,7 +194,10 @@ jobs:
156194
- name: Run tests
157195
shell: cmd
158196
run: |
159-
build\out\bin\Release\fb-cpp-test.exe
197+
set ISC_USER=sysdba
198+
set ISC_PASSWORD=masterkey
199+
set FBCPP_TEST_SERVER=localhost
200+
build\out\bin\Release\fb-cpp-test.exe --log_level=all
160201
161202
build-macos:
162203
runs-on: macos-latest
@@ -179,6 +220,14 @@ jobs:
179220
restore-keys: |
180221
${{ runner.os }}-vcpkg-
181222
223+
- name: Install system dependencies
224+
run: |
225+
brew install \
226+
autoconf \
227+
autoconf-archive \
228+
automake \
229+
libtool
230+
182231
- name: Install Firebird
183232
run: |
184233
wget -nv -O Firebird-5.0.3.1683-0-macos-arm64.pkg \
@@ -187,27 +236,40 @@ jobs:
187236
188237
- name: Configure Firebird
189238
run: |
190-
{
191-
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
192-
echo "DYLD_LIBRARY_PATH=/Library/Frameworks/Firebird.framework/Resources/lib:${DYLD_LIBRARY_PATH}"
193-
echo "ISC_USER=sysdba"
194-
echo "ISC_PASSWORD=masterkey"
195-
} >> "$GITHUB_ENV"
239+
sudo launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist
240+
echo "alter user SYSDBA password 'masterkey';" | \
241+
sudo /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/isql employee -user SYSDBA -q
242+
sudo launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
196243
197244
- name: Bootstrap vcpkg
198245
run: |
199246
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
200247
201248
- name: Configure CMake
202249
run: |
203-
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
250+
./gen-osx-arm64-release.sh
251+
252+
- name: Show vcpkg failure logs
253+
if: failure()
254+
shell: bash
255+
run: |
256+
echo "VCPKG failure detected. Dumping logs..."
257+
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
258+
while IFS= read -r -d '' file; do
259+
echo "::group::$file"
260+
cat "$file"
261+
echo "::endgroup::"
262+
done
204263
205264
- name: Build Release targets
206265
run: |
207266
cmake --build build/Release
208267
209268
- name: Run tests
210269
run: |
270+
export ISC_USER=sysdba
271+
export ISC_PASSWORD=masterkey
272+
export FBCPP_TEST_SERVER=localhost
211273
./build/Release/out/bin/fb-cpp-test --log_level=all
212274
213275
deploy-docs:

.github/workflows/pull-request.yml

Lines changed: 78 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
run: |
5050
sudo apt-get update
5151
sudo apt-get install --no-install-recommends -y \
52+
autoconf \
53+
autoconf-archive \
54+
automake \
55+
libtool \
56+
libtool-bin \
5257
doxygen \
5358
graphviz \
5459
ninja-build \
@@ -64,26 +69,41 @@ jobs:
6469
6570
- name: Configure Firebird
6671
run: |
67-
{
68-
echo "FIREBIRD=/opt/firebird"
69-
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
70-
echo "LD_LIBRARY_PATH=/opt/firebird/lib:${LD_LIBRARY_PATH}"
71-
} >> "$GITHUB_ENV"
72+
sudo systemctl stop firebird
73+
echo "alter user SYSDBA password 'masterkey';" | \
74+
sudo /opt/firebird/bin/isql employee -user SYSDBA -q
75+
sudo systemctl start firebird
7276
7377
- name: Bootstrap vcpkg
7478
run: |
7579
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
7680
7781
- name: Configure CMake
7882
run: |
79-
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
83+
./gen-linux-x64-release.sh
84+
85+
- name: Show vcpkg failure logs
86+
if: failure()
87+
shell: bash
88+
run: |
89+
echo "VCPKG failure detected. Dumping logs..."
90+
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
91+
while IFS= read -r -d '' file; do
92+
echo "::group::$file"
93+
cat "$file"
94+
echo "::endgroup::"
95+
done
8096
8197
- name: Build Release targets
8298
run: |
8399
cmake --build build/Release
84100
85101
- name: Run tests
86102
run: |
103+
export ISC_USER=sysdba
104+
export ISC_PASSWORD=masterkey
105+
export FBCPP_TEST_SERVER=localhost
106+
export FBCPP_TEST_DIR=/tmp
87107
./build/Release/out/bin/fb-cpp-test --log_level=all
88108
89109
- name: Build documentation
@@ -122,7 +142,14 @@ jobs:
122142
- name: Configure Firebird
123143
shell: cmd
124144
run: |
125-
echo C:\Firebird>>%GITHUB_PATH%
145+
echo create user SYSDBA password 'masterkey'; ^
146+
| "C:\Firebird\isql.exe" employee -user SYSDBA -q
147+
148+
- name: Start Firebird Server
149+
shell: cmd
150+
working-directory: C:\Firebird
151+
run: |
152+
call install_service.bat
126153
127154
- name: Bootstrap vcpkg
128155
shell: cmd
@@ -132,7 +159,18 @@ jobs:
132159
- name: Configure CMake
133160
shell: cmd
134161
run: |
135-
cmake -S . -B build -G "Visual Studio 17 2022"
162+
.\gen-windows.bat
163+
164+
- name: Show vcpkg failure logs
165+
if: failure()
166+
shell: pwsh
167+
run: |
168+
Write-Host "VCPKG failure detected. Dumping logs..."
169+
Get-ChildItem "vcpkg\buildtrees" -Recurse -Filter *.log | ForEach-Object {
170+
Write-Host "::group::$($_.FullName)"
171+
Get-Content $_.FullName
172+
Write-Host "::endgroup::"
173+
}
136174
137175
- name: Build Release targets
138176
shell: cmd
@@ -142,7 +180,10 @@ jobs:
142180
- name: Run tests
143181
shell: cmd
144182
run: |
145-
build\out\bin\Release\fb-cpp-test.exe
183+
set ISC_USER=sysdba
184+
set ISC_PASSWORD=masterkey
185+
set FBCPP_TEST_SERVER=localhost
186+
build\out\bin\Release\fb-cpp-test.exe --log_level=all
146187
147188
build-macos:
148189
runs-on: macos-latest
@@ -165,6 +206,14 @@ jobs:
165206
restore-keys: |
166207
${{ runner.os }}-vcpkg-
167208
209+
- name: Install system dependencies
210+
run: |
211+
brew install \
212+
autoconf \
213+
autoconf-archive \
214+
automake \
215+
libtool
216+
168217
- name: Install Firebird
169218
run: |
170219
wget -nv -O Firebird-5.0.3.1683-0-macos-arm64.pkg \
@@ -173,25 +222,38 @@ jobs:
173222
174223
- name: Configure Firebird
175224
run: |
176-
{
177-
echo "FIREBIRD_LOCK=${RUNNER_TEMP}"
178-
echo "DYLD_LIBRARY_PATH=/Library/Frameworks/Firebird.framework/Resources/lib:${DYLD_LIBRARY_PATH}"
179-
echo "ISC_USER=sysdba"
180-
echo "ISC_PASSWORD=masterkey"
181-
} >> "$GITHUB_ENV"
225+
sudo launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist
226+
echo "alter user SYSDBA password 'masterkey';" | \
227+
sudo /Library/Frameworks/Firebird.framework/Versions/A/Resources/bin/isql employee -user SYSDBA -q
228+
sudo launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
182229
183230
- name: Bootstrap vcpkg
184231
run: |
185232
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
186233
187234
- name: Configure CMake
188235
run: |
189-
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release -G Ninja
236+
./gen-osx-arm64-release.sh
237+
238+
- name: Show vcpkg failure logs
239+
if: failure()
240+
shell: bash
241+
run: |
242+
echo "VCPKG failure detected. Dumping logs..."
243+
find "vcpkg/buildtrees" -type f -name '*.log' -print0 | \
244+
while IFS= read -r -d '' file; do
245+
echo "::group::$file"
246+
cat "$file"
247+
echo "::endgroup::"
248+
done
190249
191250
- name: Build Release targets
192251
run: |
193252
cmake --build build/Release
194253
195254
- name: Run tests
196255
run: |
256+
export ISC_USER=sysdba
257+
export ISC_PASSWORD=masterkey
258+
export FBCPP_TEST_SERVER=localhost
197259
./build/Release/out/bin/fb-cpp-test --log_level=all

0 commit comments

Comments
 (0)