-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.76 KB
/
ci-xpkg-test.yml
File metadata and controls
69 lines (56 loc) · 1.76 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
name: xpkg fromsource test
on:
push:
branches:
- '**'
paths:
- 'pkgs/**'
- 'tests/**'
pull_request:
paths:
- 'pkgs/**'
- 'tests/**'
jobs:
# L0 + L2: 静态分析 + 隔离合规 (无需 xlings, 秒级完成)
static-and-isolation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install pytest
sudo apt-get update -qq && sudo apt-get install -y -qq lua5.4
- name: L0 Static Analysis
run: pytest tests/ -m static --tb=short -q
- name: L2 Isolation Compliance
run: pytest tests/ -m isolation --tb=short -q
- name: Lint xpkg libpath policy
run: |
chmod +x .github/scripts/check-no-direct-ld-libpath.sh
.github/scripts/check-no-direct-ld-libpath.sh
# L1: 索引注册 (需要 xlings)
index-registration:
runs-on: ubuntu-latest
needs: static-and-isolation
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pytest
run: pip install pytest
- name: Install xlings
run: |
export XLINGS_NON_INTERACTIVE=1
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash
echo "XLINGS_HOME=$HOME/.xlings" >> "$GITHUB_ENV"
echo "PATH=$HOME/.xlings/subos/current/bin:$HOME/.xlings/bin:$PATH" >> "$GITHUB_ENV"
- name: L1 Index Registration
run: pytest tests/ -m index --tb=short -q