Skip to content

Commit 4ae0072

Browse files
committed
Renamed steps to include architecture name.
Split mac/linux build and test steps (like Windows). Removed Windows dead wood.
1 parent 085df21 commit 4ae0072

1 file changed

Lines changed: 70 additions & 174 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 70 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
# LLDASH_LOGGING: 1
2828

2929
jobs:
30-
linux-build:
30+
linux-intel-build:
3131
runs-on: ubuntu-latest
3232
env:
3333
VCPKG_DEFAULT_TRIPLET: x64-linux-dynamic
@@ -96,15 +96,15 @@ jobs:
9696
if: ${{ failure() }}
9797
uses: actions/upload-artifact@v4
9898
with:
99-
name: linux-buildtrees
99+
name: linux-intel-buildtrees
100100
path: ./vcpkg/buildtrees
101101
retention-days: 5
102102

103103
- name: Upload cmake build folder in case of failure
104104
if: ${{ failure() }}
105105
uses: actions/upload-artifact@v4
106106
with:
107-
name: linux-build-folder
107+
name: linux-intel-build-folder
108108
path: ./build
109109
retention-days: 5
110110

@@ -114,6 +114,24 @@ jobs:
114114
name: lldash-linux-x86_64
115115
path: build/package/lldash-*.tar.gz
116116

117+
linux-intel-test:
118+
runs-on: ubuntu-latest
119+
needs:
120+
- linux-intel-build
121+
steps:
122+
- name: Download intel linux package
123+
uses: actions/download-artifact@v4
124+
with:
125+
name: lldash-linux-x86_64
126+
path: ${{ github.workspace }}
127+
128+
- name: Install lldash
129+
shell: bash
130+
run: |
131+
tar xfv lldash-linux-*.tar.gz
132+
mv lldash-linux-*/ installed
133+
ls -l
134+
117135
- name: Install cwipc and other pipeline test dependencies
118136
run: |
119137
cmake --install build
@@ -134,7 +152,7 @@ jobs:
134152
path: ${{ env.BUILD_DIR }}/logs/**/*
135153
retention-days: 5
136154

137-
macos-build:
155+
macos-arm64-build:
138156
runs-on: macos-latest
139157
env:
140158
VCPKG_DEFAULT_TRIPLET: arm64-osx-dynamic
@@ -218,7 +236,25 @@ jobs:
218236
with:
219237
name: lldash-mac-arm64
220238
path: build/package/lldash-*.tar.gz
221-
239+
240+
macos-arm64-test:
241+
runs-on: macos-latest
242+
needs:
243+
- macos-arm64-build
244+
steps:
245+
- name: Download arm64 mac package
246+
uses: actions/download-artifact@v4
247+
with:
248+
name: lldash-mac-arm64
249+
path: ${{ github.workspace }}
250+
251+
- name: Install lldash
252+
shell: bash
253+
run: |
254+
tar xfv lldash-mac-*.tar.gz
255+
mv lldash-mac-*/ installed
256+
ls -l
257+
222258
- name: Install cwipc and other pipeline test dependencies
223259
run: |
224260
cmake --install build
@@ -236,7 +272,7 @@ jobs:
236272
if: always() # Upload logs even if the test fails for debug purposes
237273
uses: actions/upload-artifact@v4
238274
with:
239-
name: mac-test-logs
275+
name: mac-arm64-test-logs
240276
path: ${{ env.BUILD_DIR }}/logs/**/*
241277
retention-days: 5
242278

@@ -325,6 +361,23 @@ jobs:
325361
name: lldash-mac-x86_64
326362
path: build/package/lldash-*.tar.gz
327363

364+
macos-intel-test:
365+
runs-on: macos-15-intel
366+
needs:
367+
- macos-intel-build
368+
steps:
369+
- name: Download intel mac package
370+
uses: actions/download-artifact@v4
371+
with:
372+
name: lldash-mac-x86_64
373+
path: ${{ github.workspace }}
374+
375+
- name: Install lldash
376+
shell: bash
377+
run: |
378+
tar xfv lldash-mac-*.tar.gz
379+
mv lldash-mac-*/ installed
380+
ls -l
328381
- name: Install cwipc and other pipeline test dependencies
329382
run: |
330383
cmake --install build
@@ -350,7 +403,7 @@ jobs:
350403
macos-universal-build:
351404
runs-on: macos-latest
352405
needs:
353-
- macos-build
406+
- macos-arm64-build
354407
- macos-intel-build
355408
steps:
356409
- name: Checkout code
@@ -399,7 +452,7 @@ jobs:
399452
name: lldash-mac-universal
400453
path: ${{ github.workspace }}/Assets/lldash-*.tar.gz
401454

402-
windows-build:
455+
windows-intel-build:
403456
runs-on: windows-latest
404457
env:
405458
VCPKG_DEFAULT_TRIPLET: x64-mingw-dynamic
@@ -488,167 +541,10 @@ jobs:
488541
if: ${{ failure() }}
489542
uses: actions/upload-artifact@v4
490543
with:
491-
name: windows-build-folder
544+
name: windows-intel-build-folder
492545
path: ./build
493546
retention-days: 5
494547

495-
# xxxjack I wonder why this is needed: exactly this same logic should be included in the CMake install process...
496-
# xxxjack unless I am mistaken and forgot to copy it over from cwipc....
497-
# xxxjack anyway, this should be done in cmake.
498-
- name: Analyze library dependencies and fix paths
499-
if: false
500-
shell: pwsh
501-
run: |
502-
Write-Host "===== ANALYZING LIBRARY DEPENDENCIES =====" -ForegroundColor Cyan
503-
504-
# Function to analyze DLL dependencies
505-
function Get-DllDependencies {
506-
param(
507-
[Parameter(Mandatory=$true)]
508-
[string]$FilePath
509-
)
510-
511-
if (-not (Test-Path $FilePath)) {
512-
Write-Host "File not found: $FilePath" -ForegroundColor Red
513-
return
514-
}
515-
516-
Write-Host "Analyzing dependencies for: $FilePath" -ForegroundColor Yellow
517-
518-
# Use objdump from MSYS2/MinGW to list dependencies
519-
$output = & "C:\msys64\mingw64\bin\objdump.exe" -p $FilePath | Select-String "DLL Name"
520-
521-
$missingDeps = @()
522-
Write-Host "Dependencies:" -ForegroundColor Green
523-
$output | ForEach-Object {
524-
$dllName = $_.ToString().Trim() -replace "DLL Name: ", ""
525-
Write-Host " - $dllName"
526-
527-
# Skip Windows system DLLs
528-
if ($dllName -match "^(ntdll|KERNEL32|KERNELBASE|msvcrt|bcrypt|ADVAPI32|RPCRT4|CRYPT32|ucrtbase|WS2_32|USER32|GDI32|ole32|SHELL32|SHLWAPI)\.dll$") {
529-
Write-Host " 🔵 System DLL" -ForegroundColor Blue
530-
return
531-
}
532-
533-
# Try to locate each dependency
534-
$found = $false
535-
$searchPaths = @(
536-
"${{ github.workspace }}\build\bin",
537-
"${{ github.workspace }}\build\vcpkg_installed\x64-mingw-dynamic\bin",
538-
"${{ github.workspace }}\build\vcpkg_installed\x64-mingw-dynamic\lib",
539-
"C:\msys64\mingw64\bin"
540-
)
541-
542-
$foundPath = ""
543-
foreach ($path in $searchPaths) {
544-
$fullPath = Join-Path $path $dllName
545-
if (Test-Path $fullPath) {
546-
$foundPath = $fullPath
547-
$found = $true
548-
Write-Host " ✅ Found at: $fullPath" -ForegroundColor Green
549-
break
550-
}
551-
}
552-
553-
if (-not $found) {
554-
Write-Host " ❌ NOT FOUND in search paths" -ForegroundColor Red
555-
$missingDeps += $dllName
556-
} else {
557-
# Copy dependency to build/bin to ensure it's available
558-
$targetPath = Join-Path "${{ github.workspace }}\build\bin" $dllName
559-
if ((-not (Test-Path $targetPath)) -and $foundPath -ne $targetPath) {
560-
Copy-Item $foundPath $targetPath
561-
Write-Host " 📋 Copied to build/bin directory" -ForegroundColor Cyan
562-
}
563-
}
564-
}
565-
566-
return $missingDeps
567-
}
568-
569-
# Collect all missing dependencies
570-
$missingDependencies = @()
571-
572-
# Check key libraries
573-
$libraries = @(
574-
"${{ github.workspace }}\build\bin\bin2dash.so",
575-
"${{ github.workspace }}\build\bin\signals-unity-bridge.so"
576-
)
577-
578-
foreach ($lib in $libraries) {
579-
$missingDeps = Get-DllDependencies -FilePath $lib
580-
$missingDependencies += $missingDeps
581-
Write-Host ""
582-
}
583-
584-
# Analyze missing dependencies (if any)
585-
if ($missingDependencies.Count -gt 0) {
586-
Write-Host "⚠️ Missing dependencies:" -ForegroundColor Yellow
587-
$missingDependencies | Sort-Object -Unique | ForEach-Object {
588-
Write-Host " - $_" -ForegroundColor Red
589-
}
590-
591-
# Search for missing dependencies in the MSYS2 environment
592-
Write-Host "Searching MSYS2 for missing packages..." -ForegroundColor Cyan
593-
foreach ($dep in ($missingDependencies | Sort-Object -Unique)) {
594-
$output = & "C:\msys64\usr\bin\pacman.exe" -Fy $dep 2>$null
595-
if ($output) {
596-
Write-Host "Found package for $dep in pacman database" -ForegroundColor Green
597-
$output | Out-String | Write-Host
598-
}
599-
}
600-
} else {
601-
Write-Host "✅ All dependencies found!" -ForegroundColor Green
602-
}
603-
604-
# Copy required MSYS2 runtime DLLs to ensure they're available
605-
Write-Host "Copying MSYS2 runtime libraries to build/bin..." -ForegroundColor Cyan
606-
$msys2RuntimeDlls = @(
607-
"libgcc_s_seh-1.dll",
608-
"libwinpthread-1.dll",
609-
"libstdc++-6.dll"
610-
)
611-
612-
foreach ($dll in $msys2RuntimeDlls) {
613-
$sourcePath = "C:\msys64\mingw64\bin\$dll"
614-
$targetPath = "${{ github.workspace }}\build\bin\$dll"
615-
616-
if (Test-Path $sourcePath) {
617-
Copy-Item -Path $sourcePath -Destination $targetPath -Force
618-
Write-Host "Copied $dll to build/bin" -ForegroundColor Green
619-
} else {
620-
Write-Host "⚠️ Could not find $dll in MSYS2" -ForegroundColor Yellow
621-
}
622-
}
623-
624-
# Copy vcpkg dependencies
625-
Write-Host "Copying vcpkg libraries to build/bin..." -ForegroundColor Cyan
626-
$vcpkgBinDir = "${{ github.workspace }}\build\vcpkg_installed\x64-mingw-dynamic\bin"
627-
if (Test-Path $vcpkgBinDir) {
628-
$dllCount = 0
629-
foreach ($dll in (Get-ChildItem -Path $vcpkgBinDir -Filter "*.dll")) {
630-
$targetPath = Join-Path "${{ github.workspace }}\build\bin" $dll.Name
631-
if (-not (Test-Path $targetPath)) {
632-
Copy-Item $dll.FullName $targetPath -Force
633-
$dllCount++
634-
}
635-
}
636-
Write-Host "✅ Copied $dllCount DLLs from vcpkg to build/bin" -ForegroundColor Green
637-
} else {
638-
Write-Host "❌ vcpkg bin directory not found: $vcpkgBinDir" -ForegroundColor Red
639-
}
640-
641-
# Ensure SIGNALS_SMD_PATH is properly set
642-
$env:SIGNALS_SMD_PATH = "${{ github.workspace }}\build\bin"
643-
Write-Host "SIGNALS_SMD_PATH set to: $env:SIGNALS_SMD_PATH" -ForegroundColor Cyan
644-
645-
# List DLLs in build/bin after copying
646-
Write-Host "Contents of build/bin after copying dependencies:" -ForegroundColor Yellow
647-
Get-ChildItem -Path "${{ github.workspace }}\build\bin\*.dll" |
648-
Where-Object { $_.Name -match "^(lib|msys-|libgcc|libwin|libstdc)" } |
649-
Sort-Object Name |
650-
Format-Table Name, Length, LastWriteTime
651-
652548
- name: Create package
653549
run: cpack --preset mingw-production
654550

@@ -658,10 +554,10 @@ jobs:
658554
name: lldash-windows-x86_64
659555
path: build/package/lldash-*.tar.gz
660556

661-
windows-test:
557+
windows-intel-test:
662558
runs-on: windows-latest
663559
needs:
664-
- windows-build
560+
- windows-intel-build
665561
steps:
666562
- name: Checkout code
667563
uses: actions/checkout@v4
@@ -708,7 +604,7 @@ jobs:
708604
if: always()
709605
uses: actions/upload-artifact@v4
710606
with:
711-
name: windows-test-logs
607+
name: windows-intel-test-logs
712608
path: |
713609
${{ env.BUILD_DIR }}/logs/**/*
714610
${{ env.BUILD_DIR }}/logs/*
@@ -718,7 +614,7 @@ jobs:
718614
if: ${{ failure() }}
719615
uses: actions/upload-artifact@v4
720616
with:
721-
name: windows-test-venv-folder
617+
name: windows-intel-test-venv-folder
722618
path: ${{ env.BUILD_DIR }}/.venv/
723619
include-hidden-files: true
724620
retention-days: 5
@@ -727,19 +623,19 @@ jobs:
727623
if: ${{ failure() }}
728624
uses: actions/upload-artifact@v4
729625
with:
730-
name: windows-test-installed-folder
626+
name: windows-intel-test-installed-folder
731627
path: ./installed
732628
retention-days: 5
733629

734630

735631
create-release:
736632
if: startsWith(github.ref, 'refs/tags/')
737633
needs:
738-
- linux-build
739-
- macos-build
634+
- linux-intel-build
635+
- macos-arm64-build
740636
- macos-intel-build
741637
- macos-universal-build
742-
- windows-build
638+
- windows-intel-build
743639
runs-on: ubuntu-latest
744640
steps:
745641
- name: Checkout code

0 commit comments

Comments
 (0)