Skip to content

Commit 0a667bc

Browse files
ci(release): <ta phrase courte ici> (#233)
1 parent 9a08b05 commit 0a667bc

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,18 @@ jobs:
246246
shell: bash
247247
run: |
248248
set -euxo pipefail
249-
cmake --build build -j 2>&1 | tee build_output.log
249+
: > build_output.log
250+
cmake --build build -j 2>&1 | tee -a build_output.log
251+
252+
- name: Collect logs (post-build) (Unix)
253+
if: always() && runner.os != 'Windows'
254+
shell: bash
255+
run: |
256+
set -euxo pipefail
257+
OUT="logs/${{ matrix.vixos }}-${{ matrix.arch }}"
258+
mkdir -p "$OUT"
259+
test -f build_output.log && cp -f build_output.log "$OUT/" || true
260+
find logs -type f -maxdepth 3 -print || true
250261
251262
# -------------------------
252263
# Configure + Build (Windows)
@@ -255,6 +266,8 @@ jobs:
255266
if: runner.os == 'Windows'
256267
shell: pwsh
257268
run: |
269+
"" | Out-File -FilePath cmake_output.log -Encoding utf8
270+
258271
$openssl = (Get-ChildItem "C:\Program Files" -Directory -ErrorAction SilentlyContinue |
259272
Where-Object { $_.Name -like "OpenSSL-*" } | Select-Object -First 1).FullName
260273
if (-not $openssl) { $openssl = "C:\Program Files\OpenSSL-Win64" }
@@ -265,15 +278,27 @@ jobs:
265278
-DVIX_DB_USE_MYSQL=OFF `
266279
-DVIX_CORE_WITH_MYSQL=OFF `
267280
-DVIX_ENABLE_HTTP_COMPRESSION=OFF `
268-
-DOPENSSL_ROOT_DIR="$openssl" 2>&1 | Tee-Object -FilePath cmake_output.log
281+
-DOPENSSL_ROOT_DIR="$openssl" 2>&1 | Tee-Object -FilePath cmake_output.log -Append
282+
283+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
269284
270285
- name: Build (Windows)
271286
if: runner.os == 'Windows'
272287
shell: pwsh
273288
run: |
274-
cmake --build build --config Release 2>&1 | Tee-Object -FilePath build_output.log
289+
"" | Out-File -FilePath build_output.log -Encoding utf8
290+
cmake --build build --config Release 2>&1 | Tee-Object -FilePath build_output.log -Append
275291
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
276292
293+
- name: Collect logs (post-build) (Windows)
294+
if: always() && runner.os == 'Windows'
295+
shell: pwsh
296+
run: |
297+
$out = "logs/${{ matrix.vixos }}-${{ matrix.arch }}"
298+
New-Item -ItemType Directory -Force -Path $out | Out-Null
299+
if (Test-Path "cmake_output.log") { Copy-Item "cmake_output.log" $out -Force }
300+
if (Test-Path "build_output.log") { Copy-Item "build_output.log" $out -Force }
301+
277302
# -------------------------
278303
# Package artifact
279304
# -------------------------

0 commit comments

Comments
 (0)