-
Notifications
You must be signed in to change notification settings - Fork 151
141 lines (125 loc) · 4.03 KB
/
matrix-smoke.yml
File metadata and controls
141 lines (125 loc) · 4.03 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
name: Matrix Smoke
on:
pull_request:
push:
branches:
- main
- master
jobs:
linux-smoke:
runs-on: ubuntu-latest
defaults:
run:
working-directory: dream-server
steps:
- name: Checkout
uses: actions/checkout@v4
- name: AMD Path Smoke
run: bash tests/smoke/linux-amd.sh
- name: NVIDIA Path Smoke
run: bash tests/smoke/linux-nvidia.sh
- name: WSL Logic Smoke
run: bash tests/smoke/wsl-logic.sh
# Multi-distro installer detection tests (dry-run, no GPU required)
distro-matrix:
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu-24.04
container: ubuntu:24.04
expected_pkg: apt
- distro: ubuntu-22.04
container: ubuntu:22.04
expected_pkg: apt
- distro: debian-12
container: debian:12
expected_pkg: apt
- distro: fedora-41
container: fedora:41
expected_pkg: dnf
- distro: archlinux
container: archlinux:latest
expected_pkg: pacman
- distro: opensuse-tw
container: opensuse/tumbleweed:latest
expected_pkg: zypper
runs-on: ubuntu-latest
container: ${{ matrix.container }}
defaults:
run:
working-directory: dream-server
name: "distro: ${{ matrix.distro }}"
steps:
- name: Install git (distro-aware)
working-directory: /
run: |
if command -v apt-get &>/dev/null; then
apt-get update -qq && apt-get install -y -qq git curl
elif command -v dnf &>/dev/null; then
dnf install -y -q git curl
elif command -v pacman &>/dev/null; then
pacman -Sy --noconfirm git curl
elif command -v zypper &>/dev/null; then
zypper --non-interactive install git curl
fi
- name: Checkout
uses: actions/checkout@v4
- name: Verify /etc/os-release
working-directory: /
run: |
echo "=== /etc/os-release ==="
cat /etc/os-release
source /etc/os-release
echo "ID=$ID"
echo "ID_LIKE=${ID_LIKE:-none}"
- name: Test packaging.sh detection
run: |
# Source the packaging library and verify detection
export LOG_FILE=/dev/null
log() { echo "[INFO] $1"; }
warn() { echo "[WARN] $1"; }
error() { echo "[ERROR] $1"; exit 1; }
source installers/lib/packaging.sh
detect_pkg_manager
echo "Detected: PKG_MANAGER=$PKG_MANAGER"
echo "Expected: ${{ matrix.expected_pkg }}"
if [[ "$PKG_MANAGER" != "${{ matrix.expected_pkg }}" ]]; then
echo "FAIL: expected ${{ matrix.expected_pkg }}, got $PKG_MANAGER"
exit 1
fi
echo "PASS: package manager detection correct"
- name: Test pkg_install (install jq + rsync)
run: |
export LOG_FILE=/dev/null
log() { echo "[INFO] $1"; }
warn() { echo "[WARN] $1"; }
error() { echo "[ERROR] $1"; exit 1; }
source installers/lib/packaging.sh
detect_pkg_manager
pkg_update
pkg_install curl jq || echo "WARN: jq install failed (may not be in repos)"
# Verify at least curl works
if command -v curl &>/dev/null; then
echo "PASS: curl available"
else
echo "FAIL: curl not available after pkg_install"
exit 1
fi
- name: Test installer bash syntax
run: |
bash -n install-core.sh
bash -n installers/lib/packaging.sh
for f in installers/phases/*.sh; do
bash -n "$f" && echo " OK: $f" || echo " FAIL: $f"
done
macos-smoke:
runs-on: macos-latest
defaults:
run:
working-directory: dream-server
steps:
- name: Checkout
uses: actions/checkout@v4
- name: macOS Dispatch Smoke
run: bash tests/smoke/macos-dispatch.sh