-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (68 loc) · 2.75 KB
/
test.yml
File metadata and controls
78 lines (68 loc) · 2.75 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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
name: ${{matrix.ruby}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
# Ubuntu - full Ruby matrix
- { os: ubuntu-latest, ruby: "3.2" }
- { os: ubuntu-latest, ruby: "3.3" }
- { os: ubuntu-latest, ruby: "3.4" }
- { os: ubuntu-latest, ruby: "4.0" }
# macOS
- { os: macos-latest, ruby: "4.0" }
# Windows MinGW
- { os: windows-latest, ruby: "4.0" }
# Windows MSVC
- { os: windows-latest, ruby: "mswin" }
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
mingw: clang llvm
- name: Install LLVM and Clang (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y llvm libclang-dev
- name: Install LLVM and Clang (macOS)
if: runner.os == 'macOS'
run: brew install llvm
- name: Install LLVM and Clang (Windows MinGW)
if: runner.os == 'Windows' && matrix.ruby != 'mswin'
run: pacman -S --noconfirm mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-llvm
- name: Debug LLVM paths (Windows MSVC)
if: matrix.ruby == 'mswin'
shell: pwsh
run: |
Write-Host "=== vswhere output ==="
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -prerelease -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath
Write-Host ""
Write-Host "=== VS LLVM directories ==="
$vsPath = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -prerelease -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath
if ($vsPath) {
$llvmDir = Join-Path $vsPath "VC\Tools\Llvm\x64\bin"
Write-Host "Looking in: $llvmDir"
if (Test-Path $llvmDir) { Get-ChildItem $llvmDir -Filter "libclang*" } else { Write-Host "Directory not found" }
}
Write-Host ""
Write-Host "=== Standalone LLVM ==="
where.exe llvm-config 2>$null
where.exe clang 2>$null
if (Test-Path "C:\Program Files\LLVM\bin") { Get-ChildItem "C:\Program Files\LLVM\bin" -Filter "libclang*" }
Write-Host ""
Write-Host "=== PATH ==="
$env:PATH -split ";" | Where-Object { $_ -match "llvm|clang" -or $_ -match "LLVM" }
- name: Run tests
timeout-minutes: 10
run: bundle exec rake test